CentOS 5.3 RoR Install

24
Jun
7

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.

Enjoy this article?

Consider subscribing to our RSS feed!

7 Comments

  1. Charles
    4:07 pm on June 25th, 2009

    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

  2. mcfeely
    12:07 am on July 17th, 2009

    Nice. Just what I was looking for. Thanks!

  3. Charles
    12:54 am on July 17th, 2009

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

  4. Andy
    3:43 pm on August 7th, 2009

    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.

  5. Charles
    4:12 pm on August 7th, 2009

    Oh my, I almost forgot. Will get those instructions up today! Stay tuned!

Leave a comment

You must be logged in to post a comment.