How to move an account from one Cpanel server to another Cpanel server via Backend (Shell)

Basic steps

1. Create a .tar file (backup) of the account in the old server.
2. Copy it to the new server using scp.
3. Untar (restore) in the new server.

1. Create a .tar file (backup) of the account in the old server.

To create a tar package of the account you have a Cpanel script.

/scripts/pkgacct ‘username’

Executing this script will create a username.tar.gz file in your /home directory. You can copy this to the new server.

2. Copy it to the new server using SCP

scp user@IP:/home/username.tar.gz user@IP:/home/

3. Untar (restore) in the new server

Login to the new server using ssh and execute the script.

$ cd /home ; /scripts/restorepkg ‘username’

Apache failed to start with the “No space left on device” error.

If you receive the following error while restarting Apache in the server, you need to do the following steps.

These errors means that there is no available IPC (inter-process communication) resources in the system, such as semaphores or shared memory segments. You need to check IPC resources which are used in the server using ‘ipcs’ command:

$ ipcs -a

—— Semaphore Arrays ——–
key semid owner perms nsems
0×00000000 201293824 apache 600 1

You will be able to see a lot of semaphores under Apache . You need to kill those processes using the following script and restart apache.

$ ipcs -s | grep apache | perl -e ‘while (<STDIN>) {@a=split(/\s+/); print `ipcrm sem $a[1]`}’

$ service httpd restart

How do I reset my root password on Debian Server Using GRUB ?

Reboot your Server/Desktop.

1)Press Escape to see your boot menu while booting your server.

2)Choose the kernel you want to boot.

3)Press “e” for edit.

4)Type in the following line after a space on the kernel line.

single init=/bin/bash

5)Press enter key and then press “b” to boot that kernel, this will take you into single user mode+

6)Now Mount your Server in Read-Write mode using mount command

mount -o remount / rw

7)Reset your root password.

passwd root

Do I need MX records for my domain?

Technically, a domain does not require MX records to receive email. By default, a sending mail server should attempt to deliver mail to the host itself if no MX record is present. For example, if a sending server is trying to deliver mail to user@example.com, and example.com has no MX records, it will try connecting to any mail server at example.com itself.

However, it is highly recommended to create MX records for your domain, even if they seem redundant or unnecessary; in the above example, example.com should still have at least one MX record set to domain.com itself to help ensure delivery, like so:

example.com 43200 MX 10 example.com

Some non-RFC-compliant servers will fail to deliver email for domains that lack MX records

Run Apache and lighttpd on same port 80

In a short description, lighttpd is a *ligthy* webserver which helps to increase the site load speed with a small memory consumption.
Now, I assume that you have already installed both apache and lighttpd in the server.

The main thing should be noted here is we need to have 2 IP’s in the server so that we can run both apache and lighttpd in the same port but on specific and dedicated IP addresses.

Go to apache configuration (CentOS/Fedora/RHEL: /etc/httpd/conf/httpd.conf) and locate the “Listen” directive.

Once you are there, you will probably see “Listen :80″ which tells apache to listen on ALL the interfaces. You will need to change this to make apache listen on just one of your IP addresses ie:

“Listen 12.12.12.1:80″

Pick one for apache and do the same for the lighttpd configuration(CentOS/Fedora/RHEL: /etc/lighttpd/lighttpd.conf) but in this case use the other free IP address.

Now, restart apache and then lighttpd. You can try to access IP in browser and make sure both are listening on port 80.

« Prev - Next »