12 Aug 2018

Install VestaCP on CentOS 7 VPS / Cloud Server

How to Install VestaCP on CentOS 7 x64 on VPS / Cloud Server

In this tutorial we will guide you how to install VestaCP on  CentOS 7×64 VPS/Cloud Server.

VestaCP is an open source hosting control panel currently supports both RHEL flavoured Linux releases (Red Hat, CentOS) and Ubuntu LTS 12.04 to Ubuntu 18.04. It comes with all necessary software to run and manage your websites hosted on your VPS, including:

Recommended requirements for installing and Running VestaCP:

  • 1Ghz Processor
  • 1GB RAM
  • 20GB HDD


Supported OS:

  • RHEL / CentOS 5, 6, 7
  • Debian 7, 8, 9
  • Ubuntu 12.04 – 18.04


All our Cloud Server Plans support VestaCP Free Control Panel. Feel free to contact us for installation support on our VPS Plans.

The first step for installing VestaCP is to login to your VPS with your root data – use putty client to connect.
Run the following command :

curl -O http://vestacp.com/pub/vst-install.sh

Then run the following command : 

bash vst-install.sh –nginx yes –apache yes –phpfpm no –named yes –remi yes –vsftpd yes –proftpd no –iptables yes –fail2ban yes –quota no –exim yes –dovecot yes –spamassassin yes –clamav yes –softaculous yes –mysql yes –postgresql no

You will be asked to proceed,
enter Y.
You will be asked to enter admin email address and FQDN – This can be whatever you want, but generally it’s a domain name, like
The FQDN selected will be set to the Hostname of the server, Also VestaCP will add the domain under Websites which can be later removed.
The installer also asks to enter valid email address. So type your valid email address and double-check it to make sure your email is correct because VestaCP will also send your admin password there
The installation will now start, It should take about 15 minutes for the installation to complete.
The installer with the command will install the following and their dependencies.
  • Nginx Web Server
  • Apache Web Server (as backend)
  • Named DNS Server
  • Exim mail server
  • Dovecot POP3/IMAP Server
  • MySQL Database Server (MariaDB)
  • vsftpd FTP Server
  • Iptables Firewall + Fail2Ban
  • Roundcube mail client
  • Softaculous
  • Additional repository: REMI


After installation is completed VestaCP login information displayed on your screen, please save them.

Install VestaCP on Centos - Installation Completed

Login to VestaCP

Now open up your favourite browser and login to VestaCP web-based UI using your VPS IP or Hostname at port 8083, Please note the protocol should be https://
Login to VestaCP control Panel with the Username: admin and the Password which was given on the completion screen. If you had entered an valid email address during installation it would have sent your login credentials to your email as well.
Install VestaCP on Centos - VestaCP Login


Install VestaCP on Centos - VestaCP Admin Interface


Congratulation! You now have Vesta CP installed and a ready-to-use VPS to host all your websites.

If you are hosting with us please feel free to contact us for installation assistance on any of our Dedicated Servers or VPS / Cloud Servers.


Share this
01 Aug 2018

First Steps After Getting a CentOS VPS / Cloud Server

First Steps After Getting a CentOS  VPS / Cloud Server

In this tutorial, we will go through everything you need to do in order to setup your new CentOS Server.

Even though you can start using your server immediately, there are many additional things and tweaks you can do to get the most out of your new server and improve its security.

1. Connect to your VPS

The first thing you should do is to connect to your server via SSH. You will need to know the IP address and the SSH port of your server.
There are different ways to connect to your server, depending on the operating system you use.
For Windows, you can use a free open source application called PuTTY.
For Linux or Mac, you can use the Terminal.

2. Update your server

The next step, after successfully connecting to your server, is to update your server. On CentOS you can do this with the following command:

yum update

This will update the already installed packages on your system and install the latest security updates.
You should regularly update your server. Try to set up a reminder for yourself to do it at least once a month or optionally you can enable automatic updates, so you don’t have to do it manually.

3. Secure your server

Securing your server properly is one of the most important steps you need to do after getting a new VPS.
If you are a beginner and you are not familiar with CentOS servers, you can get a Managed CentOS Server from us and our expert Linux admins will secure the server for you.

Use strong passwords

No matter how many defensive mechanisms you use to secure your server, nothing can protect your server if you are using weak passwords.
So the most basic and simple way to secure your server is to use strong passwords.

Here are some general guidelines you should follow when creating a new password:
– make sure the password is at least 8 characters long
– use a combination of both lower and upper case letters
– use at least one numeric and/or special character signs (#,$,%, etc)

Secure SSH Access

Usually, a password authentication is used to connect remotely via SSH. You can harden your SSH access by using SSH keys instead.

Set up a firewall

One of the most important and crucial steps you can do to secure your server is configuring and setting up a firewall. You can check out our detailed guides on how to properly configure a firewall on your CentOS server using iptables or FirewallD.

In order to further protect your server from brute-force attacks, you can additionally install Fail2ban.

Next steps

From here, you can start using your server for any purpose you want.
You can set up a LAMP or LEMP stack and use it as a web server to host your websites.
You can set up a mail server.
You can set up an FTP server.
And many other things. You can check our blog and find many additional tutorials, tips, and tricks that you can use to further customize your server for your needs.

Of course, if you have a CentOS Server with us, you can simply ask our expert Linux admins to help you with anything you need. They are available 24×7 and will take care of your request immediately.

Share this
04 Sep 2017

How To Install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 7

Installing Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 7


A “LAMP” stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MySQL database (using MariaDB), and dynamic content is processed by PHP.

In this guide, we’ll get a LAMP stack installed on an CentOS 7 Server / VPS. CentOS will fulfill our first requirement: a Linux operating system.

Step One — Install Apache

The Apache web server is currently the most popular web server in the world, which makes it a great default choice for hosting a website.

We can install Apache easily using CentOS’s package manager, yum. A package manager allows us to install most software pain-free from a repository maintained by CentOS.

For our purposes, we can get started by typing these commands:

sudo yum install httpd

Since we are using a sudo command, these operations get executed with root privileges. It will ask you for your regular user’s password to verify your intentions.

Afterwards, your web server is installed.

Once it installs, you can start Apache on your VPS:

sudo systemctl start httpd.service

You can do a spot check right away to verify that everything went as planned by visiting your server’s public IP address in your web browser (see the note under the next heading to find out what your public IP address is if you do not have this information already):


You will see the default CentOS 7 Apache web page, which is there for informational and testing purposes. It should look something like this:

CentOS 7 Apache default - LAMP

CentOS 7 Apache default

If you see this page, then your web server is now correctly installed.

The last thing you will want to do is enable Apache to start on boot. Use the following command to do so:

sudo systemctl enable httpd.service

How To Find your Server’s Public IP Address

If you do not know what your server’s public IP address is, there are a number of ways you can find it. Usually, this is the address you use to connect to your server through SSH.

From the command line, you can find this a few ways. First, you can use the iproute2 tools to get your address by typing this:

ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'

This will give you one or two lines back. They are both correct addresses, but your computer may only be able to use one of them, so feel free to try each one.

An alternative method is to use an outside party to tell you how it sees your server. You can do this by asking a specific server what your IP address is:

curl http://icanhazip.com

Regardless of the method you use to get your IP address, you can type it into your web browser’s address bar to get to your server.

Step Two — Install MySQL (MariaDB)

Now that we have our web server up and running, it is time to install MariaDB, a MySQL drop-in replacement. MariaDB is a community-developed fork of the MySQL relational database management system. Basically, it will organize and provide access to databases where our site can store information.

Again, we can use yum to acquire and install our software. This time, we’ll also install some other “helper” packages that will assist us in getting our components to communicate with each other:

sudo yum install mariadb-server mariadb

When the installation is complete, we need to start MariaDB with the following command:

sudo systemctl start mariadb

Now that our MySQL database is running, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system a little bit. Start the interactive script by running:

sudo mysql_secure_installation

The prompt will ask you for your current root password. Since you just installed MySQL, you most likely won’t have one, so leave it blank by pressing enter. Then the prompt will ask you if you want to set a root password. Go ahead and enter Y, and follow the instructions:

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorization.

New password: password
Re-enter new password: password
Password updated successfully!
Reloading privilege tables..
 ... Success!

For the rest of the questions, you should simply hit the “ENTER” key through each prompt to accept the default values. This will remove some sample users and databases, disable remote root logins, and load these new rules so that MySQL immediately respects the changes we have made.

The last thing you will want to do is enable MariaDB to start on boot. Use the following command to do so:

sudo systemctl enable mariadb.service

At this point, your database system is now set up and we can move on.

Step Three — Install PHP

PHP is the component of our setup that will process code to display dynamic content. It can run scripts, connect to our MySQL databases to get information, and hand the processed content over to our web server to display.

We can once again leverage the yum system to install our components. We’re going to include the php-mysql package as well:

sudo yum install php php-mysql

This should install PHP without any problems. We need to restart the Apache web server in order for it to work with PHP. You can do this by typing this:

sudo systemctl restart httpd.service

Install PHP Modules

To enhance the functionality of PHP, we can optionally install some additional modules.

To see the available options for PHP modules and libraries, you can type this into your system:

yum search php-

The results are all optional components that you can install. It will give you a short description for each:

php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
php-devel.x86_64 : Files needed for building PHP extensions
php-embedded.x86_64 : PHP library for embedding in applications
php-enchant.x86_64 : Enchant spelling extension for PHP applications
php-fpm.x86_64 : PHP FastCGI Process Manager
php-gd.x86_64 : A module for PHP applications for using the gd graphics library
. . .

To get more information about what each module does, you can either search the internet, or you can look at the long description in the package by typing:

yum info package_name

There will be a lot of output, with one field called Description which will have a longer explanation of the functionality that the module provides.

For example, to find out what the php-fpm module does, we could type this:

yum info php-fpm

Along with a large amount of other information, you’ll find something that looks like this:

. . .
Summary     : PHP FastCGI Process Manager
URL         : http://www.php.net/
License     : PHP and Zend and BSD
Description : PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
            : implementation with some additional features useful for sites of
            : any size, especially busier sites.

If, after researching, you decide you would like to install a package, you can do so by using the yum install command like we have been doing for our other software.

If we decided that php-fpm is something that we need, we could type:

sudo yum install php-fpm

If you want to install more than one module, you can do that by listing each one, separated by a space, following the yum install command, like this:

sudo yum install package1 package2 ...

At this point, your LAMP stack is installed and configured. We should still test out our PHP though.

Step Four — Test PHP Processing on your Web Server

In order to test that our system is configured properly for PHP, we can create a very basic PHP script.

We will call this script info.php. In order for Apache to find the file and serve it correctly, it must be saved to a very specific directory, which is called the “web root”.

In CentOS 7, this directory is located at /var/www/html/. We can create the file at that location by typing:

sudo vi /var/www/html/info.php

This will open a blank file. We want to put the following text, which is valid PHP code, inside the file:

<?php phpinfo(); ?>

When you are finished, save and close the file.

If you are running a firewall, run the following commands to allow HTTP and HTTPS traffic:

sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

Now we can test whether our web server can correctly display content generated by a PHP script. To try this out, we just have to visit this page in our web browser. You’ll need your server’s public IP address again.

The address you want to visit will be:


The page that you come to should look something like this:

LAMP Stack - PHP

Php Install on centos 7

This page basically gives you information about your server from the perspective of PHP. It is useful for debugging and to ensure that your settings are being applied correctly.

If this was successful, then your PHP is working as expected.

You probably want to remove this file after this test because it could actually give information about your server to unauthorized users. To do this, you can type this:

sudo rm /var/www/html/info.php

You can always recreate this page if you need to access the information again later.

Share this

© 2006 - 2018 WebDios Technologies - www.webdios.com. All rights reserved.

Click Me