How to Install CSF

July 29th, 2010 by tech No comments »

How to install CSF (ConfigServer Security & Firewall)

# cd /usr/src/
# wget http://www.configserver.com/free/csf.tgz
# tar -xzf csf.tgz
# cd csf
# ./install.sh

(On cPanel servers, run ./install.cpanel.sh instead — it will auto-configure the ports opened).

The initial installation is complete, and you can now view the plugin at WHM >> Plugins >> “Config Server Security and Firewall”.

To configure CSF via SSH, edit /etc/csf/csf.conf and make your changes.

When your configuration is complete, you need to set the following in /etc/csf/csf.conf to disable “TESTING” mode and enable your firewall:

TESTING = “1″
to
TESTING = “0″

Lastly, restart CSF to enable all settings:

# csf -r

Share

Lowest numbered MX record points to localhost

July 29th, 2010 by tech No comments »

If you see the following in exim’s main_log:

temporarily rejected RCPT : lowest numbered MX record points to local host

This indicates that the domain doesn’t exist in /etc/localdomains. Edit the file with your favorite editor and ensure it’s listed there.

At the same time, you’ll want to ensure it isn’t listed in /etc/remotedomains.

Share

Yum rpmdb open failed

July 29th, 2010 by tech No comments »

Error: rpmdb open failed

This error occurs most frequently when the rpm database is corrupted. See below for instructions on how to rebuild the rpm database.

# yum update
Loaded plugins: fastestmirror
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 157, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
self.conf
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 239, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 804, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 877, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

The most common fix is as follows:

# yum clean all
# rm -f /var/lib/rpm/__db*
# rpm –rebuilddb
# yum update

However, if this is a VZ container (VPS), the following may be required:

#mv /dev/urandom /dev/urandom.back
#mknod -m 644 /dev/urandom c 1 9

Share

Reinstall Mailman

July 29th, 2010 by tech No comments »

If you run into an issue where you need to reinstall Mailman, you can do so with the following:

# /usr/local/cpanel/bin/mailman-install --force

Share

Install chkrootkit

July 29th, 2010 by tech No comments »

How to Install chkrootkit:

# cd /usr/src
# wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
# tar -xvzf chkrootkit.tar.gz
# cd chkrootkit-*/
# make sense

After that it is ready to use and you can simply type:
# ./chkrootkit

Share

Troubleshooting cPanel License Issues

July 29th, 2010 by tech No comments »

If you get an error message that your cPanel instance is not activated, and you believe this to be in error, here are some steps for troubleshooting:

1. Re-check in with the license servers:
/usr/local/cpanel/cpkeyclt

If you see the following, you’re in good shape:

# /usr/local/cpanel/cpkeyclt
Updating cPanel license...Done. Update succeeded.
Building global cache for cpanel...Done

2. If that doesn’t work, you’ll want to go to the cPanel License Verification System to ensure your license is still valid.

3. If the IP is licensed properly, check the server to see if cPanel is detecting the correct IP address for your install:
# curl cpanel.net/apps/myip/

Running that command should return your base IP address. If it doesn’t, then there is a networking issue, or the wrong IP address is licensed.

4. If all else fails, open a ticket with cPanel Customer Service.

Share

How to Increase the Serial Number For All DNS Zones

July 29th, 2010 by tech No comments »

NDCHost has made available a nice script that will increase the serial numbers for all DNS zones:

# cd /sbin
# rm -f updateserial
# wget http://www.ndchost.com/cpanel-whm/scripts/updateserial/download.php
# chown root.root updateserial
# chmod 0750 updateserial
# /sbin/updateserial -d /var/named

To activate your changes, be sure to reload rndc:
# rndc reload

Share

Increase Memory Available for Tomcat & Java

June 18th, 2010 by tech No comments »

First, open the following file in your favorite editor:

# vi /var/cpanel/tomcat.options

Insert the following 2 lines (if not already present):

Xmx200M
Xms100M

Xmx is the upper limit and Xms is the lower limit.

Once done, restart the Tomcat service:

#/scripts/restartsrv_tomcat

Share

Link to Software Package Page in Fantastico

June 14th, 2010 by tech No comments »

Linking to a specific software package in Fantastico is easy, and great for use with custom icons, or for linking customers to the installation/configuration page.

For example, a link to PHPBB2 looks like this:

https://yourhostname.tld:2083/frontend/x3/fantastico/autoinstallhome.php?app=phpBB2

This one’s a no-brainer really, as the links are the same in the Fantastico interface, but some might find this useful when creating custom icon groups in cPanel.

Share

Quotas will not be enabled on /home to prevent performance degradation.

May 21st, 2010 by tech 1 comment »

Error: Quotas will not be enabled on /home to prevent performance degradation.

You may see this when running /scripts/initquotas or /scripts/fixquotas. Either there’s something wrong with your /etc/fstab file that cPanel couldn’t correct, or you have your backups set to provision to a folder in /home, which is not recommended. This disabling of usrquota on /home is intentional if backups are set to go to /home.

# grep BACKUP /etc/cpbackup.conf

You can check the configuration in WHM >> Configure Backups, or via SSH with:

root@main [/home/ihost/public_html/skoal]# grep BACKUPDIR /etc/cpbackup.conf
BACKUPDIR /home/somefolder

If you see something similar to the above, quotas are not going to work for you. You’ll want to set backups to be delivered offsite via FTP, or to another partition, ideally a completely separate hard drive in case of hard drive failure.

Share

cPanel Web Site Hosting by IntraHost