Archive for February, 2008

The following error has been reported while doing yum updates on CentOS 4.x systems:

--> Processing Dependency: glibc-common = 2.3.4-2.25 for package: glibc-dummy-centos-4

--> Finished Dependency Resolution

Error: Missing Dependency: glibc-common = 2.3.4-2.25 is needed by package glibc-dummy-centos-4

To fix this error, the the following commands:


yum remove glibc-dummy-centos-4
yum install gcc & yum install gcc*
yum update

To our surprise a bad yum release hosed several of our systems.  While the errors varied, the common link between them was the frightful message:

rpmdb: PANIC: fatal region error detected; run recovery

This problem can usually be corrected by running the following commands:

cd /var/lib/rpm

rm -f __db*

rpm –rebuilddb -vv

Upon upgrading the Linux Kernel version (usually in CentOS 4.6 - 5) you may get the following error when trying to start APF:

Unable to load iptables module (ipt_state), aborting.

To fix this, open /etc/apf/internals/functions.apf and locate the following lines:

ml ipt_state 1
ml ipt_multiport 1

And replace them with:

ml xt_state
ml xt_multiport

Then restart APF.

Apache by default puts a “signature” at the end of error pages and directory listings…here is an example of what this looks like:

Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7a DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5 Server at missysadmin.com Port 80

Now, some people may not want to broadcast what type of server they are running or what’s on it, for reasons of security.  You can easily disable this in your httpd.conf file:

ServerSignature Off

service httpd restart

http://www.v-nessa.net/2008/02/01/how-to-add-services-to-chkservd


Chkservd is the service in cPanel that checks to make sure that services are running, then restarts them if necessary. It’s also responsible for the ‘Service Manager’ section in cPanel, which is an interface where added services can be easily checked on and off.

To add a new service, create a line in /etc/chkserv.d/chkservd.conf in the same format as the others:

service:1

1 means the service should be enabled, 0 means it’s off.

In /etc/chkserv.d each service has its own file. Create a file called as the name of the service you are monitoring. The contents of the file are in the format of:

#SERVICE = PORT, SEND, RESPONSE, RE-START COMMAND

There are two ways that cPanel checks services with chkservd:

  • Connection-based monitoring - By default, cPanel will try to connect to the service’s specified port, issue a command, and if a response is received within 10 seconds it will consider the service to be online. For instance, FTP:
service[ftpd]=21,QUIT,220,/scripts/restartsrv_ftpserver
  • Process-based monitoring - cPanel will check for a specific process to determine whether it is online. For instance, named:
service[named]=x,x,x,/scripts/restartsrvr_bind,named,named|bind

If you have more than one restart command, you can separate them with semicolons in order of preference that they should be run. Output of these commands will be logged to the chkservd.log
After you’ve created the service’s configuration file, restart chkservd:

/etc/init.d/chkservd restart

You should then see the service listed in WebHost Manager in the ’service manager section’

Chkservd logs are in /var/log/chkservd.log. Checks are done every 8 minutes, and everyone online service gets a +, offline services get a -. If the service is determined to be offline, the restart command(s) specified in that service’s chkservd configuration file is issued and the output is logged.

If you don’t even have chkservd installed, it’s probably missing and you need to install it.

DomainKeys, similar to SPF records, authenticate that an email was sent from an authorized sender.  Several mail services such as Hotmail and Yahoo have started requiring these…luckily they are easy to set up in your cPanel.

System requirements

1. cPanel/WHM v11.x with the latest build

2. Your Mail server must be using Maildir format and NOT Mbox.

To install for a single user:

/usr/local/cpanel/bin/domain_keys_installer USERNAME

If you get an error such as: “Domain keys are not installed on this machine.” your server didn’t meet system requirement mentioned above.

To install DomainKeys for all accounts on a server:

for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/domain_keys_installer $i; done

Do NOT interrupt or stop the process until completed.



Site Navigation