Then setup your bash environment as instructed by perlbrew. Typically that will be in your .bashrc
1
source ~/perl5/perlbrew/etc/bashrc
For custom installation of perlbrew set the PERLBREW_HOME environmental variable. For example if it needs to be installed in a shared folder such as /home/gbrowse
12345
export PERLBREW_ROOT=/home/gbrowse
curl -kL http://install.perlbrew.pl | bash
In the .bashrc
export PERLBREW_ROOT=/home/gbrowse
source${PERLBREW_ROOT}/etc/bashrc
Install perl
1
perlbrew install perl-5.10.1
Alternatively, with some compile time options in a 64bit CentOs 6 system
Create a standalone local lib for installing dependencies. Use a separate local lib for every version of gbrowse2
123
perlbrew lib create gbrowse-2.40
perlbrew use lib perl-5.10.1@gbrowse-2.40 (perl version might vary) perlbrew switch lib perl-5.10.1@gbrowse-2.40 (make it permanent in the bash)
Checkout gbrowse2 from github and go to the develop branch
gbrowse2 needs libgd2 to function. Looks here for installing in your OS. Instructions for debian,red hat based linuxes and MacOSX are given there. However, for a latest MacOSX with homebrew, you should do with brew install
1
HARNESS_OPTIONS=j4 cpanm -n --installdeps .
Setup gbrowse2
Most of the commands below are recommended to run from inside of gbrowse2 checkout folder
Set envrionmental variables. Vary the gbrowse version as needed.
12345
export GBROWSE_ROOT=`pwd`/gbrowse
export GBROWSE_VERSION=2.40
The above will setup the folder where gbrowse2 html,js,
temporary files,sessions,images,config files etc will be kept.
Note: For CentOs with SELinux enabled install Term::ReadKey
1
cpanm Term::ReadKey
Configure gbrowse2 path. Run the command below from the gbrowse2 checkout folder.
Install gbrowse2 libraries. Just press enter at the password prompt. Also answer ‘no[n]’ for apache2 restart.
Note: Again for CentOs with SELinux enabled, it will ask for sudo password. Just hit enter three times.
1
./Build install
Edit the configuration files. It is recommended to edit the configuration files in the installed folder rather than the stock one. It gives the flexibility of having separate config files for every version.
123
cd$GBROWSE_ROOT/$GBROWSE_VERSIONand edit the files
Make sure the paths in the yeast demo files are being set properly.
Two modes of plack deployment have been tested, Starman as backend web server and standalone FCGI . Instructions are given for nginx however setting up with apache2 would be simple.
* Install nginx using your OS package manager.
Nginx with Starman
Install and then start Starman
12345
cpanm Starman
plackup -s Starman --port 9000 --daemonize --pid /tmp/starman_gb2.pid \$GBROWSE_ROOT/$GBROWSE_VERSION/conf/GBrowse.psgi
The above will have Starman running in background on port 9000
Open and edit the nginx.conf file. It will deploy it under /browser
1234567891011121314151617181920212223
## upstream blockupstream gb2 { server 127.0.0.1:9000
}# backend server mappinglocation /browser { proxy_read_timeout 300;
rewrite /browser/(.*) /$1break;
proxy_pass http://gb2;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
}# serving static files directly instead of going through Starman# better for deployment# For every gbrowse version path have to be changed location /gbrowse2 {alias /home/ubuntu/GBrowse-PSGI/gbrowse/2.40/html;
expires 30d;
}