REAMDE FOR INSTALLATION OF SGN SOFTWARE The software dump contained in the SGN_codebase.tar.gz file contains the software of the entire SGN site, including some dependecies such as (possibly slightly modified) versions of BioPerl and GBrowse. The directories jslib and perllib should be copied to a newly created directory /data/local/cxgn/, and simlinks generated as follows: mkdir -p /data/local/cxgn mkdir -p /usr/local/lib/site_perl mkdir /etc/cxgn cp -R jslib /data/local/cxgn cp -R perllib /data/local/cxgn cp -R sgn /data/local/cxgn ln -s /data/local/cxgn/perllib/CXGN /usr/local/lib/site_perl/CXGN ln -s /data/local/cxgn/perllib/Bio /usr/local/lib/site_perl/Bio ln -s /data/local/cxgn/perllib/GBrowse /usr/local/lib/site_perl/GBrowse ln -s /data/local/cxgn/jslib/ /usr/local/lib/jslib APACHE INSTALLATION You need to install Apache 1.3x. A sample configuration file is given in vhosts.conf_example. This needs to be included at the end of the httpd.conf file. A file called /etc/cxgn/SGN.HostConf should be created. An example is given in SGN.HostConf_example DATABASE INSTALLATION To install the database, follow these instructions: How to Correctly Build Postgres for SGN Full procedure follows... but a script to perform all of these steps is available at: /root/sgn-tools/sgn-db-utils/make_sgn_db.sh This prompts for the following parameters: Greater than 8 GB memory (optional) postgres password web_usr password Full procedure for doing this is as follows: To create a postgres database the following Debian packages must be installed: postgresql-common-8.1 postgresql-client-8.1 postgresql-contrib-8.1 postgresql-plperl libpq4 postgresql-8.1 SGN needs a couple specific build/intialization parameters. Amoung the most important settings are the default database collation sequence and the default locale settings. Collation sequence must be set to SQL_ASCII rather than the current Postgres default of UTF8. Backups made from prior SQL_ASCII databases will fail to load without this setting. Similarly the 'tsearch2' text search algorithm is languauge sensitive, and it requires the Locale to be 'C' to work properly. The following command needs to be run from the 'postgres' user, with postgres shutdown and the database directory empty; $ initdb -E SQL_ASCII --locale=C /var/lib/postgresql/8.1/main On high memory machines (> 8G) the performance parmeters of postgres can be expaned in the /etc/postgresql/8.1/main/postgresql.conf. Here are recommended settings: listen_addresses = '*' max_connections = 1000 shared_buffers = 32768 stats_command_string = on max_fsm_pages = 600000 max_fsm_relations = 2000 Loading CXGN / BIO_DB_GFF database Before loading databases from dump file, a bit of housekeeping is required. First one needs to set the 'postgres' user password. Sudo to the postgres account to do this; $ psql -c "ALTER USER postgres WITH PASSWORD 'blah-blah';" Next one needs to define the user roles that will appear in a dumpfile. There is a SQL file that defines these roles in sgn-tools. Return to being a normal SGN developer since postgres account is not normally able to see sgn-tools files. $ psql -h localhost -U postgres < /root/sgn-tools/sgn-db-utils/create-db-users.sql The web_usr account now also needs to have its password set; $ psql -c "ALTER USER web_usr WITH PASSWORD 'bleh-bleh';" This maybe already accomplished via the install of postgres-plperl, but to be sure perl is properly installed as a database internal language, type this at postgres user; $ createlang plperl Now the database maybe loaded from a dump file. This can be accomplished via a command such as this; { zcat /data/prod/dumps/tomatine.cxgn.pgsql.gz ; echo COMMIT ; } | sudo -u postgres psql --echo-all --variable AUTOCOMMIT=off --variable ON_ERROR_STOP=t --dbname cxgn > ${2:-/tmp/cxgn_db_creation_log} Be Careful to check the version of the dumpfile needed and the destination dbname!