Have Skills, Will Travel Charles Armour

24Jun/095

CentOS 5.3 RoR Install

My Linux of choice is CentOS, owing mostly to its stability and very mature support base.  Even with that, it's actually pretty hard to find a good guide for installing a Ruby on Rails stack on CentOS 5.3.  Here are the commands I run on a clean VPS or server (works for i386 and x86-64):

yum -y install mysql mysql-devel mysql-server
yum install -y ruby ruby-ri ruby-rdoc ruby-libs ruby-devel
yum -y install zlib zlib-devel openssl openssl-devel

chkconfig mysqld on
service mysqld start
mysql

yum groupinstall -y 'Development Tools'
yum update -y

wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz
tar zxvf rubygems-1.3.4.tgz
cd rubygems-1.3.4
ruby setup.rb 

gem install mysql -- --with-mysql-config=/usr/bin/mysql_config

I hope this saves someone just a bit of time, let me know if you have any trouble.

Comments (5) Trackbacks (2)
  1. Oh my, I almost forgot. Will get those instructions up today! Stay tuned!

  2. Looking forward to the ‘guide on setting everything up’, as I have previously been developing RoR on Ubuntu, but CentOS seems to be much more secure for a production environment.

  3. Stay tuned for a guide on setting everything up on CentOS 5.3 with Apache or Mongrel included!

  4. Nice. Just what I was looking for. Thanks!

  5. A few notes:
    * You should reboot after the ‘yum update -y’.
    * The ‘mysql’ command is to set up users and passwords, info here: http://dev.mysql.com/doc/refman/5.1/en/adding-users.html


Leave a comment