Currently, the installation procedure occurs through the SVN repository checkout. The files for CNV images are quite large, so it is not recommended to checkout the whole repository at once. Separate downloadable tarballs will be created once all the files in the repository have stabilized.
AWS instance installation.
~10 GB root
make sure to add nofail to /etc/fstab volumes otherwise you will be unable to get a shell on AWS if any disk fails to mount at startup.
# LABEL=/ / ext4 defaults,noatime 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/xvdf1 none swap sw 0 0 /dev/xvdg1 /disk1 ext4 defaults,nofail 0 2 /dev/xvdh1 /disk2 ext4 defaults,nofail 0 2 /dev/xvdi1 /disk3 ext4 defaults,nofail 0 2
Install prerequisites:
sudo yum update -y sudo yum groupinstall -y "Web Server" "Perl Support" sudo yum install svn sudo yum groupinstall -y "Web Servlet Engine" "MySQL Database" "Development tools" sudo yum install R-core.x86_64 sudo yum install R-core-devel.x86_64 sudo yum install libxml2-devel.x86_64
Modify Apache
sudo vi /etc/httpd/conf/httpd.conf
add FollowSymLinks to cgi-bin
<Directory "/var/www/cgi-bin"> AllowOverride None Options FollowSymLinks Order allow,deny Allow from all </Directory>
increase timeout limit to 600
# Timeout: The number of seconds before receives and sends time out. # Timeout 600
On OSX, add the Timeout parameter to /etc/apache2/httpd.conf
Start Apache
sudo service httpd start #set to automatically run on startup sudo chkconfig httpd on chkconfig --list httpd
on OSX
sudo /usr/sbin/apachectl restart
Set up web
checkout the repository into a web folder
sudo svn checkout svn://svn.code.sf.net/p/cellx/code/web web
change permissions
sudo chown -R ec2-user web sudo chgrp -R apache web sudo chmod -R 775 web
create symbolic links.
cd /var/www/html # make a tmp dir here sudo mkdir tmp sudo chmod 777 tmp/ # symbolic link where you installed the web repository to RPPA sudo ln -s /disk1/web/var/www/html/RPPA/ RPPA cd RPPA sudo ln -s /disk1/web/var/www/cgi-bin/RPPA/rlib/ rlib cd /var/www/cgi-bin/ sudo ln -s /disk1/web/var/www/cgi-bin/RPPA/ RPPA
Configure Perl
sudo cpan install Statistics::Descriptive install Data::Table
Config CELLX
cd /var/www/cgi-bin/RPPA/lib/ sudo vi cellx_config.pl
Config mysql
#start mysql sudo service mysqld start sudo chkconfig mysqld on #set root sudo mysqladmin -u root password NEWPASSWORD # login to mysql mysql> create database cellx; Query OK, 1 row affected (0.00 sec) mysql> CREATE USER 'cellx'@'localhost' IDENTIFIED BY 'mypassword'; Query OK, 0 rows affected (0.00 sec) # read only user mysql> GRANT SELECT ON cellx.* TO 'cellx'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
Loading the database
Database restoration typically uses sql dumps from the mysqldump utility. However, this method has proven impractical for AWS RDS because the time takes days, incurs hundreds of millions of transaction costs, and often chokes when it gets to the expression table.
Consequently I had created table dumps and a loader script to load directly from a local file. This has the effect of loading faster until it chokes on the expression table.
My conclusion is that the AWS RDS service cannot be effectively utilized for CELLX. Instead, I have provided the pre-indexed MyISAM tables that one merely needs to copy into the correct location and the database is immediately ready for queries.
#expand mysql tar (~45 GB space needed) obtain the database tarball from the files download section of sourceforge. #shutdown mysqld sudo service mysqld stop # remove the old db cd /var/lib/mysql/ sudo rm -rf cellx/ #symbolic link cellx database, or copy files sudo tar zxvf /disk1/database/cellx.tar.gz # change permissions to mysql sudo chown -R mysql cellx/ sudo chgrp -R mysql cellx/ sudo chmod -R 755 cellx/ sudo ln -s /disk2/cellx/ cellx #restart mysqld sudo service mysqld start
Tomcat
# checkout the Rserve code sudo svn checkout svn://svn.code.sf.net/p/cellx/code/src src # copy libraries sudo cp src/rserve/lib/*.jar /usr/share/tomcat6/lib/ # copy web app sudo cp src/rserve/Rserver/deploy/Rserver.war /usr/share/tomcat6/webapps/ # start tomcat sudo service tomcat6 start sudo chkconfig --level 345 tomcat6 on
Install Rserve
sudo R CMD INSTALL src/rserve/Rserve_0.5-3.tar.gz # edit src/rserve/Rserver/etc/rserve.config sudo cp src/rserve/Rserver/etc/rserve.config /etc/ # install R libraries sudo R # at R prompt source("http://bioconductor.org/biocLite.R") biocLite('gplots') biocLite('genefilter') biocLite("mixtools") # start R serve cd src/rserve sudo R CMD Rserve --RS-conf Rserv.conf