This article will help users to Create a Google Cloud Compute Engine VM Instance with CentOS 7. In this article, we will cover

  • Create a VM Instance using CentOS
  • Install CPanel

For creating a new VM Instance visit Click on Go To Console.

Click on Menu → Compute Engine → VM Instance

Create a new VM Instance with following settings.

Create a new VM Instance and open SSH Terminal.

Execute the following command in terminal

  • sudo -s : get super privileges
  • yum update : It will keep your system update to date with all security updates and binary package.
  • yum install perl : Install Perl
  • yum install wget : Install Wget
  • hostname : Execute this command based on your domain name. Example or

After executing the hostname command, please update DNS for the main domain and the subdomain.

For the C Panel installation, we need to disable few things at OS level

Firewall: Firewall may cause some issue as with the C Panel installation. Stop it services before C Panel installation.
systemctl status firewalld: Check status for the firewall.
systemctl stop firewalld: Stop firewall if it is active.

Network Manager: It must be disabled before C Panel installation.
systemctl status NetworkManager: Check status.
systemctl stop NetworkManager: Stop services.
systemctl disable NetworkManager: Disable Network Manager.

Install Cpanel: The following line will install the latest version for C Panel. it will take some time for installation.
cd /home && curl -o latest -L && sh latest

Change Password: Use “passwd” to change the password. Enter a valid password and confirm the password. the Following action will create a password for the root user for WHM Control Panel. Remeber the password. We need it for login WHM Control Panel.

Following are the default ports for WHM and C Panel. We need to create firewall rules for all the ports.

  • WHM Panel ports – 2086, 2087
  • Cpanel ports – 2082, 2083

For the new firewall Rules Click on Menu Scroll For VPC Network and select Firewall Rules.

Following are the current firewall rules.

Click on Create Firewall Rule to create a new rule. Add the following information and click on save.


  • name: cpanel2082
  • Targets: All instances in the network
  • Source IP ranges:
  • Protocols and ports: tcp:2082

Similarly, create three more rules with the following information.


name: cpanel2083
Targets: All instances in the network
Source IP ranges:
Protocols and ports: tcp:2083


name: whm2086
Targets: All instances in the network
Source IP ranges:
Protocols and ports: tcp:2086


name: cpanel2087
Targets: All instances in the network
Source IP ranges:
Protocols and ports: tcp:2087

Now visit at If the browser warns for SSL certificates ignore the warning. Click on Advance followed by “Proceed to (unsafe)” option. Following image shows the steps for the same action.

For the WHM login use “root” as the username and password which we set earlier. After the successful login following the instructions as shown in the following images.
The first Step Agree with the Terms and Condition

On Step three we need to provide following information 

  • Our email.
  • SMS services (optional). 
  • server hostname which we set earlier
  • Resolvers we are using google resolvers.

Once done click on Save and Go to Step 3 button.

We didn’t modify anything here. Click on Go To Step 4 Button.

On step 4 we need to provide our name servers and IP address for the name servers. Following image shows all the information. Complete it and click on Go to Step 5.

At Step 5 we enable almost all the notifications. If you don’t want something, uncheck it. Finally, click on Go to Step 6.

On step 6 we are done. Click on Finish button.

Click on Go to WHM button.

On this page, we need to enable “WHM Enable PHP-FPM Service for C Panel” services. Check it and click on Enable Services.

After the above step, we will redirect to WHM panel. Here we will create a new C Panel account for our website Click on Account Function then Create New Account.

Following images show all the information we need to provide.

Once you click on Create button, WHM panel will create a new account based on the information you provided. Following image shows the final result of success. Click on Go to cPanel button.

Finally, using C Panel we will create a new index.php file for testing. Following image shows the result for