Light on Dark -:- User Guides

Install ResourceSpace

OK, we have a server with all the required software installed, all we need to do now is install ResourceSpace. This is actually very easy - if you want a quick and dirty installation. The problems arise if we want to ensure the service is resilient and secure, because then we need to install the files on a separate EBS volume, and ideally we need to point MySQL as a separate volume as well.

Because the basic install of ResourceSpace is so simple, we will run through that first.

These instructions assume you have gone through the previous stages and have installed the requisite software (ImageMagick, Subversion, etc.). We use Subversion to install ResourceSpace directly from the RS Subversion server, as follows.

The Official Way

Taken directly from the ResourceSpace wiki,:

Login to SSH and navigate to the web root folder

cd /var/www

Use Subversion to download the latest version of ResourceSpace from Montala:

sudo svn co

switch to the newly generated folder and create a file store subfolder

cd resourcespace

sudo mkdir filestore

give the file store universal read/write permissions.

sudo chmod 777 filestore

now we need to create a new database in MySQL. Since this is the quick and dirty solution, we are going to use the root user, and the password you entered when installing MySQL:

mysql -u root -p

enter the password when prompted, and you will be given a mysql> prompt where you can manage the MySQL system.

create database ResourceSpace;

nb the ; is required – if you forget it, you will get a --> prompt where you can enter the rest of the command, terminated by a semicolon ;
If the command has succeeded, you get a response

Query OK, 1 row affected (0.00 sec)

That's all we need to do for now in MySQL, so enter


To get out.

Note that MySQL is case sensitive, so whatever name you give the database here, you will have to repeat exactly during the configuration stage later.

When we go to configure ResourceSpace, it is going to rewrite the config file. In order to do this it has to have write permission to the 'include' folder, so enter

sudo chmod -R 777 include

Once configuration is complete, we can set this back to 755 (owner can write, others can only read).

ResourceSpace needs to run some functions overnight, to keep the database tidy. These housekeeping functions are run through Cron, and there are a number of ways they can be set up.

The following is taken directly from the ResourceSpace wiki, and runs the job just after midnight, along with all the other daily jobs. Have a look at the Cron page for other ways of setting this up.

sudo nano /etc/cron.daily/

Add the lines:

#!/bin/sh wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php

Ctrl+O, Ctrl+X to save and quit, then do:

sudo chmod 777 /etc/cron.daily/

As noted, this is taken directly from the wiki, and I believe this line is wrong; I would advise you to look at the Chron page for better ways to do this.

We now have a server with ResourceSpace installed, ready to be configured – click here to go to the configuration page.


The RSintheCloud Way

These instructions for installing ResourceSpace are based on the transient nature of cloud computers, so we do not use the default EBS volume for any permanent data. There is also an assumption that you have installed phpMyAdmin and WebMin, and have set up a ResourceSpace user and database.

If you have not already done so, go to the 'adding disk space' section, add another volume, and mount it as /mnt/storage. Follow the instructions to create a ResourceSpace folder and link it as /var/www/RS

We can then follow the instructions given above, with some small variations. Notice the instructions above put ResourceSpace in the root of your website, while these instructions are installing it in the RS folder under the root. This changes a number of the instructions, so please follow one set or the other.

Login to SSH and navigate to the RS folder

cd /var/www/RS

Use Subversion to download the latest version of ResourceSpace from Montala: (note the dot at the end - it's important)

sudo svn co .

When it has finished, create a file store subfolder

sudo mkdir filestore

give the file store universal read/write permissions.

sudo chmod 777 filestore

When we go to configure ResourceSpace, it is going to rewrite the config file. In order to do this it has to have write permission to the 'include' folder, so enter

sudo chmod -R 777 include

Once configuration is complete, we can set this back to 755 (owner can write, others can only read).

just to check that this has worked, we will go to the linked folder on the new volume and check its contents:

cd /mnt/storage

ls -al
Storage Folder

cd ResourceSpace

ls -al
ResourceSpace folder

Here we can see the typical folder structure for ResourceSpace, saved on our permanent volume.

We now need to set up MySQL. Here it is assumed that you have installed phpMyAdmin and created a ResourceSpace user and database, and also that you have followed the instructions to move the MySQL data files onto the new volume. if you have already done this, there is no more set up for MySQL at this stage, but we will need to make changes in the configuration stage.

Finally, we want to set up Cron, and the easiest way to do this (if you have it installed) is through WebMin.

Fire up your browser and connect to WebMin as described in the WebMin guide.

Click on System, Scheduled Cron Jobs, and then click Create a new scheduled Cron job'.
Cron jobs

Fill in the boxes are shown below – the full command is

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

check on the Cron page to see exactly what this means.
creates a Cron job

And click create

Configuring ResourceSpace

Right, we have installed ResourceSpace – either to the default location, or to our new EBS volume – and we have created a new database, either with the default setup, or with a new user and being saved to the new volume. Now it is time to fire up our browser and look at ResourceSpace.

In your browser, enter your domain name, IP address or public DNS, followed by /RS - e.g.

this is slightly different to the instruction given the wiki, because we have installed ResourceSpace in the RS folder – this is to give you space on the server to install other applications or websites. We will discuss later how to set up a sub domain to point to this folder.

The first time you go into ResourceSpace it will automatically run the configurator and check some basic settings:
check basic settings

here you can see (if you can read the red on grey writing) that I have made a mistake setting up my PHP.ini file earlier, so I am just going to go off and fix that first.

Right, I'm back, so let's look at the next section. Below the installation check, we get the basic setting tab:
basic settings

Here we can see three types of field, those outlined in green, those outlined in red and those with no outline. Whenever we change certain values on this form, the new value will be validated and outlined in green or red as appropriate, so here the configurator has checked there is a MySQL server running on localhost, but needs to know the username and password to log into it. If you have created a ResourceSpace user, enter their details here; otherwise enter the root user password in the password box. Change the database name to have the correct case, and further down change the e-mail from address and e-mail notify to have valid domains. The from address is the address used for sending out messages, so it should match the e-mail settings which you set up earlier. If you have not set these, and your mail does not get delivered, please check the e-mail guide for more information.

The three lines at the bottom of this screen, the spider password and the two scramble keys are used to control access to the images in the file store, or to encrypt data for the API. These have been generated as random strings, and only need changing if you are upgrading an existing ResourceSpace installation when you will need to copy across the old values.

The remaining lines on the page after setting up paths to the various applications used by ResourceSpace, and will not normally need changing. There are also a number of options on the advanced settings tab which should not need changing at the moment, so we can just click the begin installation button, and almost immediately should get a congratulation screen back:


We will now remove write access to the include folder, as suggested – login to SSH and enter:

sudo chmod -R 755 /var/www/RS/include

Or if you have set up a new volume, you can instead change the access on the ResourceSpace folder on the new volume:

sudo chmod -R 755 /mnt/storage/ResourceSpace/include

Right, let's try it:

In your browser, remove the /pages/install.php from the address bar, to leave your-domain/RS and 'go' to give the login screen:
Login Screen

Enter admin as the user and password, and make sure it works. Have a browse around, just make sure it's working.

That's it, for the basic install. There are a couple of quick security bits, and having gone to all that trouble, we want to make a backup - but the hard work is over.

Let's start by changing the admin password, just to stop everybody logging in. Make sure you are logged in, then click on the 'Admin User' link in the top right:
Home Page

I do like that black colour scheme!
change your password

I'm sure I don't need to tell you what to do on this page…

Right, after all that work I'm going to re-image my server, so I have a nice clean new install to go back to.

What Next?

This is the end of the basic guides, so I am now going to go back through and flesh it out a bit - it is a bit sparse in places, but I wanted to get the basic instructions out as soon as possible.

What you should be doing now is adding resources, creating users, creating themes, groups and collections, and trying it all out.

Don't forget to take backups of your database and filestore, either by running a re-image regularly, or by setting up scheduled jobs - ask in the forum for advice about this.

If you want to install any plug-ins, let me know which ones and I will write you a guide for how to do it - likewise, ask in the forum about any configuration issues you might have.

And most important, let me know of anything in these guides which is wrong, confusing, misleading or very good - and let me know what you want next.


John Brookes

November 2011



just making sure we have a vertical scroll bar, otherwise it jitters sideways.