Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
173 lines (116 sloc) 5.06 KB
This instructions relate to the installation of the eFORGE webserver.
This is based on a VM running Scientific Linux with Perl 5.10.1. You may need to adapt these
commands if you wish to install the webserver on a different system.
Step-by-step guide
==================
1. Log into the VM
------------------
ssh USER@eforge.cs.ucl.ac.uk
2. Download the eForge package and install the dependencies
-----------------------------------------------------------
2.a. The code lives in GitHub and the databases and mvp_*_bins files are available through the
webserver.
cd
git clone https://github.com/charlesbreeze/eFORGE.git
cd eFORGE
wget http://eforge.cs.ucl.ac.uk/files/eforge.db
wget http://eforge.cs.ucl.ac.uk/files/eforge_1.1.db
wget http://eforge.cs.ucl.ac.uk/files/eforge_1.2.db
wget http://eforge.cs.ucl.ac.uk/files/mvp_450k_bins
wget http://eforge.cs.ucl.ac.uk/files/mvp_27k_bins
2.b. Install Perl dependencies
Just test the code
perl eforge.pl
and install the missing packages using cpan.
sudo cpan -i Sort::Naturally
sudo cpan -i Config::IniFiles
sudo cpan -i Data::UUID
sudo cpan -i Statistics::Multtest
2.c. Install R and R packages rjson, rCharts and RSQLite (for the log):
sudo yum install R
sudo R
install.packages("rjson");
install.packages("devtools"); # In case you don't have this in your system
require(devtools);
install_github('ramnathv/rCharts');
install.packages("RSQLite")
2.d. Run the software and test that you get the PDF and the dimple chart:
perl eforge.pl
You must find a new directory called "0x*" with several files, including a .pdf and a .dchart.html.
Check that these work. If the .dchart.html cannot be open. By default, the HTML links to the
location of the js code on the local machine. For the server, this should point at a public URL
server by the server itself.
3. Install the web server
-------------------------
3.a. Install the Apache package if required:
sudo yum install httpd.x86_64
3.b. Create some directories for hosting the code, log and result files:
sudo mkdir /var/www/eFORGE.v1.2/
cd /var/www/eFORGE.v1.2/
sudo mkdir -p bin log cgi-bin html html/files
sudo chown apache log html/files # the user under which you run apache (see the line "User" in
# /etc/httpd/conf/httpd.conf)
3.c. Copy the webserver files to the right directories
sudo rsync -avPL ~/eFORGE/webserver/cgi-bin/ /var/www/eFORGE.v1.2/cgi-bin/
sudo rsync -avPL ~/eFORGE/webserver/bin/ /var/www/eFORGE.v1.2/bin/
sudo rsync -avPL ~/eFORGE/webserver/html/ /var/www/eFORGE.v1.2/html/
sudo rsync -avPL ~/eFORGE/eforge.db /var/www/eFORGE.v1.2/bin/
sudo rsync -avPL ~/eFORGE/eforge_1.1.db /var/www/eFORGE.v1.2/bin/
sudo rsync -avPL ~/eFORGE/eforge_1.2.db /var/www/eFORGE.v1.2/bin/
sudo rsync -avPL ~/eFORGE/mvp_450k_bins /var/www/eFORGE.v1.2/bin/
sudo rsync -avPL ~/eFORGE/mvp_27k_bins /var/www/eFORGE.v1.2/bin/
3.e. Add links to the database files for the Downloads page:
cd /var/www/eFORGE.v1.2/html/files
sudo ln -s ../../bin/eforge.db .
sudo ln -s ../../bin/eforge_1.1.db .
sudo ln -s ../../bin/eforge_1.2.db .
sudo ln -s ../../bin/mvp_450k_bins .
sudo ln -s ../../bin/mvp_27k_bins .
3.f. Create the configuration files
These files contain a list of arrays and dataset included in the database. They are used by the
web server to know what it can offer without having to query the DB every time.
cd /var/www/eFORGE.v1.2/bin
perl eforge.pl -data ? > data.conf
perl eforge.pl -bkgd ? > bkgd.conf
3.g. Configure the Apache server
You can choose to either run eFORGE on a VirtualHost (like http://eforge.cs.ucl.ac.uk/) or on a
folder (like http://blic.cs.ucl.ac.uk/eFORGE).
OPTION 1 -- Configure an Apache VirtualHost for eFORGE:
cat > /etc/httpd/conf.d/eforge.v1.2.conf
<VirtualHost *:80>
ServerName eforge.cs.ucl.ac.uk
DocumentRoot /var/www/eFORGE.v1.2./html
ScriptAlias /cgi-bin/ /var/www/eFORGE.v1.2/cgi-bin/
<IfModule dir_module>
DirectoryIndex index.html /cgi-bin/index.pl
</IfModule>
<Directory "/var/www/eFORGE.v1.2/html">
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/eFORGE.v1.2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
OPTION 2 -- Configure an Apache VirtualHost for eFORGE:
cat > /etc/httpd/conf.d/eforge.v1.2.conf
ScriptAlias /eFORGE.v1.2/cgi-bin/ /var/www/eFORGE.v1.2/cgi-bin/
Alias "/eFORGE.v1.2" "/var/www/eFORGE.v1.2/html"
<Directory "/var/www/eFORGE.v1.2/html/">
Order allow,deny
Allow from all
DirectoryIndex index.html cgi-bin/index.pl
</Directory>
<Directory "/var/www/eFORGE.v1.2/cgi-bin/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
3.h. Copy the rCharts libraries to the html path:
sudo rsync -avP /usr/lib64/R/library/rCharts/libraries /var/www/eFORGE.v1.2/html/
3.i Re-start Apache
sudo /etc/init.d/httpd restart