Our documentation is getting an overhaul! We would like your input! Click here to take a look at the beta launch of our new documentation site! Only cPanel & WHM version 82 documentation exists on our beta at this time. 84 will be added to the new site soon! Leave your feedback here: https://go.cpanel.net/docsfeedback
How to Manually Install cPanel on Google Compute Engine - cPanel Knowledge Base - cPanel Documentation
Page tree
Skip to end of metadata
Go to start of metadata


Overview

This document explains how to manually install cPanel & WHM instance on the Google Compute Engine™ service.

Note:

Google currently offers a 365-day trial and a $300 service credit.

Warning:

You must purchase a license for cPanel & WHM. New installations automatically receive a free 15-day trial license.


Create a cPanel & WHM on Google Compute Engine



Access the Google Compute Engine.

To log in to the Google Compute Engine website, perform the following steps:

  1. If you do not already possess a Google account, create one. Then, log in to Google.
  2. Navigate to the Google Compute Engine website. The Google Compute Engine interface will appear.
  3. Click Get Started. A new interface will appear.





Accept the trial offer.

Accept the Terms of Service and click AGREE AND CONTINUE. The Payment Information interface will appear.





Enter or confirm your payment information.

To enter or confirm your payment information, perform the following steps:

  1. Enter your payment information, or confirm the existing payment method on your account.
  2. Click START MY FREE TRIAL. The Google Cloud Platform interface will appear, and Google will send you a confirmation email.




Enable billing.

You must enable billing on the account before you can create an instance.

To enable billing, perform the following steps:

  1. At the top of the window, in the upgrade offer banner, click DISMISS.
  2. Click Enable Billing. The interface will display a message: Compute Engine is getting ready. This may take a minute or more.
  3. When the message vanishes, click Create. The Create an instance interface will appear.




Create an instance.

To create the instance, perform the following steps:

  1. In the Name text box, enter a name for the instance.
  2. In the Region menu, select a region.
  3. In the Zone menu, select a zone within the region.
  4. Select the number of CPUs you need.
  5. Click Customize if your instance requires more memory, a specific CPU style, or to specify the number of GPUs.
  6. In the Boot disk section, click Change. A new section will appear.
  7. Select CentOS 7.
  8. Select Standard persistent disk.
  9. Increase the disk space to more than 20GB.
  10. Click Select. The section will close.
  11. From the Service account menu, select Compute Engine default service account.
  12. From the Access scopes menu, select Allow default access.
  13. In the Firewall section, select both the Allow HTTP traffic and Allow HTTPS traffic checkboxes.
  14. Click Create. The Google Cloud Platform interface will appear.





Connect to the instance.

The interface will display a green icon next to the instance name when it is ready. It will also display the instance's public IP address.

To connect to the instance, click SSH. A new window will appear with a terminal session.





Run updates.

To obtain updates for the operating system run the following commands:

sudo su
yum update -y





Install perl.

To install perl, run the following command:

yum install -y perl




Assign a hostname to the server.

To assign a hostname to the server, run the following command, where hostname.example.com represents your desired hostname:

hostname hostname.example.com






Disable Network Manager.

The Network Manager service automates the network's settings. It also disrupts connections to the IP addresses that reside in the ipaliases module. You must disable Network Manager to install cPanel & WHM.

To disable Network Manager, run the following command:

yum remove NetworkManager





Run the cPanel & WHM installation script.

To install cPanel & WHM, run the following command:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

This will take a while. When you see a line that resembles Thank you for installing cPanel & WHM 11.78!, the server has installed cPanel & WHM.





Change the root password.

To change the root user's password, perform the following steps:

  1. Run the passwd command.
  2. Enter a new password.
  3. Enter the new password again.

A confirmation message will appear.




Create the hostname fix hook.

To configure VPS deployments, many cloud hosting providers use the dhclient script. This script includes the configuration of the instance's hostname. But, the dhclient script may not preserve the locally-configured hostname. So, hosting providers use scripts to work around this issue. For example, Google Cloud Platform Services™ uses the google_set_hostname script.

The workaround scripts may interfere with WHM's Change Hostname feature (WHM >> Home  >> Networking Setup >> Change Hostname). These can cause hostname configuration issues and a locked cPanel & WHM license. You must create a dhclient exit hook script to set the hostname properly.

To create the hook, run the following command, where hostname.example.com represents your server's hostname:

 Click here to view...
mkdir -p /etc/dhcp/dhclient-exit-hooks.d/ && echo -ne '#!/bin/sh\nhostname hostname.example.com\n/scripts/fixetchosts\n' > /etc/dhcp/dhclient-exit-hooks.d/zzz-set-hostname.sh && chmod +x /etc/dhcp/dhclient-exit-hooks.d/zzz-set-hostname.sh

For information on this hook, read our Cloud-Hosted Hostname Solution documentation.

When you are finished, close the terminal session and return to the Google Compute Engine interface.




Configure a firewall.

To configure the firewall to allow cPanel & WHM traffic to pass through, perform the following steps:

  1. Click the instance name. The instance's profile interface will appear.
  2. Under Network interfaces, click default. The VPC Network Details interface will appear.
  3. Click Firewall rules.
  4. Click Add firewall rule. The Create a firewall rule interface will appear.
  5. Enter the details for the firewall rule.
  6. Click Create. The VPC network details interface will reappear.
  7. Repeat steps 3 - 5 for each firewall rule.

For information on how to configure firewall rules at Google Compute Engine, read Virtual Private Cloud (VPC) Network Overview.

For a list of ports and services that cPanel & WHM uses, read our How to Configure Your Firewall for cPanel Services documentation





Configure static IP address.

By default, Google assigns ephemeral IP addresses to VM instances. They will remain assigned to the server as long as the VM is active, but will change if you turn off and then turn back on a VM..

To configure a static IP address for the server, perform the following steps:

  1. On the VPC network details interface, click External IP addresses. The External IP addresses interface will appear.
  2. Click the arrow next to Emphemeral.
  3. Select Static. A new window will appear.
  4. In the Name text box, enter a name for the IP address.
  5. Click Reserve.




Log in to WHM.

To log in to WHM, perform the following steps:

  1. Navigate to the following URL, where IPADDRESS represents your server's IP address:

    https://IPADDRESS:2087
  2. Enter your username and password.
  3. Click Log in.





Configure WHM.

After you agree to our software license, you're ready to configure cPanel & WHM.

For more information about how to configure cPanel & WHM, read our WebHost Manager documentation.

Important:

By default, Google disables port 25 for outbound email traffic. cPanel & WHM configures Exim to listen on ports 25, 465, and 586.

To configure Exim to listen to additional ports, perform the following steps:

  1. Log in to WHM as the root user.
  2. Navigate to WHM's Service Manager interface (WHM >> Home >> Service Configuration >> Service Manager).
  3. Select the Enabled checkbox for the Exim Mail Server (on another port) service.
  4. Enter the desired port number in the text box.
  5. Click Save.

For more information on Google's block of port 25, read Google's Sending Email from an Instance documentation.


Reminder:

You must purchase a license for cPanel & WHM. New installations automatically receive a free 15-day trial license.

Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels