Difference between revisions of "Zheng's installation notes"

From GMOD
Jump to: navigation, search
(install several general perl modules)
m (install gbrowse to work with chado)
 
(32 intermediate revisions by one other user not shown)
Line 14: Line 14:
  
 
==install prerequisites==
 
==install prerequisites==
 +
===install [http://en.wikipedia.org/wiki/Apache_Ant Ant]===
 +
sudo yum install ant
 
===install [http://www.postgresql.org/ postgresql]===
 
===install [http://www.postgresql.org/ postgresql]===
 
*install both client and server by yum
 
*install both client and server by yum
Line 35: Line 37:
 
  [zha@localhost ~] sudo -u postgres creatlang plpgsql template1
 
  [zha@localhost ~] sudo -u postgres creatlang plpgsql template1
 
  [zha@localhost ~] sudo -u postgres createuser zha
 
  [zha@localhost ~] sudo -u postgres createuser zha
replace zha with your own account name at your home directory. this must be a user with privilege to create and drop database.
+
replace zha with your own account name at your home directory. this must be a user with privilege to create and drop database. this is purely for the purpose of smooth installation.
 
  [zha@localhost ~] sudo -u postgres createuser root
 
  [zha@localhost ~] sudo -u postgres createuser root
this must be a superuser of postgresql (same privilege as postgres)  
+
this must be a superuser of postgresql (same privilege as postgres), this is for installing DBIx::DBStag.
 
*edit the pg_hba.conf
 
*edit the pg_hba.conf
 
the pg_hba.conf is in /var/lib/pgsql/data/pg_hba.conf, you probably need to chown to postgres.
 
the pg_hba.conf is in /var/lib/pgsql/data/pg_hba.conf, you probably need to chown to postgres.
Line 44: Line 46:
 
  host    all        all        127.0.0.1/32          trust
 
  host    all        all        127.0.0.1/32          trust
 
  host    all        all        ::1/128              trust
 
  host    all        all        ::1/128              trust
need revisit for local access and access method (MD5)
+
'''need revisit for local access and access method (MD5)'''
 
*tune the server
 
*tune the server
 +
haven't done yet.
  
 
===install several general perl modules===
 
===install several general perl modules===
Line 57: Line 60:
  
 
[http://search.cpan.org/~dbdpg/DBD-Pg-1.49/Pg.pm DBD::Pg] (1.49 or better) (GBrowse,chado)
 
[http://search.cpan.org/~dbdpg/DBD-Pg-1.49/Pg.pm DBD::Pg] (1.49 or better) (GBrowse,chado)
 +
 +
you can also install it by
 +
yum install perl-DBD-Pg
 
      
 
      
 
[http://search.cpan.org/~gaas/Digest-MD5-2.36/MD5.pm Digest::MD5]              (GBrowse)
 
[http://search.cpan.org/~gaas/Digest-MD5-2.36/MD5.pm Digest::MD5]              (GBrowse)
Line 84: Line 90:
 
[http://search.cpan.org/~mschilli/Log-Log4perl-1.09/lib/Log/Log4perl.pm Log::Log4perl]            (chado)
 
[http://search.cpan.org/~mschilli/Log-Log4perl-1.09/lib/Log/Log4perl.pm Log::Log4perl]            (chado)
 
      
 
      
Term::ProgressBar (2.06 or better)  (chado)
+
[http://search.cpan.org/~fluffy/Term-ProgressBar-2.09/lib/Term/ProgressBar.pm Term::ProgressBar] (2.06 or better)  (chado)
  
 
===install [http://search.cpan.org/~sendu/bioperl-1.5.2_102/ bioperl live]===
 
===install [http://search.cpan.org/~sendu/bioperl-1.5.2_102/ bioperl live]===
Line 103: Line 109:
  
 
==install chado==
 
==install chado==
 +
*in .bash_profile add lines
 +
export GMOD_ROOT="/usr/local/gmod"
 +
export CHADO_DB_NAME="yeast_chado"
 +
export CHADO_DB_USERNAME="zha"
 +
*standard perl package install
 +
perl Makefile.PL
 +
make
 +
sudo make install
 +
and then:
 +
make load_schema
 +
make prepdb
 +
make ontologies
 +
*backup ontologies
 +
pg_dump wormbase_chado > onto_only.sql
 +
*load sample yeast genome data
 +
download yeast genome gff3 file.
 +
load by bulk load
 +
gmod_bulk_load_gff3.pl --organism yeast --gfffile saccharomyces_cerevisiae.gff
  
 
==install gbrowse to work with chado==
 
==install gbrowse to work with chado==
 +
*install gbrowse
 +
download [http://sourceforge.net/forum/forum.php?forum_id=672152 Gbrowse], unpack it. standard install procedure. But be sure to read '''README.fedora''' and disable SELINUX for apache!!!
 +
perl Makefile.PL HTDOCS=/var/www/html CONF=/etc/httpd/conf CGIBIN=/var/www/cgi-bin --SELINUX=1
 +
make
 +
sudo make install UNINST=1
 +
*work with chado
 +
who is running apache?
 +
[zha@localhost ~]$ ps -ef |grep httpd
 +
in my machine it is 'apache'.
 +
configure gbrowse to work with chado.
 +
cp /home/zha/Generic-Genome-Browser-1.67/contrib/conf_files/07.chado.conf /etc/httpd/conf/gbrowse.conf/yeast_chado.conf
 +
make two-line-change to yeast_chado.conf
 +
database      = dbi:Pg:'''''dbname=yeast_chado;host=localhost;port=5432'''''
 +
user          = '''''apache'''''
 +
grant select privilege on several tables to apache
 +
grant select on feature to apache;
 +
in Mac it is www, see [[Jim's installation notes]].
 +
 +
it is a little bit surprise to me that I need
 +
grant select on analysisfeature to apache;
 +
since no analysisfeature exists in dataset (?)
 +
 +
[[Category:User Experiences]]

Latest revision as of 05:56, 28 January 2008

Back to Chado New Users

general information

There suppose to be an easy way and a hard way to install Chado database on Fedora:

  • the easy way: use an existing rpm package. I have not tried it. but you can find information at installation using an RPM
  • the hard way: install by source. But yum makes it easier. The following is my note on installation of Chado on Fedora 6.

before you start

get chado schema from cvs

see Chado From CVS, issue cvs command at my home directory.

install prerequisites

install Ant

sudo yum install ant

install postgresql

  • install both client and server by yum
[zha@localhost ~] sudo yum install postgresql
[zha@localhost ~] sudo yum install postgresql-server

right now the version is 8.1.8 (in yum package pool)

  • make server run
[zha@localhost ~] sudo /sbin/service postgres start

to make it run at boot

[zha@localhost ~] sudo /sbin/chkconfig postgres on
  • in .bash_profile add line
export PGDATA="/var/lib/pgsql/data/"

But I still can't get rid of the -D /var/lib/pgsql/data/ why???

[zha@localhost gff3]$ sudo -u postgres postgres
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
[zha@localhost gff3]$ sudo -u postgres postgres -D /var/lib/pgsql/data
FATAL:  lock file "postmaster.pid" already exists
HINT:  Is another postmaster (PID 2785) running in data directory "/var/lib/pgsql/data"?
  • create PL language, template, several roles
[zha@localhost ~] sudo -u postgres creatlang plpgsql template1
[zha@localhost ~] sudo -u postgres createuser zha

replace zha with your own account name at your home directory. this must be a user with privilege to create and drop database. this is purely for the purpose of smooth installation.

[zha@localhost ~] sudo -u postgres createuser root

this must be a superuser of postgresql (same privilege as postgres), this is for installing DBIx::DBStag.

  • edit the pg_hba.conf

the pg_hba.conf is in /var/lib/pgsql/data/pg_hba.conf, you probably need to chown to postgres.

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust

need revisit for local access and access method (MD5)

  • tune the server

haven't done yet.

install several general perl modules

use sudo cpan to do it. install

CGI (GBrowse)

GD (GBrowse)

DBI (GBrowse,chado)

DBD::Pg (1.49 or better) (GBrowse,chado)

you can also install it by

yum install perl-DBD-Pg
    

Digest::MD5 (GBrowse)

Text::Shellwords (GBrowse)

Data::Stag (chado)

XML::Parser::PerlSAX (chado)

Module::Build (chado)

Class::DBI (GMODWeb, or with a custom Chado schema)

Class::DBI::Pg (GMODWeb, or with a custom Chado schema)

Class::DBI::Pager (GMODWeb, or with a custom Chado schema)

DBIx::DBStag (chado)

XML::Simple (chado)

LWP (chado)

Template (chado)

Log::Log4perl (chado)

Term::ProgressBar (2.06 or better) (chado)

install bioperl live

[zha@localhost ~]$ sudo cpan
Password:
cpan[1]> install S/SE/SENDU/bioperl-1.5.2_102

this is the live bioperl right now

install go-dev

download and unpack the go-dev package since need to set the GO_ROOT environment variable. Although right now only a perl parser module for GO is needed.

  • in .bash_profile add line
export GO_ROOT="$HOME/go-dev"
  • install GO::Parser
[zha@localhost ~]$ sudo cpan
Password:
cpan[1]> install GO::Parser

install chado

  • in .bash_profile add lines
export GMOD_ROOT="/usr/local/gmod"
export CHADO_DB_NAME="yeast_chado"
export CHADO_DB_USERNAME="zha"
  • standard perl package install
perl Makefile.PL
make
sudo make install

and then:

make load_schema
make prepdb
make ontologies
  • backup ontologies
pg_dump wormbase_chado > onto_only.sql
  • load sample yeast genome data

download yeast genome gff3 file. load by bulk load

gmod_bulk_load_gff3.pl --organism yeast --gfffile saccharomyces_cerevisiae.gff

install gbrowse to work with chado

  • install gbrowse

download Gbrowse, unpack it. standard install procedure. But be sure to read README.fedora and disable SELINUX for apache!!!

perl Makefile.PL HTDOCS=/var/www/html CONF=/etc/httpd/conf CGIBIN=/var/www/cgi-bin --SELINUX=1
make
sudo make install UNINST=1
  • work with chado

who is running apache?

[zha@localhost ~]$ ps -ef |grep httpd

in my machine it is 'apache'. configure gbrowse to work with chado.

cp /home/zha/Generic-Genome-Browser-1.67/contrib/conf_files/07.chado.conf /etc/httpd/conf/gbrowse.conf/yeast_chado.conf

make two-line-change to yeast_chado.conf

database      = dbi:Pg:dbname=yeast_chado;host=localhost;port=5432
user          = apache

grant select privilege on several tables to apache

grant select on feature to apache;

in Mac it is www, see Jim's installation notes.

it is a little bit surprise to me that I need

grant select on analysisfeature to apache;

since no analysisfeature exists in dataset (?)