Upgrade WHM / cPanel Linux server to EDGE Virtuozzo Optimized release

Q. How do I upgrade my CentOS Linux 5.0 dedicated server to WHM / cPanel edge release?

A. You can upgrade to EDGE release from WHM manager. Please 
note that Edge is the bleeding edge tree. While it has the newest features; It has undergone the
least amount of testing (if any). You generally shouldn't run this build unless you need a bug fix
or feature in it. Once an equivalent CURRENT or RELEASE build has been released, you should switch away from this.

Configure EDGE upgrade

a] Just login to WHM b] Look for Server Configuration c] Click on Update Config d] Set cPanel/WHM Updates option to Manual Updates Only (bleeding EDGE tree) Upgrade WHM / cPanel Linux server to EDGE release e] Click on Save.  

To start upgrade procedure

Look for cPanel Click on Upgrade to Latest Version Click on Click Upgrade button

Edge upgrade from a shell or command prompt

Login as the root via ssh. Edit /etc/cpupdate.conf file: # vi /etc/cpupdate.conf Find line CPANEL=stable Replace with: CPANEL=manual-edge Save and close the file. Now update to edge: # /scripts/upcp -- force


semget: No space left on device

This relates to semaphores on your system (you’ve run out). Run the following to clear them out:

ipcs | grep apache | awk ‘{print $2}’ > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done;

For cPanel servers :

ipcs | grep nobody | awk ‘{print $2}’ > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done;


Finally restart Apache :

/etc/init.d/httpd restart

service httpd restart



Setting Private name servers in Cpanel / WHM

If you want your own name server such as ns1.linuxbabu.net, ns2.linuxbabu.net

Please follow the below steps to setup your own nameservers.

Step 1. Log into your domain manager account, via your domain registrar’s web site
(i.e. www.godaddy.com , www.enom.com , …)

Step 2: You will need to name your DNS server and insert a valid ip that is bound to your server. This will cause your server to get “mapped” on the Internet as being an operational DNS server.

For this example, my domain name is ‘linuxbabu.net’ and the IP’s bound to my server are “” (Primary IP) and “” (Secondary IP). I will be using the hostname ‘ns1.linuxbabu.net’ bound to the “” IP, and ‘ns2.linuxbabu.net’ bound to the “” IP.

Note : The hostname ‘ns1.linuxbabu.net’ and ‘ns2.linuxbabu.net’ are not mandatory. You can use any name along with your domain name. The name ‘ns1’ is simply easy to remember for both the sys admin, and the customer.

Step 3: The last step is to basically say which DNS server is authorized to resolve the domain ‘linuxbabu.net’ to an IP. We will have to input the hostnames that we specified in step 2, which are: ‘ns1.linuxbabu.net’ and ‘ns2.linuxbabu.net’.

Note: If you wish to use your DNS server to resolve other domains besides ‘linuxbabu.net’ you should repeat only step 3, which is basically telling your domain registrar who is the authoritative DNS server for the domain.

Part 2: cPanel DNS Configuration

Now that we’ve established our DNS Internet Awareness through our domain registrar, we will have to configure cPanel to finalize our settings

Step 1. Login to your whm and then Main >> DNS Functions >> Add a DNS Zone



Main >> Server Configuration >> Basic cPanel/WHM Setup

Primary Nameserver & Secondary Nameserver

Click on “Assign Ip Address”

If it does not assign the right ip address then login to the server through ssh



nano /etc/nameserverips

Change to


once the correct Ip are assigned to name servers

Click on “add A entery for this name server”

This will the A entry for nameservers.


Check the nameservers IP

Main >> Networking Setup >> Nameserver IPs

It should showup the correct nameservers and their IPs

Ip Nameserver ns1.linuxbabu.net ns2.linuxbabu.net

Known Issue : When I try to edit my nameserver IPs, two nameservers keep showing up even though I keep manually deleting them from /etc/nameserverips and restarting named. ns1.linuxbabu.net and ns2.linuxbabu.net always keep taking up my first two IP addresses, and I have never added these domains.

Fix :
From WHM Main >> Server Configuration >> Tweak Settings select the option “Disable whois lookups for the nameserver IP manager.” and reconfigure the NS and you are done.

How do I view what exim is doing?

Exim comes with a utility called ‘exiwhat’ which will display what each instance of exim is currently involved with. The output will look similar to this:

root@server [~]# exiwhat
2118 daemon: -q1h, listening for SMTP on port 25 (IPv4)
2130 daemon: no queue runs, listening for SMTPS on port 465 (IPv4)
31640 handling incoming connection from []

Also, to monitor the exim log in realtime, you may use the tail command thusly:

tail -f /var/log/exim_mainlg

Any operation on a VPS gives me “Cannot lock VE”. How do I solve it?

A VPS is locked when some operation (backup, migration, start / stop, etc.) with that VPS is in progress. You can determine which process is holding VPS #101 using the following command on the hardware node:

cat /vz/lock/101.lck

You can kill that process if needed, but make sure that the process is really killed. If there is no process with that PID on the node, just remove the lockfile.

DirectAdmin : How to downgrade from apache 2 back to apache 1.3

If you need to go back to apache 1.3 after installing apache 2, you’ll need to do the following:

1) Restore the old httpd.conf file:

cp -f /etc/httpd/conf/httpd.conf.1.3.backup /etc/httpd/conf/httpd.conf

2) Get DirectAdmin to use the old httpd.conf files for the users. Edit the /usr/local/directadmin/conf/directadmin.conf file and change apache_ver=2.0 to apache_ver=1.3. Then type

echo “action=rewrite&value=ips” >> /usr/local/directadmin/data/task.queue

echo “action=rewrite&value=httpd” >> /usr/local/directadmin/data/task.queue

echo “action=directadmin&value=restart” >> /usr/local/directadmin/data/task.queue

3) Now you can recompile apache 1.3

rm -f /usr/lib/apache/*
cd /usr/local/directadmin/customapache
./build clean
./build all

4) Fix the modules link:

cd /etc/httpd

rm -f modules

ln -s /usr/lib/apache modules

5) Restore the old boot script:

cp -f /usr/local/directadmin/customapache/httpd_freebsd /usr/local/etc/rc.d/httpd

chmod 755 /usr/local/etc/rc.d/httpd

/usr/local/etc/rc.d/httpd restart


cp -f /usr/local/directadmin/customapache/httpd /etc/init.d/httpd
chmod 755 /etc/init.d/httpd
/etc/init.d/httpd restart

Updating your DirectAdmin License manually

If you need to update your DirectAdmin license manually, you can do so by running the following commands:

cd /usr/local/directadmin/scripts

./getLicense.sh 123 1234

service directadmin restart

Where 123 and 1234 are your Client ID and License ID, respectively. If there are errrors extracting the update.tar.gz file, then run:

head -n 1 /usr/local/directadmin/conf/license.key

to search for an error. If there is an readable error inside the file, double check the IP you are using matches the IP in the license on our system. Also check that it’s active in our clients section. Failing that, you’ll need to contact sales@directadmin.com to get your license activated or updated.

If you have multiple IPs on your device and wget is binding to the incorrect one, you can specify the IP to bind to by adding it as the last argument:

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234
service directadmin restart

Plesk domain bakups

Here is the steps to backup individual domain on Plesk. I’ve tested. It works.

1) backup the domain

#pleskbackup -v domains yourdomainname.com backupfilename.bkp

2) Then create a map file

#pleskrestore –create-map backupfilename.bkp -map yourmapfilename

map file should be like that below. if not, edit it.

++++++++++++++++++++++++++++++++++++++++++++++++++ +++++

[thisdomain’sclientname] # Client account name

yourdomainname.com # IP address


++++++++++++++++++++++++++++++++++++++++++++++++++ +++++

Then you can restore it with the following command.

#pleskrestore –restore backupfilename.bkp -level domains -map yourmapfilename

This backup will back up everything including mailboxes and database.

How can I restore the Plesk psa database from a backup?

The following example shows how to restore the mysql.preupgrade.dump.gz backup file.

gunzip /var/lib/psa/dumps/mysql.preupgrade.dump.gz

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e”DROP DATABASE psa;”

mysql -uadmin -p`cat /etc/psa/.psa.shadow` < /var/lib/psa/dumps/mysql.preupgrade.dump

Actually standard daily backup file includes three databases:

* psa

* horde

* mysql

That is why the following error message will appear when you performed the latest command:

ERROR 1050 at line 3165: Table ‘horde_categories’ already exists

This happens because only the “psa” database was restored. However, if you want to restore all

three databases, then you have to delete them using “DROP DATABASE” sql command.

Also, make sure that you are always restoring the latest backup file.