Galaxy的安装

具体可参考:http://wiki.galaxyproject.org/Admin/Config/Performance/ProductionServer

1. Galaxy的下载

安装Galaxy需要Python。Get Galaxy,点击:http://wiki.galaxyproject.org/Admin/Get%20Galaxy。先行产看Python的版本,并安装OpenSSL和Bzip2的 -dev 包

$ python --version
$ sudo yum install openssl* bzip2*
$ wget https://bitbucket.org/galaxy/galaxy-dist/get/tip.tar.bz2

要注意的是Galaxy的安装包在国内可能下载不了,需要其它途径获得。

2. Galaxy的安装

安装Galaxy推荐安装在Linux系统一个全新的用户目录下。该用户名为Galaxy, 并使用 clean Python interpreter.

# useradd galaxy
# cd /home/galaxy
# su galaxy
# tar jxf galaxy-dist-cea3ddf6cdda.tar.bz2
# mv galaxy-dist-cea3ddf6cdda galaxy-dist
# wget http://bitbucket.org/ianb/virtualenv/raw/tip/virtualenv.py
# /usr/bin/python2.6 virtualenv.py --no-site-packages galaxy_env
# sh ./galaxy_env/bin/activate
# cd galaxy-dist
# sh run.sh

运行run.sh即开启了Galaxy。第一此运行需要下载很多的eggs,需要一点点时间。

3. Galaxy的配置

3.1 Apache的proxy配置

默认情况下,galaxy只能在本机上访问,如需让远程用户通过网页来方法,则需要对Apache的配置文件进行修改。在 /etc/httpd/conf/httpd.conf 中加入如下语句:

######## For Galaxy ################
<proxy http://122.205.95.116:8080>
    Order deny,allow
#    Allow from all
    Allow from 122.205.*.*
</proxy>
# 以上设置能访问Galaxy的IP,仅限122.205的IP段的用户访问。

RewriteEngine on
#RewriteRule ^(.*) http://122.205.95.116:8080$1 [P]
RewriteRule ^/galaxy$ /galaxy/ [R]
RewriteRule ^/galaxy/static/style/(.*) /home/galaxy/galaxy-dist/static/june_2007_style/blue/$1 [L]
RewriteRule ^/galaxy/static/scripts/(.*) /home/galaxy/galaxy-dist/static/scripts/packed/$1 [L]
RewriteRule ^/galaxy/static/(.*) /home/galaxy/galaxy-dist/static/$1 [L]
RewriteRule ^/galaxy/favicon.ico /home/galxy/galaxy-dist/static/favicon.ico [L]
RewriteRule ^/galaxy/robots.txt /home/galaxy/galaxy-dist/static/robots.txt [L]
RewriteRule ^/galaxy(.*) http://122.205.95.116:8080$1 [P]
# 以上设置访问galaxy的网址为http://122.205.95.116:8080/galaxy,而不需要影响其它的apache服务。

<Location "/galaxy/">
   # Compress all uncompressed content.
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:t?gz|zip|bz2)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI /history/export_archive no-gzip dont-vary
    XSendFile on
    XSendFilePath /galaxy/
</Location>
# 以上设置以压缩方式传输文件,并使用第三方的apache模块来提高性能

<Location "/static">
    # Allow browsers to cache everything from /static for 6 hours
    ExpiresActive On
    ExpiresDefault "access plus 6 hours"
</Location>
# Galaxy的静态内容在client端缓存,提高访问速度。

其中需要使用的第三方apache模块mod_xsendfile.c需要下载后载进行安装。

需要开放8080端口.

# vi /etc/sysconfig/iptables
# /etc/init.d/iptables restart

需要设置Apache对galaxy文件夹的访问权限

# usermod -G galaxy apache
# id apache
# chmod 750 /home/galaxy

3.2 Galaxy的配置文件

Galaxy的配置文件为universe_wsgi.ini,先cp universe_wsgi.ini.sample universe_wsgi.ini,然后再修改该配置文件内容。
3.2.1. 修改developer settings.

debug = False
use_interactive = False
Disable filter-with = gzip

3.2.2. 使用web服务器的配置

[server:main]
host = 122.205.95.116

[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /galaxy

[app:main]
filter-with = proxy-prefix
cookie_path = /galaxy

4. Galaxy依赖的软件

Galaxy的框架搭建起来后,需要依赖很多的软件和工具,才能正常运行。而这些软件和工具是Galaxy所不能完全提供的。
Tool Dependencies请点击:http://wiki.galaxyproject.org/Admin/Tools/Tool%20Dependencies

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据