Ruby On Rails with Nginx With Passenger Deployment?
Ruby Installation
#sudo apt-get update
#sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
#wget http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz
#tar -xzvf ruby-2.2.3.tar.gz
#cd ruby-2.2.3/
#./configure
#make
#sudo make install
#ruby -v
Rails Installation
Since Rails ships with so many dependencies these days, we're going to need to install a Javascript runtime like NodeJS. This lets you use Coffeescript and the Asset Pipeline in Rails which combines and minifies your javascript to provide a faster production environment.
To install NodeJS, we're going to add it using a PPA repository:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
gem install rails -v 4.2.4
MongoDB Installation
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org=2.6.2 mongodb-org-server=2.6.2 mongodb-org-shell=2.6.2 mongodb-org-mongos=2.6.2 mongodb-org-tools=2.6.2
Postgre Installation
Refer : http://www.saintsjd.com/2014/08/13/howto-install-postgis-on-ubuntu-trusty.html
sudo apt-get install postgresql postgresql-contrib libpq-dev
sudo -i -u postgres
psql
set password:
alter user postgres with password 'welcome';
create database ott_services_db;
Nginx with Passenger Installation
gem install passenger
sudo passenger-install-nginx-module
sudo service nginx start
if error “nginx: unrecognized service”
# Download nginx startup script wget -O init-deb.sh https://www.linode.com/docs/assets/660-init-deb.sh # Move the script to the init.d directory & make executable sudo mv init-deb.sh /etc/init.d/nginx sudo chmod +x /etc/init.d/nginx
To Start nginx.conf from project dir:
sudo /opt/nginx/sbin/nginx -c /root/testapp/nginx.conf
Comments
Post a Comment