Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Google Cloud

Installing cPanel & WHM on Google Compute Engine

by Cloudbooklet
5 years ago
in Google Cloud, Compute Engine
Installing Cpanel &Amp; Whm On Google Compute Engine
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

This guide will help you learn how to install cPanel and WHM in Google Compute Engine VM Instance. This is the old set up of cPanel, you can view how to install and set up the latest cPanel v76 on Google Cloud. cPanel is a server management software for website owners which comes with a […]

ADVERTISEMENT

This guide will help you learn how to install cPanel and WHM in Google Compute Engine VM Instance. This is the old set up of cPanel, you can view how to install and set up the latest cPanel v76 on Google Cloud.

cPanel is a server management software for website owners which comes with a 15-day trial.

Click here to activate your cPanel License

ADVERTISEMENT

Steps to install cPanel and WHM

  1. Create the VM Instance
  2. Verify cPanel & WHM license history and validity
  3. Setup Cloud DNS
  4. Setup Firewall rules
  5. Install cPanel
  6. Set up Hostname in Google Cloud
  7. Setup WHM
  8. Setup Email in WHM
  9. Activate cPanel License

Cpanel and WHM can also be installed on other cloud platforms. You can choose anyone from the below.

Here are some options.

Check how to install cPanel on AWS.

ADVERTISEMENT

You might also like

How To Setup Ssh Keys On Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

4 months ago
Draggan Ai Editing Tool Install And Use Draggan Photo Editor

DragGAN AI Editing Tool Install and Use DragGAN Photo Editor

4 months ago

Create the VM Instance

Go to Compute Engine >> VM Instances and click Create Instance

In Name provide a name for your Instance

ADVERTISEMENT

In Region choose the region closest to your visitors

In Machine Type choose 3.75 GB memory 1vCPU

ADVERTISEMENT

In Boot disk click Change and choose CentOS 7. In Size enter your required size, the minimum should be 40 GB and click Select

In Firewall check both Allow HTTP traffic and Allow HTTPS traffic

ADVERTISEMENT

Click Create

It will take a while before the VM instance will be available for you

Verify cPanel & WHM license history and validity

Once your VM instance is created you will be provided with an external IP address which is used to license your cPanel. So you need to verify if the IP address has a valid 15-day trial license. So visit verify cPanel license and enter your external IP address and click Verify License. If the IP address does not have a valid license you can restart your VM instance. Then a new IP will be assigned. Then you can check again.

Reserve your IP address

If your IP address has a valid license you can proceed to reserve your IP address by going to VPC Networks >> External IP Addresses reserve your IP address to Static

Setup Cloud DNS

Please follow this guide to setup Cloud DNS and point your domain to Google Cloud

Once you have created DNS Zone, you need to create one additional A record for cpanel subdomain in your Cloud DNS

Click Add record set

In Name enter cpanel

Select Resource Record Type to "A"

IPv4 Address with the IP address of your instance that you have reserved earlier

Leave everything to default.

Click Create

Now your VM instance is configured and ready to setup Firewall rules for cPanel installation.

Setup Firewall rules

cPanel & WHM uses some ports to manage the server, so you need to create a firewall to provide access to these ports.

Go to VPC Network >> Firewall rules and click Create Firewall rules

In Name enter cpanel

In Targets select All instances in the network

In Source filter select IP ranges

In Source IP ranges enter 0.0.0.0/0

In Protocols and ports check TCP and enter 2077, 2078, 2082, 2083, 2086, 2087, 2096, 3306, 53.
Also check UDP and enter 53.

Click Create

Install cPanel

Go to Compute Engine >> VM Instances and click the SSH button right next to your instance to open the terminal window in the browser

Once the terminal is opened enter the following commands one by one

sudo -s
yum update
yum install perl
yum install wget

Then set the hostname with your domain name. Replace yourdomainname.com with your domain name

hostname cpanel.yourdomainname.com

Now stop firewall and disable Network manager

systemctl stop firewalld
systemctl stop NetworkManager
systemctl disable NetworkManager

Download latest cPanel and install it by running the following command

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

It will take around 30 – 40 min to complete the install. Don’t close the terminal until the setup is completed.

Once the setup is completed, you can set the root password by executing the following command

passwd

Save your password safely, you will need that to login to your WHM

Set up Hostname in Google Cloud

Google Compute Engine won’t preserve the hostname (cpanel.yourdomainname.com) you set and changes it to default hostname, so this may result in a locked cPanel & WHM license. To preserve the hostname follow the below simple steps

cd /etc/dhcp/dhclient-exit-hooks.d/
sudo nano set-hostname.sh

Paste the following contents and hit Ctrl+X followed by Y to save the filter. Remember to replace yourdomainname.com with your domain name

#!/bin/sh
hostname cpanel.yourdomainname.com
/scripts/fixetchosts

Set correct permissions to the file you created

chmod 744 set-hostname.sh

That’s all now your cPanel is installed and ready to finish the WHM setup

Setup WHM

Open your browser and navigate to https://cpanel.yourdomainname.com:2087

Enter username as root

Enter the password you created by running the command passwd

Now you will be logged into your WHM

Agree with Terms and Conditions and go to step 2

Provide your email address

Server hostname which we set earlier

In Primary Resolver enter 8.8.8.8

In Secondary Resolver enter 8.8.4.4

Goto Step 3 and again Goto Step 4

Scroll down and Check Configure nameserver A records

Check Add hostname A records

Copy IP Address from Add hostname A records and paste in the above two IPv4

Goto step 5

Enable all notifications

Goto step 6

Click Finish

Goto WHM

Setup Email in WHM

In Google Cloud Platform port 25, which cPanel & WHM utilizes for SMTP, is not open. So you need to create an account with Mailgun or Sendgrid and integrate with WHM for emails
Google provides additional documentation for sending email from Compute Engine Instances here

Allow SMTP on Port 2525

Go to Service Configuration >> Service Manager

Tick both boxes next to Exim Mail Server (on another port)

Change Allow exim to listen on a port other than 25 to 2525

Click Save

Email Configuration

As the standard email port is blocked in Google Cloud, you need to configure a third party email service provider to send emails. Here we can use Mailgun to configure emails in cPanel.

Make sure you have these DNS records.

A record pointing to mail.domain.com

MX record with 0 priority pointing to mail.domain.com

Mailgun Configuration

Go to Service Configuration >> Exim Configuration Manager

Click Advanced Editor tab

In CONFIG section, under domainlist local_domains enter lsearch;/etc/localdomains : localhost : cpanel.yourdomainname.com : [GOOGLE INSTANCE NAME] : @

In daemon_smtp_ports enter 465 : 25 : 587 : 2525

In the Section: AUTH box enter

mailgun_login:
driver = plaintext
public_name = LOGIN
hide client_send = : Default SMTP Login : Default Password

In the Section: PREROUTERS box enter

mailgun:
driver = manualroute
domains = ! +local_domains
transport = mailgun_transport
route_list = * smtp.mailgun.org::2525 byname

In the Section: TRANSPORTSTART box enter

mailgun_transport:
driver=smtp
hosts_try_auth = smtp.mailgun.org

Activate cPanel

cPanel is a subscription based software, you can activate your license within your 15 days trial period.

Save the configurations, that’s everything about cPanel & WHM on Google Cloud.

Tags: Compute EnginecPanelGoogle Cloud PlatformWHM
Share1Tweet1SendShare
Cloudbooklet

Cloudbooklet

Comments 18

  1. Avatar Of Hans Hans says:
    3 years ago

    Hello,
    And how work with sengrid?

    Thanks.

    Reply
    • Avatar Of Cloudbooklet Cloudbooklet says:
      3 years ago

      Hi

      In AUTH

      sendgrid_login:
      driver = plaintext
      public_name = LOGIN
      hide client_send = : SMTP Login : Password

      In PREROUTERS you can use

      send_via_sendgrid:
      driver = manualroute
      domains = ! +local_domains
      transport = sendgrid_smtp
      route_list = “* smtp.sendgrid.net::2525 byname”
      host_find_failed = defer
      no_more

      In TRANSPORTSTSRT you can use
      sendgrid_smtp:
      driver = smtp
      hosts = smtp.sendgrid.net
      hosts_require_auth = smtp.sendgrid.net
      hosts_require_tls = smtp.sendgrid.net

      Reply
  2. Avatar Of Cloudbooklet Cloudbooklet says:
    4 years ago

    Thank you, I will consider your request, by the way I also included to preserve hostname, may be you have missed that. Please read carefully again.

    Reply
  3. Avatar Of Cj CJ says:
    4 years ago

    Thanks for the article CloudBooklet!

    If using MailGun, do all new domains that are sending mail have to be added/verified on MailGun?

    Reply
    • Avatar Of Cloudbooklet Cloudbooklet says:
      4 years ago

      Hi CJ, Thank you too for using Cloudbooklet. Yes, all domains should be added in MailGun and smarthost needs to be configured

      Reply
Next

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

Set Up Deep Learning With Nvidia, Cuda, Cudnn On Ubuntu

How to Set Up Deep Learning with Nvidia, CUDA, cuDNN on Ubuntu 22.04

7 months ago
How To Install Or Upgrade Php 8.2 On Ubuntu 22.04

How to Install or Upgrade PHP 8.2 on Ubuntu 22.04

9 months ago
How To Change Timezone On Ubuntu 22.04

How to Change Timezone on Ubuntu 22.04

1 year ago
How To Install Ansible On Ubuntu 22.04

How to Install Ansible on Ubuntu 22.04

1 year ago

Follow Us

Trending Articles

Wix Ai

Create a Professional Website with Wix AI Website Builder

September 19, 2023

5 Free AI Soulmate Maker: Create Your Perfect Match

Create High Quality AI Cover Song with Covers AI

Validator AI: The AI Powered Business Idea Validator

10 Best AI Prompts for Writers to Improve Website SEO

5 Best Laptop for Minecraft in 2023: Top Picks for All Budgets

Popular Articles

Install Waifu Diffusion

How to Install Waifu Diffusion – Step-by-Step Guide

August 31, 2023

9 Best FREE AI Character Generators to Create Characters from Photo

Quantum AI Trading: The Future of Trading

How to Stabilize Videos for Free with Online Video Stabilizer

Amazon Prime Big Deal Days 2023: Best Deals

7 Best AI Photo Editor You Need to Try Online Free

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.