Galaxy Server Install and Setup

Installing Galaxy on Scientific Linux 6

Galaxy is a platform for managing, running, and sharing computational biology data and pipelines. Its a big idea, and a good idea, but a bit of a task to get working exactly how you might want it.

What follows is a brain dump of the initial setup and configuration of this tool. Sorry about the length.

Goals for sever configuration

  • Follow all recommended settings for production level Galaxy server
  • Use Nginx proxy front-end
    • Enable as much of proxy components as possible
  • Use local postgreSQL server
  • Try to make these instructions as complete as possible

Future goals for follow up configuration include

  • Enable and configure as many of the tools as possible
  • Provide easy access to local directories of sequencing data inside Galaxy
  • Experiment with with Galaxy Toolshed
  • Experiment with cluster configurations

About the System

Scientific Linux release 6.1 (Carbon)

Will use separate galaxy user to run galaxy

Galaxy user’s home directory will be located: /usr/local/galaxy

Resources

Most information comes from apapow.net

And the galaxy wikis Production Server page

Check base install

Ensure python is installed and at 2.6

which python

# /usr/bin/python

python --version

# Python 2.6.6

Ensure PostgreSQL is installed

sudo yum install postgresql postgresql-server

Modify PostgreSQL config file

Tricky part to getting postgreSQL working is the pg_hba.conf file. Edit it to allow local connections.

sudo vim /var/lib/pgsql/data/pg_hba.conf

A blog post explaining the syntax of this file . It should look something like:

local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host all all 0.0.0.0/0 md5

Startup PostgreSQL

sudo service postgresql initdb
sudo chkconfig postgresql on
sudo service postgresql start

Add galaxy user

Note

The galaxy user created here is not capable of using sudo. Every time sudo is used in this document, it is done from a sudo capable user.

Galaxy user’s home directory is at: /usr/local/galaxy

This was done because /home is a remotely mounted disk.

sudo /usr/sbin/useradd galaxy --home /usr/local/galaxy
passwd galaxy

Install dependency packages

# install git just to have

sudo yum install git

# install mercurial to download galaxy

sudo yum install mercurial

Install Galaxy

Switch to galaxy user

su galaxy
cd ~

Download galaxy

hg clone https://bitbucket.org/galaxy/galaxy-dist

Download virtualenv

wget https://raw.github.com/pypa/virtualenv/master/virtualenv.py

Create sand-boxed Python using virtualenv

python ./virtualenv.py --no-site-packages galaxy_env
. ./galaxy_env/bin/activate
which python

# ~/galaxy_env/bin/python

Configure galaxy user

Edit ~/.bashrc to define TEMP and to add virtualenv source

source ~/galaxy_env/bin/activate

TEMP=\$HOME/galaxy-dist/database/tmp
export TEMP

Ensure that ~/.bash_profile sources ~/.bashrc

# this should be in ~/.bash_profile

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

Setup PostgreSQL database for Galaxy

Login as postgres user

sudo su - postgres

Use createdb to create new database for galaxy

createdb galaxy_prod

Connect to database using psql

psql galaxy_prod

Create galaxy user for PostgreSQL database

CREATE USER galaxy WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE galaxy_prod to galaxy;
\q

Test galaxy PostgreSQL user.

Exit out of postgres user. Return to galaxy user and then attempt to connect to database.

blog comments powered by Disqus