How To Install Vesta Control Panel on CentOS 7

How To Install Vesta Control Panel on CentOS 7

Vesta Control Panel (VestaCP) is a free, open-source and powerful hosting control panel that enables you to manage multiple websites, DNS, database, email and many more functions. VestaCP offers a simple and user-friendly web-based interface. With one touch, VestaCP can install more than 439 apps.

In today’s tutorial, we will learn how we can install Vesta Control Panel on the CentOS 7 server and host a domain on the Vesta Control Panel.

Operating System:-

The list of operating systems that Vesta Control Panel supports.

Operating SystemVersions
RHEL / CentOS5, 6, 7
Debian7, 8, 9
Ubuntu12.04 – 18.10

Prerequisites

  • Fresh server with CentOS 7 operating system
  • Access of Root user or another user with Sudo privileges
  • The minimum requirement for VestaCP
    • 1 CPU
    • 512 MB of RAM
    • 20 GB of free space

Update the Server

We need to update all the repositories and packages on the server with the following command.

sudo yum update -y

Install pre-required packages

We need to install some pre-required packages before starting the panel installation. To install these pre-required packages, run the following command.

sudo yum install vim screen wget curl -y

Create the Swap file

A swap file is an essential component of the Panel. Swap is used to overcome RAM load when the server runs out of memory. In general, the swap file is twice the size of RAM. You should create it as shown in the following table.

RAMSWAP FILE
1 GB2 GB
2 GB4 GB
4 GB4 GB
  • First, check the RAM of the server with the following command.
sudo free -h
  • Allocate the free space for the swap file with the following command.
sudo dd if=/dev/zero of=/swapfile count=2048 bs=1M

Create the Swap file according to your server’s RAM.

  • Now change the Ownership of the swap file with the following command.
sudo chown root:root /swapfile
  • Change the permission of the swap file to avoid any type of modification.
sudo chmod 0600 /swapfile
  • Setup the swap file which we have created with the following command.
sudo mkswap /swapfile
  • Now enable the Swap file with the following command.
sudo swapon /swapfile
  • We need to make the swap file permanent. Otherwise, the swap file will be deleted automatically from the server after reboot. To make it permanent, edit and add some lines in the /etc/fstab file. To open the /etc/fstab file in edit mode, run the following command.
sudo vim /etc/fstab
  • Copy and paste the following data into the /etc/fstab file.
/swapfile swap swap defaults 0 0
  • Verify the above entries with the following command.
sudo mount -a
  • Now set the swappiness value to 10 with the following command.
sudo sysctl vm.swappiness=10
  • To make swappiness permanent, open the /etc/sysctl.conf in edit mode and add some lines to it. To open the /etc/sysctl.conf in edit mode, run the following command.
sudo vim /etc/sysctl.conf
  • Add the following data in /etc/sysctl.conf file.
vm.swappiness=10

Vesta Control Panel Installation

To install the Vesta Control Panel on the server, simply follow these steps one by one.

  • Now we need to download the installation script from their official websites. To download the Vesta control panel installation script, run the following command.
curl -O http://vestacp.com/pub/vst-install.sh
  • After downloading the script, grant the execution permission with the following command.
sudo chmod +x vst-install.sh
  • Run the installation script of Vesta CP with the following command.
sh vst-install.sh
  • Type y and hit the Enter button to start the installation.
  • Provide a valid email address for the panel, you can skip this step by pressing the Enter button. Now set a port on which you want to run the Vesta control panel, to select the default port simply press the Enter button. In the end, set a fully qualified hostname for the panel.
  • You will get the login details for the panel like this when the installation script got completed.
  • Enter the following URL in the browser.
https://server_ip:8083
  • Enter the login details and click on the Login button.
  • After login, you will land on the homepage of the Vesta Control Panel.

Add domain in VestaCP

To host a domain on the VestaCP, simple click on the WEB option and then click on the + button.

Type the domain name and click on the Add button to host the domain

Conclusion

In today’s tutorial, we have learned about the Vesta Control Panel, and how we can install the Panel and host a domain on the Vesta Control Panel. In the upcoming tutorials, we’ll also learn about other hosting panels such as cPanel, Plesk, etc.

If you guys have any queries or issues, then let me know in the comments section.