Created
October 11, 2013 15:24
-
-
Save saikiranmothe/6936633 to your computer and use it in GitHub Desktop.
passenger + nginx+rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install rvm | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
# install ruby 1.9.2 + some global gems | |
rvm install 1.9.2 | |
rvm use 1.9.2@global | |
gem install awesome_print map_by_method wirble bundler builder pg cheat | |
gem install -v2.1.2 builder | |
# install Rails | |
rvm gemset create rails3 | |
rvm use 1.9.2@rails3 --default | |
gem install rails | |
# install passenger + nginx | |
gem install passenger | |
passenger-install-nginx-module # press Enter to accept, then choose option 2 in order to compile nginx with ssl support | |
# configure nginx startup script | |
sudo mkdir /opt/nginx/init.d | |
sudo wget --no-check-certificate http://github.com/ascarter/nginx-ubuntu-rvm/raw/master/nginx -O /opt/nginx/init.d/nginx | |
sudo chmod +x /opt/nginx/init.d/nginx | |
sudo ln -s /opt/nginx/init.d/nginx /etc/init.d/nginx | |
sudo /etc/init.d/nginx start | |
sudo /etc/init.d/nginx status | |
sudo /etc/init.d/nginx stop | |
sudo /usr/sbin/update-rc.d -f nginx defaults | |
# remind user to setup rvm group -- run "rvm requirements" for more info | |
echo Remember to add new sudo user to "rvm" group as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment