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:
FreeBSD:

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

RedHat:

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 [email protected] 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 1.2.3.4
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 11.22.33.44 # IP address

mysql::@localhost:3306

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

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 to re-install RVSkin ?

How to uninstall RVSkin?
Run this command:

perl /root/rvadmin/uninstall.pl

Terminate rvadmin account from WHM

Reinstall rvadmin

mkdir /root/rvadmin; cd /root/rvadmin; wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2; bunzip2 -d rvauto.tar.bz2; tar -xvf rvauto.tar; perl /root/rvadmin/auto_rvskin.pl

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.

Ports that must be open to run cPanel behind a firewall IPTables

Ports that must be open to run cPanel behind a firewall / IPTables

port service protocol direction

20 ftp tcp inbound/outbound

21 ftp tcp,udp inbound/outbound

22 ssh tcp inbound

25 smtp tcp inbound/outbound

26 smtp tcp inbound/outbound

37 rdate tcp outbound

43 whois tcp outbound

53 DNS tcp/udp inbound/outbound

(inbound is only needed if you run your own public DNS server you)

80 http tcp inbound/outbound

110 pop3 tcp inbound

113 ident tcp outbound

143 imap4 tcp inbound

443 https tcp inbound

465 smtp tls/ssl tcp/udp inbound/outbound

873 rsync tcp/udp outbound

993 imap4 ssl tcp inbound

995 pop3 ssl tcp inbound

2082 cpanel tcp inbound

2083 cpanel ssl tcp inbound

2086 whm tcp inbound

2087 whm ssl tcp inbound

2089 cp licence tcp outbound

2095 Webmail tcp inbound

2096 Webmail SSL tcp inbound

3306 mysql tcp (only if you need to connect remotely)

6666 chat tcp inbound

How do I INSTALL cPanel and FANTASTICO?

cPanel setup :

—–
cPanel Installation Instructions:
—–
cPanel now uses a universal install script which can be found at
http://layer1.cpanel.net/.
You can use the following commands in the root
shell to download and start the installation script:

mkdir /home/cpins
cd /home/cpins
wget http://layer1.cpanel.net/latest
sh latest

—–
Fantastico
—–
SSH to your server(s) and enter following commands:

cd /usr/local/cpanel/whostmgr/docroot/cgi
wget http://www.netenberg.com/files/free/fantastico_whm_admin.tgz
tar -xzpf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz

How do I UNINSTALL FANTASTICO?

Log into your server via SSH as root and execute the following:

rm -rf /var/netenberg/fantastico_de_luxe/
rm -rf /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/
rm -rf /usr/local/cpanel/3rdparty/fantastico*
rm -rf /usr/local/cpanel/base/frontend/*/fantastico
rm -f /usr/local/cpanel/base/frontend/x/cells/fantastico.html
rm -f /usr/local/cpanel/whostmgr/docroot/cgi/addon_fantastico.cgi

cPanel runweblog error Perl_Gthr_key_ptr

cPanel runweblog error :

/usr/bin/perl: symbol lookup error: /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so: undefined symbol: Perl_Gthr_key_ptr

Solution :

I removed the rrdtool binary from /usr/local/cpanel/3rdparty/bin then ran /scripts/rrdtoolinstall