Praji’s Weblog

Welcome to praji’s world

Archive for May 2009

Cpanel Hangs on Update

leave a comment »

Reason for hang up : RPM database could be corrupted, it needs to be rebuild and run upcp again

Procedure1. Login to CLI via SSH
2. Kill any /scripts/upcp process or yum or up2date
killall upcp
killall yum
killall up2date
3. you can try getting the PID also by doing this
ps -wef |grep yum
ps -wef |grep upcp
ps -wef |grep up2date
4. Execute a force kill command through kill -9
5. Once everything is killed , go to /var/lib/rpm
6. Execute rm -f __* , this is the rpm database that it builds when cpanel updates
7. Run rpm –rebuilddb
8. Re-run /scripts/upcp –force (–force switch forces cpanel update even if it is up to date)
9. Constantly check for Changelogs


Written by praji

May 26, 2009 at 1:11 pm

Posted in Uncategorized

Install Ruby on CPanel

leave a comment »

If you are using CPanel 11 (the latest version available at this time) you can easily install ruby on your system using CPanel. Previously, you had to do this using operating system packages or manually from sources. Now, we can just run /scripts/installruby and this will do everything for us:

  • download, compile and install ruby
  • download and install RubyGems and some gems like rails and mongrel

At this time it will install the latest 1.8 ruby:
ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]

and the following gems (using rubygems-1.1.1):
gem list
actionmailer (2.1.0)
actionpack (2.1.0)
activerecord (2.1.0)
activeresource (2.1.0)
activesupport (2.1.0)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.1)
gem_plugin (0.2.3)
mongrel (1.1.5)
rails (2.1.0)
rake (0.8.1)

This should be enough for running ruby scripts, but if you want to use Ruby On Rails from within CPanel then you just have to complete this by running /usr/local/cpanel/bin/ror_setup. If you are interested to deploy RoR environments on CPanel you can do this from inside CPanel. For more information check out the CPanel docs.

Written by praji

May 15, 2009 at 12:48 am

Posted in Uncategorized