Changes between Initial Version and Version 1 of Telomere Length Recording Application HowTo Install


Ignore:
Timestamp:
07/08/15 18:54:34 (9 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Telomere Length Recording Application HowTo Install

    v1 v1  
     1= Telomere Length Recording Application HowTo Install
     2
     3Tags: [[Telomere Length Recording Application]] [[HowTo]] [[Install]] [[Pain in the proverbial]] [[UoL LAMP Server]]
     4
     5== Difficulties
     6
     7This installations is made more difficult by 3 things:
     8
     91. Suse Linux does not have mod_wsgi in its repositories, so you're going to have to compile it.
     102. mod_wsgi seems picky about where it picks python apps and libraries from
     113. The LAMP servers don't put things where you'd expect them to be.
     124. Some other stuff that I don't quite understand
     13
     14== Proceduce
     15
     161. [[HowTo Compile mod_wsgi for LAMP servers]]
     172. Copy the Telomere application from the `git` repository into `/local/` directory.
     183. Install virtualenv:
     19
     20{{{
     21easy_install --install-dir=/local/python virtualenv
     22}}}
     23
     24    ''For some reason that I can't work out (point 4. above), it would only pick up some of the python libraries from a virtual env and not when they were installed in `/local/python/`.  Maybe this was because of the order that I installed things, but I couldn't get it to work without the virtual environment.''
     254. Create a virtual environment in the telomere application directory.
     26
     27{{{
     28cd /local/telomere
     29/local/python/virtualenv --no-site-packages BASELINE
     30}}}
     31
     32    ''`BASELINE` is the name of the virtual environment.  It could be called anything, but it's called that!  Also note that you need to use the full path to the `virtualenv` utility, since `/local/python` isn't in `$PATH`.''
     33
     345. Activate the environment, install the required packages, then deactivate:
     35
     36{{{
     37source BASELINE/bin/activate
     38easy_install flask
     39easy_install flask-sqlalchemy
     40easy_install mysql-python
     41easy_install flask-login
     42easy_install python-ldap
     43deactivate
     44}}}
     45
     466. Load the WSGI module into Apache, by editing the file `/local/apache2/etc/loadmodule.conf` by adding this line at the end.
     47
     48{{{
     49LoadModule wsgi_module /local/apache2/etc/mod_wsgi.so
     50}}}
     51
     52    ''This presumes that you've copied the compiled `mod_wsgi.so` file into the `/local/apache2/etc/` directory.''
     53
     547. Add the WSGI config to the Apache config file `/local/apache2/etc/httpd.conf`:
     55
     56{{{
     57<Directory /local/telomere>
     58    WSGIProcessGroup telomere
     59    WSGIApplicationGroup %{GLOBAL}
     60    Order deny,allow
     61    Allow from all
     62</Directory>
     63
     64WSGIDaemonProcess telomere user=wwwrun threads=5 python-path=/local/telomere/BASELINE/lib/python2.6/site-packages:/local/python:/usr/lib64/python2.6/site-packages:/usr/share/doc/packages/ home=/local/telomere/
     65WSGIScriptAlias / /local/telomere/app/telomere.wsgi
     66}}}
     67
     68    ''The two hard won things here are the values for the `python-path` and `home` arguments.  The `python-path` must contain every directory where python libraries are installed, including a sub-directory of the virtualenv directory you created earlier.  The `home` must point to your application directory, or you won't be able to pick up your own modules.''
     69
     708. Restart apache:
     71
     72{{{
     73sudo /etc/init.d/uol.apache2 restart
     74}}}
     75
     769. Pray.
     77
     78[[BackLinks]]