Cool Solution - Installing ResourceSpace
From Univention Wiki
Installing ResourceSpace on UCS
First the unmaintained Repository needs to be activated to install needed packages then. Some of those packages should already be installed.
ucr set repository/online/unmaintained='yes'
univention-install mysql-server php5 php5-dev php5-gd php5-mysql \ subversion ghostscript antiword xpdf libav-tools postfix libimage-exiftool-perl wget
Now we can create a folder for ResourceSpace below /var/www and download the current version with svn. Also some adjustments to folders are made for the installation process.
cd /var/www mkdir resourcespace && cd resourcespace svn co http://svn.resourcespace.org/svn/rs/trunk . mkdir filestore chmod 777 filestore chmod -R 777 include
Then we need to create a database for ResourceSpace:
mysql -u root -p$(cat /etc/mysql.secret) create database <database name>; quit
If you do not want to use the root user along with the password from /etc/mysql.secret, you can create a new database user for ResourceSpace with the following commands:
mysql -u root -p $(cat /etc/mysql.secret) create user '<username>'@'localhost' identified by '<password>'; grant all on <database name>.* to '<username>'@'localhost'; quit
Some modifications of PHP are needed for ResourceSpace to function. These can be set via UCR
ucr set php/memory/limit=200M \php/limit/filesize=100M \php/limit/postsize=100M
Reload the Apache configuration afterwards.
service apache2 reload
Now the actual installation is in order.
Open <IP or hostname of your server>/resourcespace and provide the site with the needed information on the database user. As soon as the database configuration works, the according fields borders will turn green. The same applies to the strength of the password of the admin user, which is defined below. Additional configuration can be applied in the tab "Advanced Settings". When you are done with configuration you can start the installation by clicking the button "Begin installation!" at the bottom of the page. If something is not right, the page will tell you with a red alert bubble.
If the installation succeeds, you will be redirected to a page congratulating you on that. You can now login to ResourceSpace with your admin user.
However, some additional changes should be applied for security reasons.
First, write access to the include folder should be limited. To do that, execute the following command in the ResourceSpace folder (/var/www/resourcespace in this case).
chmod -R 445 include
Additionally, access to filestore should be limited. We have to create a new configuration file for Apache to do that.
cat << EOF > /etc/apache2/conf.d/resourcespace.conf <Directory /var/www/resourcespace/filestore> Options -Indexes </Directory> EOF
Then reload the Apache configuration again.
service apache2 reload