• Get In Touch
December 26, 2016

How to Install CentOS Web Panel on CentOS

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

CentOS web panel abbreviated as CWP is an Open Source web hosting management panel. It provides easy but powerful server management tools through a web interface. CentOS web panel can be used to manage multiple servers at a time with the single web interface. Apart from managing the server and the services, CentOS web panel is also used to create and maintain shared hosting servers. It installs all the required packages which are necessary for the full-featured web server. The application has very small memory footprint which enables us to install the software in servers having RAM as low as 1 GB. CWP currently supports only CentOS 6.x, RHEL 6.x and CloudLinux 6.x.

Although CWP provides lots of features, a few main features are:

  • Web server: Apache with Varnish cache, nginx and ModSecurity, for improved performance and security.
  • PHP 5.4 with PHP switcher and selector feature which support almost all the versions of PHP including development versions. It also provides PHP editor.
  • SQL: MySQL/MariaDB, phpMyAdmin, user and database management, PostgreSQL with phpPgAdmin support, Remote MySQL support.
  • User management: Add and remove users, manage SSH login, user FTP manager, user limits management and user monitoring.
  • Email: Postfix and Dovecot, RoundCube webmail, SpamAssassin, SPF and DKIM integration, Autoresponders.
  • Various detailed system information and configuration along with live monitoring of the resources used.
  • Includes CSF firewall, SSL generator, Let’s free SSL for all the domains with Certificate manager to install 3rd party SSL certificates.

In this tutorial, we will learn to install and configure CentOS web panel on CentOS 6 server. These steps are also applicable for CloudLinux 6.x and RHEL 6.x operating systems. Be sure that CWP installation heavily modifies the system and there is no uninstaller, you will need to reinstall the operating system to remove the installation.

Requirements

To install CentOS web panel you will need at least 512 MB RAM for 32bit systems and 1GB RAM for a 64-bit system and at least 10 GB disk space. These specifications can be used to host a few domains with moderate traffic, but for hosting large websites you will need more resources. Recommended is 4GB RAM for using all the features of CWP like antivirus to scan mails etc. You will also need a fresh minimal installation of CentOS 6.x, RHEL 6.x or CloudLinux 6.x and a static IP address. Root access to the server is also required if you are logged in as a non-root user, run sudo -i command to login as root user.

Installing CWP

The first thing to do is to setup the hostname for your server. A hostname is an FQDN which can not be same as the domain name you want to host on the server. For example, if you have a domain example.com, you can use hostname such as host.example.com. Run the following command to set the hostname.

hostname host.example.com

Now you will need to install wget to download the installation script.

yum -y install wget

Now update the server to make sure all the packages on the system and the kernel is updated. Once the server is updated, reboot it so that the updates are properly installed.

yum -y update
reboot

Once the server is up again, log in as root user and run the following commands to download and run the CWP installer script.

cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest

The default CWP installer will install MySQL 5.1 as a database server. But recommended is that you install MariaDB instead, you can install it using the following command with an additional argument.

sh cwp-latest -d mariadb

Installation of CWP takes around 10 to 25 minutes according to the speed of your internet connection. Once the installation is finished, it will show you the URL to CWP login along with your MySQL/MariaDB root password. The root password for CWP root account is same as server root account. Write down or copy the password in a safe place and press Enter button to reboot the machine.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/2076509715.jpg” alt=”” />

CentOS web panel allows access to the admin GUI on normal HTTP connection as well as the SSL secured connection. It is recommended to use the secured connection only. Now you can open your favorite browser to access the Admin GUI. If you are using the unsecured connection then go to the following address.

http://your-server-ip:2030

To access the Admin GUI on a secure connection, use the following address. It might show you an error about the SSL certificate, ignore the error as we are using a self-signed certificate on securing the connection.

https://your-server-ip:2031

You will see a similar screen as shown below.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/1170365447.jpg” alt=”” />

The root user is root and the password is same as the root password of the server. If you are using key based login for your server, then you will need to run passwd command after logging in as root user in the terminal to set a password for root user. You can select Fast login check box to avoid execution of scripts for statistics and check resulting in faster login.

Once you are logged in you will see the Admin GUI like shown below.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/2135752178.jpg” alt=”” />

Now we need to configure few things before we start hosting the website on the server.

Setup Root Email

Setting up root email is necessary as all the system related warning and notifications will be sent to this email. You can simply click on Set Root Email button under warning on the dashboard or you can go to CWP Settings >> Edit Settings from the left sidebar.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/1733717958.jpg” alt=”” />

Enter your email in Root Email, and if you check Forward root emails then system will forward the root emails also, for example, emails from Cron jobs. Click Save changes button.

Setup Nameservers

CentOS web panel runs its own DNS server. To use the DNS server you will need to set up Nameservers to CWP. CWP will create two subdomains with nameserver entries. Setting up Nameservers are important as whenever you will add a domain to CWP, you will need to set up nameservers with domain so that the domain can point to your server. You can also use FreeDNS service of CWP. To setup, the DNS you will need to go to DNS functions >> Edit Nameserver IPs. Enter the nameserver and the IP address of your server. If you have more than one IP address you can use two different IPs or if you have just one IP address, you can simply enter the same IP address in both the nameservers.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/710713509.jpg” alt=”” />

Once you entered the nameservers, select both the checkbox of Overwrite DNS Zone files and Restart DNS Server. For changes to take effect, it is necessary to restart BIND DNS service.

It is also necessary to register the nameservers with your domain provider. You can do it easily using the domain control panel provided by the domain registrar.

Adding Packages

To add a package in CWP, you will need to go to Packages >> Add Package. In Add package interface, enter a name for your new package. Enter Disk space limit, bandwidth limit and other limits like FTP, sub-domains and database too. Enter 0 to provide unrestricted resources to the package.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/1564715745.jpg” alt=”” />

Click Create button and it will create the package for you. You can check the list of packages in Packages >> List Packages.

Adding a User Account

Before we can host the domains, we will also need to create at least one user account. To create a user account go to User Accounts >> New Account.

In New Account interface provide the main domain for the user, this domain will also be added. Next provide the username of the user in 8 characters and enter a password for the user. Choose a server IP address and the package for the domain. Choose how many inodes can the user have in the file system. inodes is a file system object such as file or directory, enter 0 for unlimited inodes. Provide an email for the new user. Select backup user, and CWP will automatically create backups of the user. Check the Shell Access checkbox to provide the shell access to this user, if you do not select this, then the user won’t be able to login to the server using SSH. Provide the maximum number of processes available to the user and the maximum number of open files available to the user.

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/972971309.jpg” alt=”” />

Adding a Domain

Although you have added a domain while creating the user, to add more domains go to Domains >> Add Domain. In New Domain interface,

HP_NO_IMG/data/uploads/users/e840080c-7322-4497-85c0-150182bd4c02/598425193.jpg” alt=”” />

Enter the domain name you want to host, select the user to associate the domain with. Finally provide the document root path for the domain, you can leave the default value unchanged.

Conclusion

In this tutorial, we have learned how to install CentOS web panel on CentOS 6. You can easily use the same instructions to install CWP on RHEL 6.x and CloudLinux 6.x. We also learned the basic server configuration like setting up nameservers, adding packages and user. You can now easily use CWP to host your websites on shared server.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]