theKindOfMe

September 28, 2010

Installing rvm/ruby 1.9/mysql2/passenger on CentOS 5.3

Filed under: Uncategorized — Tags: , — yasi8h @ 2:40 am

Things will get a lot easier if you add some custom repos to your installation like http://fedoraproject.org/wiki/EPEL/FAQ#howtouse.

* Install git (sudo yum install git)
* Install curl (sudo yum install curl)
* If you want to install ruby 1.9 through rvm (meaning if you want to compile it by source) you need to install a newer version of autoconf (something thats higher than 2.6 where as CentOS 5.3 comes with 2.59).

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.gz
tar xvzf autoconf-2.63.tar.gz
cd autoconf-2.63
./configure –prefix=/usr
make
sudo make install
cd ..

from: http://www.openflowswitch.org/wk/index.php/CentOS_Install

* Install rvm (follow their official instructions).
* Install 1.8.7 first. Then go on to installing 1.9 (or whatever you want to. But additional rubies might have additional dependencies like jruby -> java).

* Installing mysql (sudo yum install mysql-server mysql mysql-devel ruby-mysql)

* Install chkconfig (sudo yum install chkconfig)

* start msql on startup (sudo /sbin/chkconfig –levels 235 mysqld on from:http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-5.3-lamp)

* Install the mysql2 gem (gem install mysql2)

* Install apache2 (sudo yum install httpd)

* Start apache on start up (sudo /sbin/chkconfig –levels 235 httpd on)

* Start apache and mysql (sudo /etc/init.d/mysql start, sudo /etc/init.d/httpd start)

* Install the needed deps for passenger (sudo yum install httpd-devel apr-devel )

* Note that you don’t actually need to install Apache Portable Runtime (APR) development headers its already there.

* Install passenger (follow the instructions on how to install passagner with rvm).

* I got a error while running apache with passenger. So to make it work i turned off selinux (look at this link on how to do that). Not ideal but it works :P.

* Done!

Advertisements

3 Comments »

  1. very helpful article.
    awesome 🙂

    Comment by doppelhl — October 8, 2010 @ 1:34 am

  2. Turning off SELinux is not a solution.
    You might wanna check http://wiki.centos.org/HowTos/SELinux#head-faa96b3fdd922004cdb988c1989e56191c257c01

    CentOS is great by the way, I’m using it for years 🙂

    Comment by tehif — October 22, 2010 @ 3:47 pm

    • @tehif
      Ture, i accept it. I am lazy :).

      One of my friends told me the same thing. But i am from apt world 😉 so pretty new to centos and all. Thanks for the pointer.

      Comment by yasi8h — October 23, 2010 @ 12:40 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: