====== production server centos 6.5 ====== ====== Software Components ====== * Web Server: Apache (Server version: Apache/2.2.21) * Application Programming Language: Ruby -1.9.3-p550 * Code Deployment: Capistrano capistrano -v=2.15.4 * gem 1.8.29 * Apache_OpenOffice_4.0.1_Linux_x86-64 ===== Local gems installed ===== * bundler (1.6.2) * capistrano (2.9.0) * capistrano-ext (1.2.1) * daemon_controller (1.2.0) * daemons (1.1.9, 1.0.10) * god (0.13.3) * highline (1.6.21) * net-scp (1.2.1) * net-sftp (2.1.2) * net-ssh (2.9.1) * net-ssh-gateway (1.2.0) * passenger (4.0.44) * rack (1.5.2, 1.1.0) * rake (10.3.2, 0.8.7) * rmagick (2.13.3) In addition to above, all other software listed in the software installation page required for the working of the application is installed. \\ ====== Installation steps Below ====== To save all installation files \\ mkdir /soft mkdir /opt/ruby-1.9.3 ===== os Update ===== yum update ==== Add user ==== adduser expprodl ======Iptables off ====== chkconfig iptabes off chkconfig ip6tables off ===== Add Epel Repo ===== yum install epel-release -y ===== Disable selinux ===== sed -i 's/enforcing/disabled/g' /etc/selinux/config ===== Basic need packages for setup ===== yum install nano lynx wget vim at zip unzip bzip2 -y yum groupinstall "Development Tools" -y yum groupinstall "Additional Development" -y ===== For XVFB service ===== yum install xorg-x11-server-Xvfb -y ==== memcached ==== rpm -ivvh memcached-1.4.5-1.el5.x86_64.rpm ===== Remove postfix & install sendmail ===== yum remove postfix yum install sendmail chkconfig sendmail on ====install openssl ==== mv /usr/bin/openssl /usr/bin/openssl.old cd /soft && wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz cd /usr/bin/&&mv openssl openssl.old cd /soft && tar -xvf openssl-1.0.1j.tar.gz && cd openssl-1.0.1j&&./config && make && make install cd /usr/bin/ ln -s /usr/local/ssl/bin/openssl openssl yum install openssl-devel -y yum install pcre pcre-devel -y === change time zone === rm /etc/localtime ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime ===== sudo rights for user ===== vi /etc/sudoers (add below lines) \\ Cmnd_Alias APACHE = /opt/apache2/bin/apachectl, /bin/vi /opt/apache2/conf/httpd.conf Cmnd_Alias MYSQL = /sbin/service mysql stop, /sbin/service mysql start, /sbin/service mysql status, /sbin/service mysql restart Cmnd_Alias IPTABLES = /sbin/service iptables stop, /sbin/service iptables start, /sbin/iptables expprodl ALL= NOPASSWD: APACHE, MYSQL, IPTABLES ====== Install apache ====== cd /soft tar xvf httpd-2.2.21.tar cd /soft/httpd-2.2.21 ./configure --prefix=/opt/apache2 --enable-mods-shared=most --enable-ssl --enable-usertrack --enable-unique-id --with-included-apr --with-pcre=/usr/bin/pcre-config make make install echo 'export APXS2=/opt/apache2/bin/apxs' >> /etc/profile.d/crossbow.sh echo ServerName "example.learnexa.com" >> /opt/apache2/conf/httpd.conf sed -i '/unique_id_module/ s/^/# /' /opt/apache2/conf/httpd.conf /opt/apache2/bin/apachectl start ====== Install Apache modules ====== cd /soft tar xvf apache-upload-progress-module.tar cd /soft/home/expbbbu/softrepo/app/installed-software/apache-upload-progress-module/ && /opt/apache2/bin/apxs -c -i -a mod_upload_progress.c ===== Install Ruby 1.9.3 ===== cd /soft wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p550.tar.gz wget ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/6/x86_64/libyaml-0.1.6-1.el6.x86_64.rpm wget ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/6/x86_64/libyaml-devel-0.1.6-1.el6.x86_64.rpm yum install libyaml*.rpm -y cd /soft/ && tar xvf ruby-1.9.3-p550.tar.gz && cd /soft/ruby-1.9.3-p550 && ./configure --prefix=/opt/ruby-1.9.3 && make && make install gem update --system 1.8.29 gem --version gem install passenger -v=4.0.44 /opt/ruby-1.9.3/bin/passenger-install-apache2-module gem install bundler -v=1.6.2 gem install rack -v "1.5.2" gem install god -v=0.13.3 gem install capistrano -v=2.15.4 gem install capistrano-ext -v=1.2.1 bundle config build.nokogiri --use-system-libraries gem install nokogiri -- --use-system-libraries -v='1.6.3.1' ====== Jre ====== cd /soft && wget http://uni-smr.ac.ru/archive/dev/java/JRE/7/JRE-7.45/jre-7u45-linux-x64.rpm yum install jre-7u45-linux-x64.rpm ====== Install OpenOffice ====== tar -xvf /soft/Apache_OpenOffice_4.0.1_Linux_x86-64_install-rpm_en-US.tar.gz && cd /soft/en-US/RPMS && yum localinstall *.rpm --nogpgcheck -y If want manual to check status below command \\ /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard& ===== verify ===== netstat -anp | grep 8100 ===Install Subversion === yum install subversion -y yum install pcre-devel imagemagick imagemagick-devel git mutt gcc gcc-c++ libxml2 libxml2-devel libxslt-devel libxslt mysql-devel make ==== Application Setup ==== Download Precompiled binaries and scripts \\ cd /home/expprodl wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/crossbowsoft/*.zip #unless this is a build server rm crossbow.zip === Install the /home/expprodl/app folder === This includes redis and Juggernaut (required for Chat functionality to work) \\ cd /home/expprodl unzip app.zip rm app.zip ===Install the /home/expprodl/bin folder=== This includes the init script for chat, deploy specific scripts such as backup, solr restart etc \\ cd /home/expprodl unzip bin.zip rm bin.zip ===Install crossbow application root skeleton=== cd / wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/deploystructure/deploy.zip unzip deploy.zip chown -hR expprodl.expprodl deploy rm deploy.zip ====== Folder Permissions ====== chown -R expprodl:expprodl /opt/ruby-1.9.3 chown -R expprodl:expprodl /home/expprodl chown -R expprodl:expprodl /opt/openoffice4/ ====== Scripts and Processes ====== ===== Apache ===== cd ~/bin ./apache_sss.sh [stop|start|restart|status] ## Use one of the 4 options ==== God ==== God controls and monitors the following processes \\ * memcached * Xvfb * openoffice * rufus (dependent on DB) cd /deploy/systasks ./god.sh [stop|start|restart|status] ## Use one of the 4 options god is stopped before code deployment and started after the code deployment by the cap scripts, will normally won't need to handle manually. \\ ====== Code Deployment ====== Follow instructions link running_the_deployment_scripts [[https://wiki.exphosted.com/doku.php/qastageandproductiondeployment]]