Ruby on Rails Installation Script

cd /usr/src
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz
tar -xzvf ruby-1.8.5.tar.gz
cd ruby-1.8.5/
./configure
make
make test
make install
cd /usr/src
wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
tar -zxvf rubygems-0.8.11.tgz
cd rubygems-0.8.11
ruby setup.rb
gem update
gem install rails –include-dependencies
rails /usr/local/rails
mv /usr/local/rails/public/.htaccess /usr/local/rails/public/.htaccessfile
echo “RewriteBase /rails” > /usr/local/rails/public/.htaccess
cat /usr/local/rails/public/.htaccessfile >> /usr/local/rails/public/.htaccess
mv /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conffile
echo “Alias /rails /usr/local/rails/public” > /usr/local/apache/conf/httpd.conf
cat /usr/local/apache/conf/httpd.conffile >> /usr/local/apache/conf/httpd.conf
cd /usr/local/cpanel/apache
/usr/local/apache/bin/apxs -iac mod_log_bytes.c
/usr/local/apache/bin/apxs -iac mod_bwlimited.c
/usr/local/apache/bin/apxs -iac mod_bandwidth.c
/etc/rc.d/init.d/httpd restart

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