OS - CENTOS 6.5 64-bit
Please follow the instructions from the link below, except for ruby, rubygems, passenger and capistrano.
https://wiki.exphosted.com/doku.php/setup_an_app_server
If the same server is being used as db please install mysql and solr.
https://wiki.exphosted.com/doku.php/setup_db_server
If the same server is being used for Chat please install juggernaut and node.
https://wiki.exphosted.com/doku.php/setup_other_roles#chat_role
Install memcache if it is not shared with any other server.
https://wiki.exphosted.com/doku.php/setup_other_roles#memcached_role
First , remove any existing ruby versions. On our app servers REE1.8.7 could have been installed. So, please remove them. If ruby was installed through the instructions mentioned above. All, you need to do is
sudo mv /opt/ruby-enterprise-1.8.7-2011.03 ruby-enterprise-1.8.7-2011.03_removed
Otherwise, please remove all the executables of ruby, gem, rake, irb, passenger and etc..
Make yourself root
su root
#update or install libyaml yum insyall libyaml #Install ruby cd /opt wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p550.tar.gz tar xzvf ruby-1.9.3-p550.tar.gz cd ruby-1.9.3-p550 ./configure --prefix=/opt/ruby-1.9.3 make make install echo 'pathmunge /opt/ruby-1.9.3/bin' >> /etc/profile.d/crossbow.sh logout
Now login and verify if ruby -v returns the correct version.
gem update --system 1.8.29
gem install passenger -v=4.0.44
Make changes to the apache config file. (Config file remains same as the one used for ruby 1.8.7 REE's passenger 3 but the following lines need to be modified.
#LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
LoadModule passenger_module /opt/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/passenger-4.0.44/buildout/apache2/mod_passenger.so
LoadModule upload_progress_module modules/mod_upload_progress.so
<IfModule mod_passenger.c>
PassengerRoot /opt/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/passenger-4.0.44
PassengerDefaultRuby /opt/ruby-1.9.3/bin/ruby
</IfModule>
#RailsFrameworkSpawnerIdleTime 0
PassengerMaxPreloaderIdleTime 0
#RailsAppSpawnerIdleTime 0
PassengerMaxPreloaderIdleTime 0
### End Passenger tuning##
#RailsAutoDetect off
If the following gems are already installed, please uinstall them using “gem uninstall <gemname>” command and reinstall.
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
yum install libxml2 libxml2-devel (2.9.0-4) bundle config build.nokogiri --use-system-libraries gem install nokogiri -- --use-system-libraries -v='1.6.3.1'
bundle config build.RedCloth --with-cflags=-w gem install RedCloth -v='4.2.9'
Change /deploy/crossbow/shared/config/database.yml “adapter” to mysql2 in all the needed stanzas.
Change /deploy/crossbow/shared/config/god/generic_monitoring.god to update the bundle paths to /opt/ruby-1.9.3/bin/bundle from /usr/local/bin/bundle
Please update the capistrano config files as needed. Refer the link below for more information.
https://wiki.exphosted.com/doku.php/qastageandproductiondeployment#deployment_steps
If you are using a fresh database for the current app setup, run the following task in the app directory
bundle exec rake db:seed RAILS_ENV=<environment>