Skip to content

Instantly share code, notes, and snippets.

@michealbenedict
Created February 13, 2012 01:58
Show Gist options
  • Save michealbenedict/1812727 to your computer and use it in GitHub Desktop.
Save michealbenedict/1812727 to your computer and use it in GitHub Desktop.
rails stack
# main packages
sudo apt-get install build-essential libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
# create new generic deployer account
$ sudo useradd deployer
# add user to a group
$ ##
# add him to sudoers list
$ sudo vi visudoer
# change user to deployer
$ su deployer
# create /mnt/deploy folder
$ sudo mkdir /mnt/coursly/
# pre for ruby 1.9.3
# install ruby 1.9.3
$ wget -c http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz && tar -xvf ruby-1.9.3-p0.tar.gz
$ ./configure
$ make && sudo make install
# check for ruby version
$ ruby --version
$ gem --version
# install rails gem
$ sudo gem install rails
# pre for nginx
$ sudo apt-get install libpcre3-dev libssl-dev
# pre for mysql gem
$ sudo apt-get install libmysqlclient-dev
# install passenger with nginx
$ passenger-install-nginx-module
# mention nginx source code
# mention wher to install
# fire up nginx
# write service start/end scripts for nginx
# remove nginx start | stop links
$ sudo /usr/sbin/update-rc.d -f nginx remove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment