SUSE Linux notes: Difference between revisions
From genomewiki
Jump to navigationJump to search
(database check added) |
(build from source - html docs) |
||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The usual conventions apply: | |||
* command issued from a root shell: <code># <command> </code> | |||
* command issued from a user shell: <code>$ <command> </code> | |||
= Prerequisites = | = Prerequisites = | ||
== Software == | |||
* sources to download | * sources to download | ||
** [http://www.gnu.org/software/ncurses/ncurses.html ncurses] | ** [http://www.gnu.org/software/ncurses/ncurses.html ncurses]:<code>$ wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz</code> | ||
** [http://samtools.sourceforge.net/ SAMtools] | ** [http://samtools.sourceforge.net/ SAMtools] | ||
*** [http://sourceforge.net/projects/samtools/files/samtools/ SAMtools] | *** [http://sourceforge.net/projects/samtools/files/samtools/ SAMtools]:<code>$ wget http://downloads.sourceforge.net/project/samtools/samtools/0.1.18/samtools-0.1.18.tar.bz2</code> | ||
*** [http://sourceforge.net/projects/samtools/files/tabix/ tabix] | *** [http://sourceforge.net/projects/samtools/files/tabix/ tabix]:<code>$ wget http://downloads.sourceforge.net/project/samtools/tabix/tabix-0.2.5.tar.bz2</code> | ||
* software from the repositories | |||
** libmysqlclient-devel | |||
** mysql-community-server | |||
** mysql-community-server-tools | |||
** libpng14-devel | |||
** apache2 | |||
** git | |||
* install via: <code># zypper install libmysqlclient-devel mysql-community-server mysql-community-server-tools libpng14-devel apache2 git</code> | |||
* environment variables | == other == | ||
* environment variables (file env_variables): | |||
export KENTHOME=$HOME/kent | export KENTHOME=$HOME/kent | ||
export USE_BAM=0 | export USE_BAM=0 | ||
Line 34: | Line 48: | ||
export HGCGI=$CGI_BIN | export HGCGI=$CGI_BIN | ||
* start MySQL: <code># mysql -u root -p mysql_root_password -e "show databases;" | grep ${GENOME}</code> | = Installation process = | ||
* set up the environment | |||
** ''tip: use two different shells (one user shell, one root shell) with (very) different colorschemes in parallel'' | |||
** user shell:<code>$ source env_variables</code> | |||
** root shell:<code># source env_variables</code> | |||
** you will switch between both, so you should operate on a common ground | |||
* create CGI directory:<code>$ mkdir -p ${CGI_BIN}-${USER}</code> | |||
* set the naive file permissions:<code># chmod 777 ${CGI_BIN}-${USER}</code> | |||
* create all directories as needed: | |||
mkdir -p ${SAMDIR} | |||
mkdir -p ${TABIXDIR} | |||
mkdir -p ${DOCUMENTROOT} | |||
mkdir -p ${CGI_BIN} | |||
mkdir -p ${TRASHDIR} | |||
mkdir -p ${KENTBIN} | |||
mkdir -p ${BINDIR} | |||
mkdir -p ${SCRIPTS} | |||
== build from source == | |||
* build and install ncurses: | |||
tar -xf ncurses-5.9.tar.gz | |||
cd ncurses-5.9 | |||
./configure | |||
make | |||
make install.libs DESTDIR= /genome/src/ncurses/ | |||
cd .. | |||
rm -rf ncurses-5.9 | |||
* build and install samtools: | |||
mkdir -p ${SAMDIR} | |||
wget http://downloads.sourceforge.net/project/samtools/samtools/0.1.18/samtools-0.1.18.tar.bz2 | |||
tar -xf samtools-0.1.18.tar.bz2 | |||
cd samtools-0.1.18 | |||
wget http://genomewiki.ucsc.edu/images/7/7f/Knetfile_hooks.0.1.18.patch | |||
patch -p1 < Knetfile_hooks.0.1.18.patch | |||
** edit in Makefile the variable LIBPATH | |||
** set to LIBPATH= -L/genome/src/ncurses/usr/lib | |||
mkdir -p ${SAMDIR} | |||
make | |||
cp -r samtools-0.1.18/* ${SAMDIR} | |||
cd .. | |||
rm -rf samtools-0.1.18 | |||
* build and instal tabix: | |||
tar -xf tabix-0.2.5.tar.bz2 | |||
cd tabix-0.2.5 | |||
wget http://genomewiki.ucsc.edu/images/e/e8/Knetfile_hooks_tabix-0.2.5.patch | |||
patch -p1 < Knetfile_hooks_tabix-0.2.5.patch | |||
** edit in Makefile the variable LIBPATH | |||
** set to LIBPATH= -L/genome/src/ncurses/usr/lib | |||
mkdir -p ${TABIXDIR} | |||
make | |||
cd .. | |||
cp -r tabix-0.2.5/* ${TABIXDIR} | |||
rm -rf tabix-0.2.5 | |||
* get the browser source via git: <code>$ git clone http://genome-source.cse.ucsc.edu/kent.git</code> | |||
* build the source: <code>$ cd kent/src </code> and run <code>$ make</code> | |||
** clang instead of gcc also works | |||
* check size of htdocs (around 452.45M):<code>$ rsync -nahvz --progress --stats rsync://hgdownload.cse.ucsc.edu/htdocs </code> | |||
* get production copy of html docs: <code>$ rsync -avzP rsync://hgdownload.cse.ucsc.edu/htdocs/ $WEBROOT/</code> | |||
== the database == | |||
* start MySQL: <code># service mysql start</code> | |||
* check for right database:<code># mysql -u root -p mysql_root_password -e "show databases;" | grep ${GENOME}</code> | |||
* do integrity check on databases: <code># mysqlcheck --all-databases</code> | * do integrity check on databases: <code># mysqlcheck --all-databases</code> | ||
Latest revision as of 23:08, 15 May 2012
The usual conventions apply:
- command issued from a root shell:
# <command>
- command issued from a user shell:
$ <command>
Prerequisites
Software
- sources to download
- software from the repositories
- libmysqlclient-devel
- mysql-community-server
- mysql-community-server-tools
- libpng14-devel
- apache2
- git
- install via:
# zypper install libmysqlclient-devel mysql-community-server mysql-community-server-tools libpng14-devel apache2 git
other
- environment variables (file env_variables):
export KENTHOME=$HOME/kent export USE_BAM=0 export SAMDIR=/genome/src/samtools/samtools-0.1.18 export SAMINC=${SAMDIR} export SAMLIB=${SAMDIR}/libbam.a export USE_TABIX=1 export TABIXDIR=/genome/src/tabix/tabix-0.2.5 export TABIXINC=${TABIXDIR} export TABIXLIB=${TABIXDIR}/libtabix.a export KNsETFILE_HOOKS=1 export MACHTYPE=`uname -m` export MYSQLINC=/usr/include/mysql export MYSQLLIBS="-L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -L/usr/lib64 -lssl -lcrypto" export MYSQLDATA="/var/lib/mysql" export DOCUMENTROOT=/var/www/html-$USER export WEBROOT=$DOCUMENTROOT export CGI_BIN=/var/www/cgi-bin export KENTBIN="$KENTHOME/bin" export BINDIR="${KENTBIN}/$MACHTYPE" export SCRIPTS="${KENTBIN}/scripts" export TRASHDIR="/var/www/trash" export ENCODE_PIPELINE_BIN="${BINDIR}" export AUTH_MACHINE="genome" export AUTH_USER=$USER export GLOBAL_CONFIG_FILE=${CGI_BIN}/hg.conf export HGCGI=$CGI_BIN
Installation process
- set up the environment
- tip: use two different shells (one user shell, one root shell) with (very) different colorschemes in parallel
- user shell:
$ source env_variables
- root shell:
# source env_variables
- you will switch between both, so you should operate on a common ground
- create CGI directory:
$ mkdir -p ${CGI_BIN}-${USER}
- set the naive file permissions:
# chmod 777 ${CGI_BIN}-${USER}
- create all directories as needed:
mkdir -p ${SAMDIR} mkdir -p ${TABIXDIR} mkdir -p ${DOCUMENTROOT} mkdir -p ${CGI_BIN} mkdir -p ${TRASHDIR} mkdir -p ${KENTBIN} mkdir -p ${BINDIR} mkdir -p ${SCRIPTS}
build from source
- build and install ncurses:
tar -xf ncurses-5.9.tar.gz cd ncurses-5.9 ./configure make make install.libs DESTDIR= /genome/src/ncurses/ cd .. rm -rf ncurses-5.9
- build and install samtools:
mkdir -p ${SAMDIR} wget http://downloads.sourceforge.net/project/samtools/samtools/0.1.18/samtools-0.1.18.tar.bz2 tar -xf samtools-0.1.18.tar.bz2 cd samtools-0.1.18 wget http://genomewiki.ucsc.edu/images/7/7f/Knetfile_hooks.0.1.18.patch patch -p1 < Knetfile_hooks.0.1.18.patch
- edit in Makefile the variable LIBPATH
- set to LIBPATH= -L/genome/src/ncurses/usr/lib
mkdir -p ${SAMDIR} make cp -r samtools-0.1.18/* ${SAMDIR} cd .. rm -rf samtools-0.1.18
- build and instal tabix:
tar -xf tabix-0.2.5.tar.bz2 cd tabix-0.2.5 wget http://genomewiki.ucsc.edu/images/e/e8/Knetfile_hooks_tabix-0.2.5.patch patch -p1 < Knetfile_hooks_tabix-0.2.5.patch
- edit in Makefile the variable LIBPATH
- set to LIBPATH= -L/genome/src/ncurses/usr/lib
mkdir -p ${TABIXDIR} make cd .. cp -r tabix-0.2.5/* ${TABIXDIR} rm -rf tabix-0.2.5
- get the browser source via git:
$ git clone http://genome-source.cse.ucsc.edu/kent.git
- build the source:
$ cd kent/src
and run$ make
- clang instead of gcc also works
- check size of htdocs (around 452.45M):
$ rsync -nahvz --progress --stats rsync://hgdownload.cse.ucsc.edu/htdocs
- get production copy of html docs:
$ rsync -avzP rsync://hgdownload.cse.ucsc.edu/htdocs/ $WEBROOT/
the database
- start MySQL:
# service mysql start
- check for right database:
# mysql -u root -p mysql_root_password -e "show databases;" | grep ${GENOME}
- do integrity check on databases:
# mysqlcheck --all-databases