How to Migrate WHM/cPanel From Third Party Providers to AWS

How to Migrate WHM/cPanel From Third Party Providers to AWS

March 13, 2019 / Nirav Shah

How to Migrate WHM/cPanel From Third Party Providers to AWS

Abstract Here, we are going to describe the steps which you will need to go through to essentially, install your personal WHM/cPanel Server on AWS Infrastructure and migrate cPanel Accounts from existing third party WHM/cPanel hosting providers to your personal WHM/cPanel Server…

Benefits of having your WHM/cPanel server hosted in AWS Infrastructure

  1. Full control over the Compute and Storage capacity of the Server, third party service providers provide you a shared Hosting Server were the Compute Capacity control is not in your hand and you are charged for unnecessary extra capacity.
  2. Can create unlimited cPanel Hosting A/Cs which are limited only by the Storage Capacity of the Server, which can be increased any time.
  3. Can configure the Server related to your custom requirement as per your personal taste, third party service providers lock you from features which can overwrite the changes made by the provider.
  4. Can setup the Backup as per your wish to either s3 bucket or any other third-party solution, third party service providers lock you by either forcing to use their in-home backup service or not providing any backup service at all.

Requirements

  1. EC-2 – server with a minimum of 2-GB RAM and at-least 40-GB of Storage
  2. rpm Distribution based OS – centOS-7 or latest centOS is recommended for the installation
  3. Elastic-IP – assign the IP to your WHM instance before starting installation so that the IP does not change on reboot
  4. Domain Name
    • registered from any third party domain reseller as well as if from Route-53
    • point the domain to the whm Server before starting the installation and wait for the TTL to complete and point to the elastic-IP of the ec2-instance
  5. Route-53 – To host the domain name inside the AWS eco-system for better operability and seamless integration

Steps To Migrate WHM/cPanel From Third Party Providers to AWS

  1. Launch an Instance from the AWS console keeping in mind the requirements listed above
  2. You will also need to configure the Security Group for the Instance as WHM needs some specific PORT access and it is highly insecure to keep all the ports open to the WORLD, please go through this page to see what all you will need to do
  3. You will need to setup the hostname of your Instance to the domain name on which WHM will run (login as ROOT user for smooth installations and configurations)
  4. # hostnamectl set-hostname whm.domain.tld
  5. install “perl” packages if they are not installed beforehand, as cPanel is written in perl
  6. # yum install perl
  7. install “curl” packages, as you do not have to run any commands to install whm-cPanel, there is an auto-installer script built for you. All you have to do is download the cPanel installer script with the curl command
  8. # yum install curl
  9. Download the latest installer script
  10. # curl -o latest -L https://securedownloads.cpanel.net/latest
  11. This command will save the auto-installer script in your current directory with the file-name “latest”
  12. Before running this script through SSH, increase your SSH timeout to at-least/greater than 2 Hours as the script will take at-least 40-60 mins to execute and complete the installation depending on server resources and internet connection speeds
  13. Now, run the auto-installer script
  14. # sh latest

Sample OUTPUT Verifying archive integrity… All good. Uncompressing cPanel & WHM Installer….. ____ _ ___| _ \ __ _ _ __ ___| | / __| |_) / _` | ‘_ \ / _ \ | | (__| __/ (_| | | | | __/ | \___|_| \__,_|_| |_|\___|_| Installer Version v00061 r019cb5809ce1f2644bbf195d18f15f513a4f5263 Beginning main installation. 2019-03-13 04:52:33 720 ( INFO): cPanel & WHM installation started at: Sat Mar 13 04:52:33 2019! 2019-03-13 04:52:33 721 ( INFO): This installation will require 20-50 minutes, depending on your hardware. 2019-03-13 04:52:33 722 ( INFO): Now is the time to go get another cup of coffee/jolt. 2019-03-13 04:52:33 723 ( INFO): The install will log to the /var/log/cpanel-install.log file. 2019-03-13 04:52:33 724 ( INFO): 2019-03-13 04:52:33 725 ( INFO): Beginning Installation v3… 2019-03-13 04:52:33 428 ( INFO): CentOS 6 (Linux) detected! 2019-03-13 04:52:33 444 ( INFO): Checking RAM now… 2019-03-13 04:52:33 233 ( WARN): 2019-03-13 04:52:33 233 ( WARN): To take full advantage of all of cPanel & WHM’s features, 2019-03-13 04:52:33 233 ( WARN): such as multiple SSL certificates on a single IPv4 Address 2019-03-13 04:52:33 233 ( WARN): and significantly improved performance and startup times, 2019-03-13 04:52:33 233 ( WARN): we highly recommend that you use CentOS version 7. 2019-03-13 04:52:33 233 ( WARN): 2019-03-13 04:52:33 233 ( WARN): Installation will begin in 5 seconds. …. This process will massively modify your operating system, and this is how the auto installer script works

  1. It examines multiple packages and ensures that there will be no conflicts and if it finds any package conflicts, it will uninstall the previous packages and updates and then start a fresh reinstall with compatible packages on a Fresh OS
  2. It downloads required language and base files for installation
  3. It will install multiple PHP modules using CPAN and other required packages using yum
  4. It will download and compile PHP and Apache with other multiple associated modules
  5. When the installation finally completes, the Installation Wizard will prompt you to RESTART the Server
  6. After restarting the ec2-Instance you can access your WHM Service by going to
    • https://whm.domain.tld:2087
    • http://:2087

You will need to enter “root” in Username and “” in password to start viewing the WHM Console Now, you have officially Installed a WHM Service in your EC2 Instance, and can create multiple cPanel Accounts to launch different websites as well

Talk to AWS Certified Consultant

    Spread Love By Sharing:

    Let Us Talk About Your AWS Development Requirements

    Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project