Overview
We'll be installing a full rails stack without apache on ubuntu dapper:
Make sure you download the latest version of nginx, ruby and the other components. Don't just blindly copy/paste the code snippets or your precious rails stack will be obsolete in a New York minute.
Okay, let's get messy.
Preparations
Start by enabling the Ubuntu Universe repository and updating your package sources:
sudo nano /etc/apt/sources.listUncomment the lines containing 'universe'. Save and exit.
Update the package sources:
sudo apt-get updateMySQL and friends
sudo apt-get install mysql-server mysql-common mysql-client libmysqlclient15-dev libmysqlclient15off
sudo mysqladmin -u root password newrootsqlpassword
sudo apt-get install libmysql-rubyGCC compilers and dev tools.
sudo apt-get install build-essential libpcre3-devRuby and friends
sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb- On ubuntu dapper, you'll have to install the ruby gems system by downloading it from sourceforge and running
./setup.rb. - On ubuntu edgy, you can just install ruby gems with
apt-get.
Mongrel and mongrel_cluster
sudo gem install daemons gem_plugin mongrel mongrel_cluster --include-dependenciesRails
sudo gem install rails --include-dependenciesImageMagick
sudo apt-get install libxml2-dev libmagick9-dev imagemagick
sudo gem install rmagickNginx
Download nginx into a temp directory, unpack and install:
wget http://sysoev.ru/nginx/nginx-0.5.14.tar.gz
tar -xzvf nginx-0.5.14.tar.gz
cd nginx-0.5.14
./configure --sbin-path=/usr/local/sbin
make
sudo make install
sudo chmod +x /usr/local/sbin/nginxAll done. Have fun.
Comments