1. Install epel source.
cd /tmp wget http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm rpm -ivvh epel-release-5-4.noarch.rpm
2. Update system
yum update -y
yum groupinstall "development libraries" "development tools" -y yum install gcc gcc-c++ make libtool libxml libxml-devel libxslt libxslt-devel subversion curl-devel java-1.7.0-openjdk java-1.7.0-openjdk-devel git-core openssl-devel -y ==== Install Database ==== 1. Create a dedicated group and user <code> groupadd mysql useradd -r -g mysql mysql
2. Fetch and Install mysql 5.5 RPM
cd /tmp wget http://dev.mysql.com/get/mysql-community-release-el5-5.noarch.rpm rpm -ivvh mysql-community-release-el5-5.noarch.rpm yum install mysql-server mysql-devel -y sudo /usr/bin/mysql_install_db sudo chown -hR mysql:mysql /var/lib/mysql /var/run/mysql sudo /usr/bin/mysql_secure_installation #y,y,y,y,y chkconfig mysql on
1. Verify that java is installed
java
2. Add tomcat User and Unpack tomcat
mkdir /opt/tomcat7 groupadd tomcat useradd -m /opt/tomcat7 -g tomcat tomcat cd /opt/tomcat wget --user=expbbbu --password=<RETRACTED> ftp://qacollab01.exphosted.com/softrepo/tincan/installed-software/apache-tomcat-7.0.54.tar.gz | tar xz chown -r tomcat:tomcat /opt/tomcat
Init script.
#!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 #JAVA_HOME=/usr/java/jdk1.7.0_05 #export JAVA_HOME #PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/opt/tomcat7/bin case $1 in start) /bin/su tomcat $CATALINA_HOME/startup.sh ;; stop) /bin/su tomcat $CATALINA_HOME/shutdown.sh ;; restart) /bin/su tomcat $CATALINA_HOME/shutdown.sh /bin/su tomcat $CATALINA_HOME/startup.sh ;; esac exit 0
chown +x /etc/init.d/tomcat7 chmod 755 /etc/init.d/tomcat7 chkconfig --add tomcat chkconfig tomcat on
3. Unpack solr
mkdir /opt/solr && cd /opt/solr wget --user=expbbbu --password=<RETRACTED> ftp://qacollab01.exphosted.com/softrepo/tincan/installed-software/solr-4.8.1.zip unzip solr-4.8.1.zip cp -r solr/example/lib/ /opt/tomcat/lib/ chown -r tomcat:tomcat /opt/solr 4. Configure Solr - Data Dir: <code> nano /opt/solr/example/solr/conf/solrconfig.xml
Create a shared data or a local data drive and set the path here.
Also, copy Learnexa schema.xml.
# for multicore cd /opt/tomcat7 mkdir -p Catalina/localhost nano solr.xml
Then add:
<Context docBase="/opt/solr/example/solr/webapp/solr.war" debug="0" crossContext="true"> <Environment name="solr/home" type="java.lang.String" value="/opt/solr/example/solr" override="true" /> </Context>
/usr/sbin/adduser "expdev01" #set regular password
1. Ensure:
whoami #expdev01
2. Install RVM
\curl -sSL https://get.rvm.io | bash
3. Install and use Ruby 2.1.1
rvm install 2.1.1 rvm use 2.1.1
4. Verify
which ruby #/home/expdev01/.rvm/rubies/ruby-2.1.1/bin/ruby
gem install bundler -v '1.11.2' gem install eventmachine -v '1.0.3' gem install mysql2 -v '0.3.15' gem install nokogiri -v '1.5.9' gem install passenger -v 4.0.44
passenger-install-nginx-module
1. Create directory structure /deploy
svn co https://repos.exphosted.com/svnrepos/tincan/trunk tincan_trunk cd tincan_trunk bundle install bundle exec rake db:create bundle exec rake db:migrate bundle exec rake db:seed bundle exec rake sass:update (//sass --update public/stylesheets/sass:public/stylesheets --force// if the rake task is not present) bundle exec rake asset:packager:build_all vi config/environments/development.rb >> APP_URL = "http://115.111.5.122:3101" API_URL = "http://localhost:3000"