Installing on Ubuntu Linux

Be sure to follow the onscreen instructions during installation, accepting default or relevant options including any additional prompts regarding MySQL and Postfix configuration which arise during the installation process (Use Tab, Enter and Arrow Keys for Postfix Controls). The MySQL password is important later on in the setup process and also for future Root access so take care not to lose or forget it.

Install programs and dependencies

Run the following from the command line

sudo apt-get update
sudo apt-get install nano imagemagick apache2 mysql-server subversion
sudo apt-get install ghostscript antiword xpdf postfix libimage-exiftool-perl cron wget

Ubuntu 15.10 and lower:

sudo apt-get install php5 php5-dev php5-gd php5-mysql libav-tools

Ubuntu 16.04 - 17.10:

sudo apt-get install php7.0 php7.0-dev php7.0-gd php7.0-mysql php-mbstring php-zip libapache2-mod-php libav-tools

Ubuntu 18.04 and above:

sudo apt-get update
sudo apt-get install php php-dev php-gd php-mysql php-mbstring php-zip libapache2-mod-php ffmpeg

Configure PHP

 Configure PHP (see Configuring Your PHP.ini).

Create database

Create and configure the database (as root)
Set up MySQL database

Login to MySQL using the password you entered previously:

mysql -u root -p 

Create the new database:

CREATE DATABASE resourcespace CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Important step for Ubuntu 19.10+

Native passwords do not work for the root user by default, and the database user must be created as follows before it can be used by ResourceSpace. Make a note of the password as you'll need it later when setting up ResourceSpace. In MySQL:

create user 'resourcespace'@'localhost' identified with mysql_native_password by 'MyPassword123';
grant all privileges on resourcespace.* to 'resourcespace'@'localhost';

Checkout or download ResourceSpace

Review installation overview including

SVN checkout of ResourceSpace.

Set file and folder permissions:

cd /var/www
mkdir resourcespace
cd resourcespace
svn co .
mkdir filestore
sudo chmod 777 filestore
sudo chmod -R 777 include

Finish installation via web browser

Access the server address via a web browser to resume the setup. Ensure you have completed the steps on the Installation page to correctly configure php for use with ResourceSpace.

Set up the cron job for relevance matching and periodic emails

To set up the cron job:

sudo nano /etc/cron.daily/resourcespace

Add the lines:

wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php

Ctrl+O, Ctrl+X to save and quit.

Set the file and folder permissions

Change the permission for the include folder to 750

sudo chmod -R 750 include/

Set the user group for all files to be www-data

cd ..
sudo chgrp -R www-data resourcespace/