Kloxo Useful SSH Commands

For those of you who have opted for the free Kloxo control panel on your VPS or dedicated server, here
are some common, and simple, commands you can use to make your life easier.

As with anything free, Kloxo has a few bugs any sys admin will run into. Even the big commercial packages, like cPanel, have annoying bugs.
Rather than banging your head against your keyboard for hours on end, I have complied a list of the most commonly used, and simple, command line fixes for Kloxo.

Websites fail to load:
/script/fixweb

DNS Fails to resolve:
/script/fixdns

Horde Mail gives 500 internal server errors:
/script/fixhorde

Email, in general, just does not function:
/script/fixmail

Kloxo fails to load, don’t reboot, just run:
/script/restart

While these are the most common, there are also many more /script commands.
Be careful with what you run from /script – some can have nasty consequences, if not used properly.
If in doubt, please visit the support forums at http://lxcenter.org. Always log into your VePortal and create a
backup of your VPS container, before running any system wide command you are not familiar with. Allow time
for the backup to complete, before running the commands.

DomainKey And DKIM Working Simultaneously In Kloxo

I have DomainKey and DKIM working simultaneously.

Here’s what you need to do

1. Install Mail::DKIM perl module

yum install perl-Mail-DKIM

2. Install libdomainkeys

wget http://mirrors.qmailtoaster.net/libdomainkeys-toaster-0.68-1.3.6.src.rpm
rpmbuild --rebuild  libdomainkeys-toaster-0.68-1.3.6.src.rpm
rpm -ivh /usr/src/redhat/RPMS/i386/libdomainkeys-toaster-0.68-1.3.6.i386.rpm

3. Download http://www.memoryhole.net/qmail/dkimsign.pl and copy it to /usr/bin
4. Download http://www.memoryhole.net/qmail/qmail-remote.sh
5.

mv /var/qmail/bin/qmail-remote /var/qmail/bin/qmail-remote.orig
cp qmail-remote.sh /var/qmail/bin/qmail-remote
chmod 755 /var/qmail/bin/qmail-remote
rm /var/qmail/bin/qmail-queue
mv /var/qmail/bin/qmail-queue.orig /var/qmail/bin/qmail-queue

6. Edit /var/qmail/bin/qmail-remote. goto line 49 and replace

error=`(dkimsign.pl --type=dkim --selector=default \

with

error=`(dkimsign.pl --type=dkim --selector=dkim \

7. Finally do not forget to add DKIM DNS TXT record.

dkim._domainkey.yourdomain.name.     IN  TXT  "v=DKIM1; g=*; k=rsa; p=MEwwDQYJKoZIhvcN.....AQAB"

the “p=MEwwDQYJKoZIhvcN…..AQAB” part is same as that for your domainkey created by kloxo

You can do a test by sending mail to yahoo or gmail

This basically works on most qmail toaster installation.
Courtesy http://www.memoryhole.net/qmail/

Hope this helps everyone here

How to Create/Restore Backup In Kloxo

Backup/Restore is a core part of Kloxo. You can take backup of your entire hosting and you can trivially restore it exactly on another server. In a cluster setup, you can take backup in one cluster configuration, and when restoring, you can tell Kloxo to re-arrange the resources on different servers.

Backup/Restore is also an extremely important aspect of web-hosting, and delivers peace of mind, and in fact, one of the main advantages of having a control Panel on your server.

This forum is dedicated to problems you experience vis-a-vis backup/restore, and we are committed to saving your data whatever be your configuration.

It is recommended, though not necessary, that both the source and destination Kloxo be the latest version, but Kloxo should be transparently able to handle older versions.

To take backup of your entire system:

 /script/backup –class=client –name=admin

Kloxo is 100% hierarchical. So if you take the backup of a top level client, automatically every resource under him is included, including his clients, domains, ssl certificates, or whatever resources he has. In the above case, you are taking the backup for admin, which actually includes your entire hosting.

To restore:

 /script/restore –restore –accounts=all <backup-file-path>

To list the contents of a backup file.

/script/restore –list <backup-file-path>

To restore only certain domains/clients

cd /usr/local/lxlabs/kloxo/httpdocs/
lphp.exe ../bin/common/restore.php --restore --accounts=domain:domain.com,client:clientname <backup-file-path>

If you have taken the backup under a specific client, and want to restore under the same client, you can provide the client’s class and name via –class and –name respectively. You have to first make sure that this client exists in the system. That is, you have to first add a client with the clientname, and then you can restore the backup under him.

cd /usr/local/lxlabs/kloxo/httpdocs/
lphp.exe ../bin/common/restore.php --class=client --name=clientname --restore <backup-file-path>