How to Set up a CentOS Web Panel

By Abdulaziz Gebril, Alibaba Cloud Community Blog author.

CentOS Web Panel is a free web hosting control panel designed for the quick and easy management of servers minus the chore and effort of using an SSH console for every time you want to do something. CentOS Web Panel offers a huge number of options and features for server management in its control panel package and it automatically installs full LAMP (Linux, Apache, MySQL, PHP) stack on your desired server such as Apache, PHP, or phpMyAdmin.

You can learn about all the features of CentOS Web Panel here, and you can also test its Admin and End user Panel here.

In this tutorial, you will learn how to set up a CentOS web Panel on a CentOS server. Setting up this panel will allow for quick and easy management of your server.

Setup CentOS Web Panel

In this tutorial, you will be installing a CentOS 7 server. You will also assign a full qualified domain name (FQDN) to your server and set up a static IP address of your server and a pointed domain to your server with a custom nameservers. You will configure Inbound/Outbound Firewall Rules.

Step 1: Update Your Server and Install Wget Package

We need to ensure that your server is up to date, also we need to install Wget which we will use to download CentOS Web Panel installer to your server. Use the following command:

Step 2: Setup Server FQDN

CentOS Web panel requires FQDN set as hostname, you can use hostnamectl command to do that:

Step 3: Configure Firewall Rules

Firewall rules define what kind of Internet traffic is allowed or blocked. You can think of it as an additional protection layer provided by your hosting provider to take control of your traffic.

Inbound firewall rules define what kind of traffic will be allowed to which ports from which sources. If no inbound rules are configured, no incoming traffic is permitted.

Outbound firewall rules define what kind of traffic will be allowed to leave the server on which ports and can be restricted to specific destinations. If no outbound rules are configured, no outbound traffic is permitted.

If your hosting provider asks you to configure the firewall rules of your traffic (Skip if not), you have to configure your firewall rules to allow your traffic through their network for the following ports:

For Alibaba Cloud customers, you can do that by Create a security group and Add security group rules to allow connections on these ports.

Step 4: Install CentOS Web Panel

Now you are ready to start CentOS Web Panel Installation, the installation is pretty easy, it will automatically install all the required packages and you don’t need to do anything, but it may run more than 15 minutes because it needs to compile Apache and PHP from source.

You can install CentOS Web Panel by running the following command:

Once the installation is done you will be provided with an URL to access the panel and your MySQL root password, keep these details somewhere safe.

Now, you have to reboot your server so that all updates can take effect and CentOS Web Panel gets started:

In case you are log in over SSH using public key authentication and your root user doesn’t have a password, you will need to set one. After rebooting, log in to your server with SSH and enter the command:

And set your password

Step 5: Configure Your CentOS Web Panel

Log in to your CentOS Web Panel Admin GUI using the link provided by the installer on your server, root username and password.

After successfully entering the panel, you should see something like:

Step 6: Update Admin Email and NAT

From the left menu, click on CWP Settings, then select Edit Settings.

Change your Admin Email, and if your server uses NAT Gateway, select the checkbox of Activate NAT-ed network configuration, then click Save Changes.

Step 7: Update Nameserver on CentOS Web Panel

To update your namesever, you need to register a custom nameserver. A custom nameserver allows you to run your own nameserver to respond to DNS requests for your domains. such as ns1.(your domain name). Before you can add those nameservers to domain names, you need to register them.

If you registered your domain name on Alibaba Cloud Domains, in order to create a custom nameservers, you can directly go to the Domain Name Console, find the domain name that you want to create the custom nameservers for it → Manage → DNS Host → Create a DNS server.
For further details, see this tutorial: Custom DNS FAQs.

The following links may help you, if your domain is directly registered with one of the following domain registrars:

If your domain is registered with another domain registrar, you can search on google or read their FAQs, if you can’t find the answer, contact them.

After registering your custom nameservers, update the nameserver of your domain to use the new one.

Now, let’s get back to CentOS Web Panel. From the left menu, click DNS Functions, then select Edit Nameservers IPs.
Update your Namerservers info and click Save Changes.

To host a website on your server and provides a full service for it. From the left menu, click on User Accounts, then select New Account.

Now that that’s all done. You can spend some time exploring the features and settings of your CentOS Web Panel.

Original Source

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store