Raphael Digital Documentation Setup
The software referred to here was produced as a prototype digital documentation system within the Mellon funded Raphael Research project. The software was built to test various ideas related to the storage, dissemination and description of museum/gallery related information.
The instruction listed here describe the steps required to set up an empty copy of the system for personal use. As stated the software is classed as prototype or beta software and further develop work would be recommended prior to making use of it for anything more than testing and development purposes.
If you are setting up a remote machine then all web address references to http://localhost will have to be replaced with the actual name or ip address of your server.
This page is part of the Linux Setup discussion.
--Jpadfield 13:00, 23 November 2010 (UTC)
Initial set-up of your Linux machine
Follow the instructions and install the software indicated in the following to sections:
Vips/Nip software
Add the following lines to end of your .bashrc file
export VIPSHOME=/usr/local/vips export MANPATH=$MANPATH:$VIPSHOME/man export PATH=$VIPSHOME/bin:"${PATH}" export LD_LIBRARY_PATH=/usr/local/lib:$VIPSHOME/lib export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib32/pkgconfig:/usr/share/pkgconfig:$VIPSHOME/lib/pkgconfig
Open up a new xterm window and run the following commands
sudo mkdir /usr/local/vips-7.22 sudo ln -s /usr/local/vips-7.22 /usr/local/vips
Prepare to download the source code
mkdir software mkdir software/vips cd software/vips
Download and unpack the current version of vips and nip2, for example:
wget http://www.vips.ecs.soton.ac.uk/supported/7.22/vips-7.22.5.tar.gz wget http://www.vips.ecs.soton.ac.uk/supported/7.22/nip2-7.22.4.tar.gz tar xzvf vips-7.22.5.tar.gz tar xzvf nip2-7.22.4.tar.gz
Move into the vips folder and build the software as indicated:
cd vips-7.22.5 configure --prefix=/usr/local/vips-7.22 make sudo make install
Move into the nip2 folder and build the software as indicated:
cd ../nip2-7.22.4 configure --prefix=/usr/local/vips-7.22 make sudo make install
If the software builds without any problems the nip2 software can be run with the command:
nip2
IIPImage system
Open a new xterm or move to your home folder
mkdir software/iipimage sudo mkdir /var/www/fcgi-bin
Edit your fastcgi.conf:
sudo gedit /etc/apache2/mods-available/fastcgi.conf
To read:
<IfModule mod_fastcgi.c> AddHandler fastcgi-script .fcgi #FastCgiWrapper /usr/lib/apache2/suexec2 FastCgiIpcDir /var/lib/apache2/fastcgi ScriptAlias /fcgi-bin/ /var/www/fcgi-bin/ <Directory "/var/www/fcgi-bin"> AllowOverride None Options +ExecCGI -Includes SetHandler fastcgi-script Order allow,deny Allow from all </Directory> # Initialise some variables for the FCGI server FastCgiServer /var/www/fcgi-bin/iipsrv.fcgi \ -initial-env MAX_IMAGE_CACHE_SIZE=10 \ -initial-env LOGFILE=/var/log/iipimage/iipsrv.log \ -initial-env VERBOSITY=1 \ -initial-env MAX_CVT=1024 \ -initial-env JPEG_QUALITY=75 \ -processes 10 </IfModule>
Download the latest server from IIPImage webpage and save it in your new folder software/iipimage
cd software/iipimage tar xvjf iipsrv-0.9.8.tar.bz2 cd iipsrv-0.9.8 ./configure make sudo mv src/iipsrv.fcgi /var/www/fcgi-bin/.
Restart apache2:
sudo /etc/init.d/apache2 restart
Test the iip server has been built correctly by visiting the following web page:
http://localhost/fcgi-bin/iipsrv.fcgi
Default PHP Settings
Various settings in your /etc/php5/apache2/php.ini file may need to be adjusted depending on how your system develops. The main variables you may want to change are those related to size of up-loadable files and various time limits. The file is well commented so if you have any issues with file sizes or time limits open up the file and have a look.
sudo gedit /etc/php5/apache2/php.ini
Setting up the Digital Documentation system
MySQL database
Set-up a new database user and an empty database using phpmyadmin:
- Goto http://localhost/phpmyadmin
- Click on the Privileges tab and then select the Add a new user option
- Enter an appropriate user name and password, check the Create database with same name ... option and then click Go
- For this example the user/database name ngdd_db has been used.
- Click on the Privileges tab and then click the reload the privileges in the note near the bottom of the page.
Download the initial database sql, File:Ngdd sql v1.tar.gz, then uncompress the file and enter the data to the database with the following commands, replacing the user name and database name as appropriate.
tar xzvf Ngdd_sql_v1.tar.gz mysql -u ngdd_db -p -D ngdd_db < ngdd_sql_v1.sql
Project web root directory and php files
Select the root directory for your system, this defines the web address of your system on your server. The standard web root is /var/www/, you will need to make at least one sub folder within this folder. For this example the project will be places with in a folder called documentation.
Download the project php files, Ngdd_php_v1.tar.gz into your home area and then:
sudo mkdir /var/www/documentation sudo chmod o+w /var/documentation mv Ngdd_php_v1.tar.gz /var/www/documentation/. cd /var/www tar xzvf rm Ngdd_php_v1.tar.gz
You may now need to edit one of the files to match your system setup:
- In header.php find the following section and the adjust the variables to match the values you have selected for your own system.
### Project Specific ############################################### $script_path = "/usr/local/ngdd_scripts"; $file_path = "/data/ngdd"; $unadmin = "project_admin_name"; $unadminpw = "project_admin_password"; $Title1 = "Digital Documentation Project"; $Title2 = "Documentation Project"; ### Database names ################################################# $mysqlhost = "localhost"; $mysqluser = "mysql_user"; $mysqlpassword = "mysql_password"; $mysqldb = "mysql_database";
Check Project Graphics
There are a number of different images used within the web-based user interface that are not uploaded into the system but are provided with the download of php files. Most of these files are fairly general but following images may need to be updated to reflect an specific project.
-
Display options icon
-
Display options icon
-
Display options icon
-
Main project logo
-
Small project logo, used on the explore page
-
Small project logo, used on the explore page
-
External link icon on the front page
-
Rotating gif, including project partner's logos
-
Decorative graphic used on pages without left menus
Please note that the file names used within the project all begin with lowercase letters.
Project Script Folder
Download the project scripts, Ngdd_script_v1.tar.gz into your home area and then:
sudo mkdir /usr/local/ngdd_scripts sudo chmod o+rw /usr/local/ngdd_scripts mv Ngdd_scripts_v1.tar.gz /usr/local/ngdd_scripts/. cd /usr/local/ngdd_scripts tar xzvf Ngdd_scripts_v1.tar.gz chmod a+x *.sh *.pl
You may now need to edit two of the files to match your system setup:
- In header.pl find the following section and the adjust the variables to match the values you have selected for your own system.
# MYSQL DB details my $host = "localhost"; my $mysql_user = "mysql_user"; my $mysql_passwd = "mysql_password"; my $database = "mysql_database"; # Required paths: my $data_folder = "/data/ngdd"; my $web_folder = "/var/www/documentation"; my $vips = "/usr/local/vips/bin/vips";
- Check that the following lines, in makePyr.py correctly matches your nip2/vips installation folder
sys.path.append('/usr/local/vips/lib/python2.6/site-packages') sys.path.append('/usr/local/vips/lib/python2.6/site-packages/vipsCC')
Project File Folders
The system currently needs a set of file folders within a main data folder. In this example the main data folder /data/ngdd has been selected.
Individual file folders:
- Uploaded file store: /data/ngdd/project_files
- Links to down-loadable files: /data/ngdd/project_links
- Pyramidal image file folder: /data/ngdd/project_pyr
- Details of edited files: /data/ngdd/project_edited
- Deleted files: /data/ngdd/project_trash
Make main project data folder and then create the other folders within it. Once they have been created you will also need to make sure than the www-data user can create and edit files within these folders
sudo mkdir -p /data/ngdd cd /data/ngdd sudo mkdir project_files project_links project_pyr project_edited project_trash sudo chown www-data:www-data * ln -s /data/ngdd/project_links/ /var/www/documentation/files
Web front end
Several of the main pages present content that needs to be edited directly in the php files. A full list of the adjustments that may need to be made has not yet been created, but one will be included here as required.