1、1. Introduction12. Perl modules.53. Install Ensemble Code.94. Configuration95. 允许执行 cgi 文件 136. 修改的文件(172.16.10.12 和 172.16.10.16) .131. IntroductionThe attempt to get a working local ENSEMBL is involved several kind of software installation, such as Perl, apache, MySql etc. Depend on your server OS
2、 version, the installation requirement may be deferent with the following example. Please keep it in mind that you must check each installation step carefully. A single mistake would cause the fail of building local Ensembl service.There is an alternative method to get working ENSEMBL, http:/ this s
3、olution offers ENSEMBl web interface without database. If you understand Japanese, congratulations, an extra help is available for you (http:/mlab.cb.k.u-tokyo.ac.jp/nakatani/ensemblmirror/index.php ) which wrote in Japanese. Otherwise, try Google translate to get the translation.If you want to inst
4、all a minimum ENSEMBL, UCSE give an easy solution: http:/genomewiki.ucsc.edu/index.php/Ensembl_minimum_install.You should choose the latest and stable version for most of software, except ParallelUserAgent. The details are described in following sections.Assumes that you want to install ENSEMBL in /
5、home/local/ensemble and use Ubuntu 10.04.2 OS.1. Web server environment A. MicroSoft fontssudo apt-get install msttcorefontsB. C language complierThe binary source can download from http:/gcc.gnu.org/. For Ubuntu system, simply use the command.apt-get instll gcc C. CvsDownload the latest source from
6、 http:/ftp.gnu.org/non-gnu/cvs/source/stable/1.11.23/ Unpack the source in a working directory with:gunzip mod-checkIf they dont exist in /home/httpd-2.2.19/modules. Do the following commands. find / -name apxsThe result is:/home/local/apache2/bin/apxs cd /home/httpd-2.2.19/modules/filters/home/loca
7、l/apache2/bin/apxs -c mod_deflate.ccp -i /home/httpd-2.2.19/modules/filters/.libs/mod_deflate.so /home/httpd-2.2.19/modules cp -i /home/daniel/httpd-2.2.21/modules/filters/.libs/mod_deflate.so /usr/local/Ensembl/modulescd /home/httpd-2.2.19/modules/metadata/home/local/apache2/bin/apxs -c mod_headers
8、.ccp -i /home/httpd-2.2.19/modules/metadata/.libs/mod_headers.so /home/httpd-2.2.19/modules cp -i /home/httpd-2.2.19/modules/metadata/.libs/mod_headers.so /home/local/ensembl/modules2/10 12 print $im-can(“png“) ? “yes“ : “no“ , “n“;D. GDhttp:/search.cpan.org/lds/GD-2.46/GD package requires some addi
9、tional conditions, please read its READ file carefully. After enter command “perl Makefile.PL”, you should see the sentence: “Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33” on Linux terminal. Otherwise, you should double c
10、heck libgd installation.3. Install Ensemble CodeA. prepare directory:mkdir /home/local/ensembl cd /home/local/ensembl B. Download Ensembl+web codecvs -d :pserver:cvsusercvs.sanger.ac.uk:/cvsroot/ensembl logincvs passwd: CVSUSERcvs -d :pserver:cvsusercvs.sanger.ac.uk:/cvsroot/ensembl co -r branch-ens
11、embl-64 ensembl-api ensembl-websiteNote: current Ensembl version is release-64. According to your choice, change the version number.Change version to the latest branch of code.4. ConfigurationThere are several configuration files that have same name exist in different folders. If you havent any spec
12、ial requirement, just need to change the following files.#/home/local/ensembl/conf/Plugins.pm#/home/local/ensembl/conf/ini-files/MULTI.ini/home/local/ensembl/conf/ini-files/DEFAULTS.ini /home/local/ensembl/public-plugins/mirror/conf/SiteDefs.pm/home/local/ensembl/public-plugins/mirror/conf/ini-files
13、/DEFAULTS.ini #/home/daniel/local/ensembl/public-plugins/ensembl/conf/ini-files/Homo_sapiens.iniCongratulations!You have accomplished the hardest part of Ensembl installation. The details about BioPerl installation, configuration and database import can be found on Ensembl official web, they are eas
14、y job.-C. BioMartcd /usr/local/ensemblecvs -d :pserver:cvsusercvs.sanger.ac.uk:/cvsroot/biomart logincvs passwd: CVSUSERcvs -d :pserver:cvsusercvs.sanger.ac.uk:/cvsroot/biomart co -r release-0_6 biomart-perD. Install the BioPerl modulesThe required version for parsing BLAST function in ENSEMBL is Bi
15、oPerl 1.2.3. If you try to go with latest BioPerl. BLAST searches will not work, but ensembl-api should be OKBioPerl-1.2.3: http:/bioperl.org/DIST/old_releases/Bioperl 1.6.1: http:/www.bioperl.org/wiki/Getting_BioPerl2. Ensembl configureNote: Do not change any file in directory /usr/local/ensembl/pu
16、blic-plugins/ensembleA. Plugins.pm cd /usr/local/ensembl/conf/cp Plugins.pm-dist Plugins.pmB. SiteDefs.pmcd /usr/local/ensembl/public-plugins/mirror/conf/cp SiteDefs.pm-dist SiteDefs.pmNote: You should only change the values, that is the parts between single quotes.General configurationIf you instal
17、led the Ensembl site in /usr/local/ensembl, then you could change this line of SiteDefs to read:$SiteDefs:ENSEMBL_SERVERROOT = /usr/local/ensembl;Configuration of the Apache web serverChange $SiteDefs:ENSEMBL_SERVERNAME to the web name of the server - e.g. “www.yoursite.org“. This value is dynamical
18、ly set to the server hostname by default.Change $SiteDefs:ENSEMBL_USER and $SiteDefs:ENSEMBL_GROUP to the system user and group you want the Apache web server to run as. Usually, for security, this is a special user (such as “nobody“) who has very few permissions.Mail configuration - error messagesI
19、f you want errors to be automatically emailed to you, change $SiteDefs:ENSEMBL_MAIL_ERRORS to the value 1, and change $SiteDefs:ENSEMBL_ERRORS_TO to your email address. If you dont want errors mailed, set $SiteDefs:ENSEMBL_MAIL_ERRORS to 0.User database - Database and cookie configurationChange the
20、values of the following to have the details for your web_user database$SiteDefs:ENSEMBL_USERDB_NAME$SiteDefs:ENSEMBL_USERDB_HOST$SiteDefs:ENSEMBL_USERDB_USER$SiteDefs:ENSEMBL_USERDB_PASSRemember this database needs a user with update/insert/delete privileges. Additionally if you wish to change the e
21、ncryption keys used to “protect“ the cookies, $SiteDefs:ENSEMBL_ENCRYPT_0 should be a six digit hex-number and $SiteDefs:ENSEMBL_ENCRYPT_1, _2 and _3 should each contain two alphanumeric characters. Unless you are particularly concerned about people changing cookies, the default values will probably
22、 do.Temporary FilesThere are three temporary file locations that can be configured:$SiteDefs:ENSEMBL_TMP_DIR General storage for temporary files$SiteDefs:ENSEMBL_TMP_DIR_IMG Storage for image files$SiteDefs:ENSEMBL_TMP_DIR_BLAST Storage for blast filesThe values for these should be set to an appropr
23、iate file system path.Some temporary files need to be referenced by URL from web pages. The first two tmp directories above therefore have URL aliases, also configured within SiteDefs.pm. You should not need to edit these.$SiteDefs:ENSEMBL_TMP_URL URL alias for $ENSEMBL_TMP_DIR$SiteDefs:ENSEMBL_TMP_
24、URL_IMG URL alias for $ENSEMBL_TMP_DIR_IMGThere are two further temporary file configuration options available:$SiteDefs:ENSEMBL_TMP_CREATE If set, then at apache startup the server will attempt to create any temporary directories that have been configured, but which dont already exist. It also chan
25、ges their ownership to $SiteDefs:ENSEMBL_USER.$SiteDefs:ENSEMBL_GROUP$SiteDefs:ENSEMBL_TMP_DELETE If set, then at apache startup the server will attempt to delete the contents of $ENSEMBL_TMP_DIR and $SiteDefs:ENSEMBL_TMP_DIR_IMG.C. Edit: /usr/local/ensembl/conf/httpd.confChange: #!/usr/bin/perl -wt
26、o:#!/usr/local/bin/perl wD. ModulesIf you got any complains about mod_perl, mod_deflate, mod_headers, mod_expires, one possibility is to find them, and link the modules to ensembl/modules directory:Find / -name mod_perlln -s mod_perl.so /usr/local/apache2/modules/mod_perl.soE. Edit /usr/local/ensemb
27、l/public-plugins/mirror/conf/ini-files/DEFAULTS.ini:DATABASE_WEBSITEDATABASE_HOST = mysql.mydomain.org ; DB server hostname/IP addressDATABASE_HOST_PORT = 3306 ;DB server TCP/IP portDATABASE_DBUSER = mysqluser ; DB read-only userDATABASE_DBPASS = ;DB read-only passwordDAS ProxyIf you wish to display
28、 external DAS sources on your ensembl installation, and are behind a firewall, then you will need to set a value for ENSEMBL_DAS_PROXY. This should probably be set in DEFAULTS.ini, as the proxy is likely to be the same for all species. The value should be your usual web proxy setting, e.g.ENSEMBL_DA
29、S_PROXY = http:/:80FontsInstall MS TrueType fonts for some of the images. sudo apt-get install msttcorefontsorsudo apt-get install ttf-mscorefonts-installerThese needs to be configured in the ENSEMBL_STYLE section of the DEFAULTS.ini file.ENSEMBL_STYLEGRAPHIC_FONT = arial ; Arial file is arial.ttfGR
30、APHIC_FONT_FIXED = cour ; Courier file is cour.ttfGRAPHIC_TTF_PATH = /usr/local/share/fonts/ttfonts/ ; remember the trailing slashGRAPHIC_FONTSIZE = 8 ; Default font-size for graphic textF. Species configAll the species and MUYIL.ini config files in directory /usr/local/ensembl/public-plugins/ensemb
31、l/conf/ini-files. Change their database names with the names in your MySQL database.G. Site Preparationmkdir logschown -R $ENSEMBL_USER:$ENSEMBL_GROUP .sudo apt-get install graphviz5. 允许执行 cgi 文件在 Ensembl/conf/httpd.conf 中加入$Directory“$ServerRoot/perl“ = Options = +ExecCGI,AddHandler = cgi-script .c
32、gi,AllowOverride = None,Order = allow,deny,Allow = from all,;6. 修改的文件(172.16.10.12 和 172.16.10.16)sudo vi /usr/local/share/perl/5.10.1/LWP/Protocol/http10.pm 34sudo vi /usr/local/Ensembl/ensembl-external/modules/Bio/EnsEMBL/ExternalData/DAS/SourceParser.pm 3167. 使用代理export http_proxy=http:/192.168.2
33、0.8:3128/8. 安装记录a) 8-16CFLAGS=-m64 -mtune=nocona ./Configure -des -A ccflags=-fPIC -Dprefix=/usr/local/bin/perl./Configure -des -A ccflags=-fPIC -Dprefix=/usr/local/ensembl8-22./Configure -des -A ccflags=-fPIC -Dprefix=/usr/bin8-23perlCFLAGS=-m64 -mtune=nocona ./Configure -des -A ccflags=-fPIC -Dpre
34、fix=/usr/local/bin/perlapache2./configure -enable-deflate -enable-headers -enable-expires -prefix=/usr/local/ensembl/apache2/home/power/httpd-2.2.19/modules/filters/mod_deflate.capxs2 -c /home/power/httpd-2.2.19/modules/filters/mod_deflate.c/home/power/httpd-2.2.19/modules/filters/.libs/mod_deflate.
35、sosudo cp -i /home/power/httpd-2.2.19/modules/filters/.libs/mod_deflate.so /usr/lib/apache2/modulesln -s libgdbm.so.3.0.0 /usr/lib/libgdbm.soTemplat:Plugin:Number:FprmatTemplate-Toolkit-2.22.tar.gzXML-DOM-1.44 XML-RegExp-0.03 libwww-perl-5.837.tar.gz URI-1.59XML-RSS-1.49 Test-Manifest-1.23 HTML-Pars
36、er-3.68 HTML-Tagset-3.20 DateTime-0.70.tar.gzcpan DateTime Perl-OSType-1.002 version-0.93 Module-Metadata-1.000005.tar.gz CPAN-Meta-YAML-0.002.tar.gz JSON:PP PARSE-CPAN-META Version-REquirement CPAN-Meta-2.11 8-17Class:DBI DBD:SQLite Data:Page SQL:AbstractTest:Pod UNIVERSAL/moniker.pmWriting Makefil
37、e for SQL:Abstract: Class:Accessor:Grouped Getopt:Long:Descriptive Test:Deep Test:WarnClass:Inspector Class:XSAccessor Sub:Name Test:MoreWriting Makefile for Getopt:Long:Descriptive: Sub:Install Params:Util Data-OptList Sub:ExporterWriting Makefile for SQL:Abstract:Tree:DAG_Node Test:NoWarnings Test
38、:Tester Test:Deep Test:Warn/GD-2.46: libgd 2.0.28 or higher download from http:/ ./configure , make, make installBio-Das-Lite-2.11: curl-7.21.7 WWW:Curl Readonly-1.03 8-18IO:Socket:INETXML-Atom-0.39: XML-XPath-1.13XML-LibXML-1.84: XML:SAX XML:NamespaceSupportcd /usr/local/ensembl/modules ln -s /usr/
39、lib/apache2/modules/*.somod_perl: sudo aptitude install libapache2-mod-perl2/home/power/mod_perl-2.0.5/src/modules/perl/mod_perl.c(ln -s /usr/local/bin/perl /usr/bin/perl/usr/lib/apache2/modules/mod_deflate.so)/usr/lib/apache2/modules/mod_perl.soetc/perletc/apache2/usr/bin/apxs2 /usr/bin/perlwarning
40、 mod_perl dso library will be built as mod_perl.so mod_perl 没有正确安装warning Youll need to add the following to httpd.conf:warningwarning LoadModule perl_module modules/mod_perl.sowarningwarning depending on your build, mod_perl might not live inwarning the modules/ directory.warning Check the results
41、ofwarningwarning $ /usr/bin/apxs2 -q LIBEXECDIRwarningwarning and adjust the LoadModule directive accordingly.powerTest:/mod_perl-2.0.5$ /usr/bin/apxs2 -q LIBEXECDIR/usr/lib/apache2/modulespowerTest:/mod_perl-2.0.5$perl -MCPAN -e shellinstall xxxxx编译 Perl 的话要安装下开发环境的ubuntu 默认是不带这个玩意的sudo apt-get ins
42、tall build-essentialperl 编译过程中会用它其他的软件包,但是 ubuntu 默认是不装此软件包的开发版的,所以你还要装上对应软件包的开发版本reinstall perl安装到/usr/local/bin/perl然后备份旧 perl 并ln -s /usr/local/bin/perl /usr/bin/perl通常在 PATH 环境变量里,/usr/bin 优先于/usr/local/bin.perl xxx 会使用/usr/bin/perl,而不是/usr/local/bin 的/usr/local/ensembl/conf/perl.startuphttp:/ww
43、w.cpan.org/modules/by-module/Apache2/mod_perl-2.0.5.tar.gztar zxf mod_perl-2.0.3.tar.gz | tar xvf -Perl ./Configure -des -Dprefix=/usr/localhttpd/usr/local/ensembl/apache2make3: * install-modules-yes Error 126有时会提示:找不到-lperl(其实 LINUX 下经常会提示/usr/bin/ld: cannot find -lXXX 的问题,解决方法都类似) 。解决办法:$locate li
44、bperl找到/usr/lib/libperl.so.你 perl 的版本$sudo ln -sf /usr/lib/libperl.so.你 perl 的版本 /usr/lib/libperi.so$sudo ldconfig8-22/etc/apache2/httpd.conf/home/power/httpd-2.2.19/docs/conf/httpd.conf/usr/local/apache2/conf/httpd.conf/usr/local/apache2/conf/original/httpd.conf/usr/local/ensembl/conf/httpd.conf/us
45、r/local/apache2/bin/httpd -d /usr/local/ensembl/sudo cp -i /usr/local/ensembl/modules/mod_perl.so /etc/apache2/modulespan_troglodytes_otherfeatures_63_21/usr/local/ensembl/public-plugins/mirror/conf/ini-files#!/usr/local/bin/perl -w/usr/lib/perl/usr/local/apache2/lib/perl/usr/local/lib/perl/usr/loca
46、l/share/perl/usr/local/ensembl/perl/usr/share/doc/perl/usr/share/doc/samba-doc/examples/scripts/shares/perl/usr/share/perl/usr/share/lintian/overrides/perl/usr/bin/perl/use/local/bin/perlDATABASE_WEBSITEUSER=mysqluser2PASS=helppassHOST=mysqlserver2PORT=4444sudo mysql -u root -p/usr/local/ensembl/con
47、f/perl.startup require “$ServerRoot/conf/perl.startup“:perl Makefile.PL -mysql_config=/etc/mysql/bin/mysql_config -testuser=root -testpassword=grace321mysql -uroot -pgrace321 ensembl_mart_63new(); print $im-can(“png“) ? “yes“ : “no“ , “n“; Ensembl 物种配置/usr/local/ensembl/public-plugins/ensembl/confna
48、no /usr/local/ensembl/ensembl-compara/scripts/das/compara_das.ini41-63/usr/local/ensembl/public-plugins/ensembl/conf/ini-files/MULTI.ini41-63/usr/local/ensembl/public-plugins/mart/conf/ini-files$ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesb) ensembl installation.txtperl Makefile.PL PREFIX=/etc/apache2/ MP_APXS=/etc/apache2/bin/apxs./configure -enable-deflate -prefix=/etc/apache2tar zxf httpd-2.2.