Installing OPUS on UoN Centos Note: these instructions assume the prior installation of Webmin (http://www.webmin.com), which is a Web-based GUI for Linux Server Administration but if you are a Linux expert you will probably prefer to use the command prompt for some inexplicable reason. Good luck to you. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Download OPUS from http://foss.ulster.ac.uk/redmine/projects/opus/files Download UUWAF from http://foss.ulster.ac.uk/projects/uuwaf/ Unpack the UUWAF archive on your Windows machine using 7-ZIP or similar Unpack the OPUS on your Windows machine using 7-ZIP or similar Using either the Webmin File Manager or the Linux command prompt as you prefer create a new folder in /usr/share called opus (/usr/share/opus) Similarly create a new folder in /usr/share called uuwaf (/usr/share/uuwaf) Copy the contents of the OPUS archive to /usr/share/opus Copy the contents of the UUWAF archive to /usr/share/uuwaf Install PHP from WebMin using the System|Software Packages|Package from YUM menu option. The following packages are required php 5.3.3-14.el6_3 Development/Languages PHP scripting language for creating dynamic web sites php-cli 5.3.3-14.el6_3 Development/Languages Command-line interface for PHP php-common 5.3.3-14.el6_3 Development/Languages Common files for PHP php-ldap 5.3.3-14.el6_3 Development/Languages A module for PHP applications that use LDAP php-mbstring 5.3.3-14.el6_3 Development/Languages A module for PHP applications which need multi-byte string handling php-mysql 5.3.3-14.el6_3 Development/Languages A module for PHP applications that use MySQL databases php-pdo 5.3.3-14.el6_3 Development/Languages A database access abstraction module for PHP applications php-xml 5.3.3-14.el6_3 Development/Languages A module for PHP applications which use XML Install MySQL from WebMin using the System|Software Packages|Package from YUM menu option. The following packages should be all that's required mysql 5.1.61-4.el6 Applications/Databases MySQL client programs and shared libraries mysql-libs 5.1.61-4.el6 Applications/Databases The shared libraries required for MySQL clients mysql-server 5.1.61-4.el6 Download Smarty 2 from http://smarty.php.net and copy the contents of the ‘libs’ directory to to /usr/share/php/Smarty and then manually create the following 4 sub-directories in the usr/share/opus directory templates templates_c cache configs (Note: The OPUS install guide at http://foss.ulster.ac.uk/redmine/projects/opus/repository/entry/INSTALL mentions the need to install ‘Smarty’ as a prerequisite but doesn’t bother to mention is that OPUS only appears to work with Smarty version 2. As Smarty 3 is available at http://smarty.php.net, standard practice is obviously to download the latest version but as I eventually found out the hard way, only Smarty 2 works with OPUS.) 12. Install Pear using YUM in Webmin Install i.e. php-pear 1.9.4-4.el6 Development/Languages PHP Extension and Application Repository framework php-pear-db 1.7.13-2.el6.rf Development/Libraries PEAR: Database Abstraction Layer (This may not actually be necessary – I was attempting to install the Pear logging package below). I suggest skipping this step and going straight to step 13 and then coming back to this step if you get errors relating to Pear logging) 13. Download the additional Pear logging package (which does not appear to be available via YUM) from http://pear.php.net/package/Log/, and copy the Log-1.12.7.tgz file to your home directory on the server and use the command pear install Log-1.12.7.tgz to install. 14. Edit /etc/httpd/conf/httpd.conf - add sample content from OPUS etc directory to match where you have installed Smarty, UUWAF, Pear etc 15. Open up port 80 in the firewall using Webmin (select the Linux Firewall option from the networking menu). This is for standard http web access 16. Open up port 3306 in the firewall using Webmin (select the Linux Firewall option from the networking menu). This is for access to the database via a Windows Clients such As MySQL workbench or DB Forge (another option is to install the libraries for PHPMyAdmin using YUM in Webmin Install) 17. Select MYSQL Database Server from the Webmin Servers menu, click on user permissions and create a new user with username root, with an appropriate password. Set the Host to your IP address to enable you to connect to the MyQL database from your Windows Desktop 18. Using your MySQL client of choice, connect to the MySQL server using the credentials specified above, and create a new database called opus. 19. Run the following Scripts in the Opus sql_patch sub-directory. schema.sql, data.sql This will create the MySQL database that opus uses 20. Create another new database on the server call 'preferences' and then run the preferencesschema.sql script from the UUWAF sql_patch sub-directory 21. Grant permissions to the user 'opus_user' in either Webmin or your MySQL client (or of you must, the Linux command prompt) with the command grant all on opus.* to opus_user@localhost identified by 'password' 22. Manually create the following directories for opus to use for temporary files etc.: /var/lib/opus/sessions /var/lib/opus/photos /var/lib/opus/templates_c /var/lib/opus/resources /var/lib/opus/templates_cache give user apache ownership of these files in the webmin file manager 23. Manually create a directory for opus to use for log files e.g. /var/log/opus and give user apache ownership of these files in the webmin file manager 24. Navigate to the folder /usr/share/opus/include/ and locate the file local.conf.php.dist (ignore opus.conf.php) and copy it to a new file in the same directory called local.conf.php 25. Edit local.conf.php to ensure that all the paths within it are pointing to the correct places 26. Create a new cron jon using the Scheduled Cron Jobs option from the System menu in Webmin. Set up the job to run /usr/share/opus/cron/opus.php on a daily basis (at midnight) 27. Locate the file /usr/share/opus/configs/lang_en.conf and copy it to create a new file called local_en.conf in the same directory. Edit this file to customise your OPUS installation for your own institution. The path for the UoN logo for the institution_logo setting is http://www.nottingham.ac.uk/images-top-level/logo.gif. You may need to adjust the institution_logo_width. This is set to institution_logo_width=209 in the current production system. 28. Run OPUS from your browser to test it (e.g. http://opustest.nottingham.ac.uk/opus/) 29. If you get error messages about (Smarty) directories not being writable despite correctly setting the permssions as above, disable or at the very least suspend SELinux, either by entering the command setenforce Permissive or by editing the SELinux configuration file in /etc/selinux/config and setting SELINUX=disabled. Setting SELinux to Permissuve vua the Command Prrompt takes effect straight away but you will need to reboot the Server from the Bootup And Shuddown menu option of the System menu within Webmin to fully disable
© Copyright 2026 Paperzz