#############################
GSjunior web server.
Copyright 2013 Yechan Laizet
#############################
The web server is written in Python and is under the GPL licence version 3.
It relies on the Cherrypy library (BSD licenced).
The pdf report is generated with pyfpdf (LGPL licenced).
The report includes a reads length distribution graph produced
by pychart (GPL licensed).
Those 3 libraries are included in the package.
============
REQUIREMENTS
============
Most probably, your GSjunior computers run CentOS 5 version x86_64
with Python 2.4.
Check CentOS version by typing the following in a terminal:
cat /etc/redhat-release
uname _m
Check Python version by typing the following in a terminal:
python --version
To be able to run the web server, you need Python version >= 2.5.
We strongly recommend to install Python 2.6 from EPEL repository
to avoid breaking some system functions which relies on Python 2.4.
Install Python 2.6 on CentOS5 from EPEL repository
--------------------------------------------------
Here we assume that your GSjunior computer runs Centos5 x86_64 version.
If not, you must adapt the procedure consequently (rpm url)!
Install EPEL repository and Python 2.6 from a terminal:
su
enter your root password
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum install python26
Check Python 2.6 installation:
python26 --version
============
INSTALLATION
============
Uncompress the archive:
tar -zxvf GSjwebserver.tar.gz
Configure the web server by editing the config.py file:
-------------------------------------------------------
Make a copy of "config.py.default" renamed "config.py".
Edit this config.py file to configure the webserver.
Note: Keep the quotes around the values for each parameter you modify,
excepted __TCP_PORT__ !
Laboratory name:
To change the laboratory name, edit the variable __LAB_NAME__.
Host IP:
Edit the value of __HOST_IP__ to fit the IP adress of your GSjunior computer (or host).
This is required to access the web server from a different computer!
Note: If your computer is not connected to network, set back the default '0.0.0.0' value
to avoid errors in webserver initialization.
Data folder path:
If you have modified the GSjunior data folder path, change it in the variable __DATA_PATH__.
Users:
Add or modify users and passwords in the __USERS__ variable.
Make sure that the password value you enter is the md5 string of your password.
To generate it, open a terminal in the web server folder and type:
python encode_pwd.py
Then follow instructions to get your encoded password.
Customize the server:
---------------------
Logo:
To change the logo, overwrite the logo.png image in the static folder.
Make sure that the image is PNG format and that you keep the original
size of the image.
Run the web server:
-------------------
Open a terminal in the folder of the web server and type:
python26 gs_webserver.py
Note: do not close the shell window otherwise, you may close the server as well.
Go to your web browser on the host computer and enter the url:
http://localhost:8080
To access the server from another computer, enter the IP address you set in the config.py file and add the :8080 port at the end:
http://host_IP_address:8080
Important note: you might need to enable the tcp port in the firewall of
the GS junior computer.
Check the Security and firewall item in the administation menu.
Stop the web server:
-------------------
Either log as admin and click the "Shudown server" link on the top right corner
of the run list page or kill the task.
Note : the only user allowed to shutdown the server via the link must be called "admin".
Do not modify this username if you want to use this procedure.
ENJOY ;-)