chkservd missing from CPanel / Centos

On a fresh Centos server with CPanel installed it seems that chkservd was not running. chkservd is a little CPanel utility that allows you to check from WHM what applications it will monitor, and in case there is a problem with any of those services it will restart it and send a notification to the administrative account. If for some reason chkservd was not installed during the initial installation process of CPanel we can reinstall it later by running:

/usr/local/cpanel/bin/chkservd-install

But running this on this Centos system can given the following error:

Unable to locate chkservd init script for OS CentOS 4.3

It seems that the install script is checking the OS installed. A quick look inside the script will show us that this is done using some internal CPanel function:

$os = Cpanel::cPanelFunctions::getos();

To solve this, without changing the internal CPanel scripts, was to make it think that this is one of the supported systems and since Centos4, is basically RHEL4, I changed the distribution banner to RHEL, this way:

/etc/redhat-release
CentOS release 4.3 (Final)

#change from:
“CentOS release 4.3 (Final)”
#change to
“Red Hat Enterprise Linux ES release 4”

After this change, the install script ran without any error and installed chkservd properly and it started it ok. I then changed the banner back to the original statement.

This could have been done also by copying the init scripts from redhat:


/usr/local/cpanel/src/chkservd/init/chkservd.init.redhat

and renaming them


/usr/local/cpanel/src/chkservd/init/chkservd.init.centos…

After this chkservd is running just fine on this Centos server and it can be configured from WHM (Service Configuration >> Service Manager) as on any other CPanel system.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.