Installing Rails 3 on Centos with Apache

This article details a quick install routine I use to get Ruby 1.9.2, Rails 3, Apache,Passenger and Mysql onto a Centos box for development.You don’t need anything special other than a text editor, I use Nano, about 45 minutes and root access.

Please note this install is not tested on any other platform than Centos 5.5.

Starting from a completely fresh Centos install:

#yum install httpd-devel openssl-devel zlib-devel gcc gcc-c++ curl-devel expat-devel gettext-devel mysql-server mysql-devel –y

Install Ruby 1.9.2 

# cd /usr/local/src
# curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
# tar zxvf ruby-1.9.2-p180.tar.gz
# cd ruby-1.9.2-p180.tar.gz
# ./configure --enable-shared --enable-pthread
# make
# make install
# cd ext/zlib/
# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
# cd ../../
# make
# make install

[Read more…]