{"id":2115,"date":"2021-05-22T22:39:19","date_gmt":"2021-05-22T22:39:19","guid":{"rendered":"https:\/\/dft.wiki\/?p=2115"},"modified":"2025-02-06T19:16:53","modified_gmt":"2025-02-07T00:16:53","slug":"installing-latest-cpanel-whm-on-centos-8","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=2115","title":{"rendered":"Installing cPanel + WHM on Ubuntu"},"content":{"rendered":"<p>The only drawback of <strong>cPanel<\/strong> is that it\u2019s neither open-source nor free. The same is true for <strong>Plesk<\/strong>. However, both are widely known and extensively used.<\/p>\n<p>If you\u2019re looking for a powerful solution to manage your web server or even resell web hosting services, check out if <strong>CloudPanel CE<\/strong> [<a href=\"https:\/\/github.com\/cloudpanel-io\/cloudpanel-ce\">Link<\/a>] meets your requirements.<\/p>\n<p>Back to cPanel: This tutorial focuses on installing cPanel and configuring essential server settings. It does not cover how to use cPanel itself.<\/p>\n<p>Originally designed to run on CentOS, cPanel later provided an upgrade path to AlmaLinux for existing installations. It now supports Ubuntu 22.04 LTS, finally!<\/p>\n<hr \/>\n<p><strong>SYSTEM REQUIREMENTS<\/strong><\/p>\n<p>Deploy a fresh default installation of Ubuntu 22.04 LTS (do <strong>not<\/strong> enable AppArmour). And switch to <strong>root<\/strong>.<\/p>\n<pre>sudo su -<\/pre>\n<p>UFW (firewall) has to be disabled. This is a bummer having to downgrade security.<\/p>\n<pre>iptables-save &gt; ~\/firewall.rules\r\nsystemctl stop ufw.service\r\nsystemctl disable ufw.service<\/pre>\n<p>Set an FQDN as its hostname.<\/p>\n<pre>hostnamectl set-hostname <span style=\"color: #ff0000;\"><strong>cpanelserver.mydomain.co<\/strong><strong>m<\/strong><\/span><\/pre>\n<p>Add <strong>&#8220;<span style=\"color: #ff0000;\">cpanelserver.mydomain.com<\/span>&#8220;<\/strong> and <strong>&#8220;<span style=\"color: #ff0000;\">cpanelserver<\/span>&#8220;<\/strong> to <strong>\/etc\/hosts<\/strong>. Example with a fake public IP:<\/p>\n<pre>127.0.0.1 localhost <strong><span style=\"color: #ff0000;\">cpanelserver<\/span><\/strong>\r\n200.200.200.200 <strong><span style=\"color: #ff0000;\">cpanelserver.mydomain.com<\/span><\/strong><\/pre>\n<p>Upgrade all packages of the system to the latest.<\/p>\n<pre>apt update &amp;&amp; apt upgrade -y<\/pre>\n<hr \/>\n<p><strong>FULL CPANEL INSTALLATION<\/strong><\/p>\n<p>Download and execute the installation script.<\/p>\n<pre>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest &amp;&amp; sh latest<\/pre>\n<p>That is pretty much it!<\/p>\n<p>Now go to your browser and access the following address using your <strong>root<\/strong> credentials from the Linux console.<\/p>\n<pre>https:\/\/<span style=\"color: #ff0000;\"><strong>1.2.3.4<\/strong><\/span>:2087<\/pre>\n<p>On the browser, log in with the system <strong>root<\/strong> account and its password to complete the installation.<\/p>\n<p>Alternatively, a URL will be generated at the end of the installation. Use that instead, and create an administrator account (other than root).<\/p>\n<hr \/>\n<p><strong>INSTALLING CPANEL DNS ONLY AND WP SQUARED<\/strong><\/p>\n<p>The &#8220;DNS ONLY&#8221; license of cPanel is a free limited-feature cPanel &amp; WHM server type.<\/p>\n<pre>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest-dnsonly &amp;&amp; sh latest<\/pre>\n<p>Now create a DNS cluster to synchronize the configuration from the Master to the DNS Only Slave.<\/p>\n<p>The DNS Squared is a build tailored specifically for WordPress.<\/p>\n<pre>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest-wp2 &amp;&amp; sh latest<\/pre>\n<hr \/>\n<p><strong>CLUSTERING AND DNS CLUSTERING<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>SLAVE<\/strong><\/span><\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>MASTER<\/strong><\/span><\/p>\n<p><strong>Configuration Cluster<\/strong> &gt; <strong>Create<\/strong>. Insert the <strong>IP of the Slave<\/strong> and the generated token.<\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Enable DNS Clustering<\/strong>.<\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>SLAVE<\/strong><\/span><\/p>\n<p><strong>Configuration Cluster<\/strong> &gt; <strong>Create<\/strong>. Insert the <strong>IP of the Master<\/strong> and the generated token.<\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Enable DNS Clustering<\/strong>.<\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>MASTER<\/strong><\/span><\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>SLAVE<\/strong><\/span><\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Add a new server to the cluster<\/strong> &gt; <strong>Configure<\/strong>. Insert the <strong>IP of the Master<\/strong> and the generated token.<\/p>\n<p><strong>Manage API Tokens<\/strong> &gt; <strong>Generate Token<\/strong>.<\/p>\n<p>Select: <strong>Everything<\/strong><\/p>\n<p>ON THE <span style=\"color: #ff0000;\"><strong>MASTER<\/strong><\/span><\/p>\n<p><strong>DNS Cluster<\/strong> &gt; <strong>Add a new server to the cluster<\/strong> &gt; <strong>Configure<\/strong>. Insert the <strong>IP of the Slave<\/strong> and the generated token.<\/p>\n<hr \/>\n<p><strong>BONUS<\/strong><\/p>\n<p>I strongly recommend trying out <strong>CloudPanel<\/strong> because of its lightweight and simplicity. The performance if extremely superior to cPanel and Presk at no cost.<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt -y upgrade &amp;&amp; sudo apt -y install curl wget\r\ncurl -sS https:\/\/installer.cloudpanel.io\/ce\/v2\/install.sh -o install.sh; \\\r\necho \"a3ba69a8102345127b4ae0e28cfe89daca675cbc63cd39225133cdd2fa02ad36 install.sh\" | \\\r\nsha256sum -c &amp;&amp; sudo bash install.sh<\/pre>\n<p>Navigate to:\u00a0<strong>https:\/\/200.200.200.200:8443<\/strong> (use the real public or private IP).<\/p>\n<p>Some terminal commands can be used for automation or password recovery [<a href=\"https:\/\/www.cloudpanel.io\/docs\/v2\/cloudpanel-cli\/root-user-commands\/\">Link<\/a>].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The only drawback of cPanel is that it\u2019s neither open-source nor free. The same is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-2115","post","type-post","status-publish","format-standard","hentry","category-linux","category-web"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2115"}],"version-history":[{"count":12,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2115\/revisions"}],"predecessor-version":[{"id":4677,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2115\/revisions\/4677"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}