News, Reviews, Giveaways and Videos!

VestaCP a cPanel alternative: Everything you need to know including setup and upgrade.

VestaCP or Vesta Control Panel is cPanel alternative, which can be installed on a VPS or a Dedicated Server, Vesta is licensed under GPL v3 license. Vesta control panel (VestaCP) is an open source hosting control panel, which can be used to manage multiple websites, create and manage email accounts, FTP accounts, and MySQL databases, manage DNS records and more.

It is small in size a takes very little time to install. It allows you run as nginx+apache / nginx+php-fpm / apache only

It is also available on AWS (Amazon Web Servives)

Its light weighted Web interface is open source php and javascript interface based on Vesta open API,
it uses 381 vesta CLI calls

Vesta core is written in bash. It is native programming language of linux server administrators. They see dreams in bash, thats why vesta grows so fast. Server admins are those people who know how to fix problems and how server inner structure should look like. Bash and gpl allows Vesta to fix problems and implement new features very fast.

VestaCP Web Interface

Server Requirements: CentOS/Debian/Ubuntu

Installation is  simple, Login as root user to your server via ssh and run the following commands:

  1. # Connect to your server as root via SSHssh [email protected]
  2. # Download installation script ‘curl -O http://vestacp.com/pub/vst-install.sh’
  3. # Run it ‘bash vst-install.sh’

This way you will install with default setting, to further customize it visit Advanced Install Setting on Vestacp install page to add or remove components according to your needs.

Here i am providing you the best install options for small servers:

  • # ssh [email protected]
  • # curl -O http://vestacp.com/pub/vst-install.sh
  • # bash vst-install.sh –nginx no –apache yes –phpfpm no –named yes –remi yes –vsftpd yes –proftpd no –iptables yes –fail2ban yes –quota no –exim no –dovecot no –spamassassin no –clamav no –softaculous no –mysql yes –postgresql no –hostname your.hostname.com –email [email protected] –password yourpassword

Note: Replace with your hostname/email and password above.

Now come the customization part, the number one thing you need to do is to change the default page of every new domain added, browse to the below location to change/edit/replace

  • # /usr/local/vesta/data/templates/web/skel/public_html/index.html

Now check the version of installed php with :

  • # php -v

Now check the mysql version installed

  • # mysql -V

Some Important php modules you might want to install as its needed by many scripts:

  • # yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo php-imap

If you are happy with installed version then start using it, in case you want to upgrade or downgrade php and mysql versions follow:

Downgrade php 7.4 to 7.3 or earlier

  • # yum install yum-utils -y
  • # yum-config-manager –disable remi-php5*
  • # yum-config-manager –disable remi-php74
  • # yum-config-manager –disable remi-test
  • # yum-config-manager –enable remi-php73
  • # yum remove php php-* -y
  • # yum install roundcube phpmyadmin -y
  • # service httpd restart

Note on line 5 (yum-config-manager –enable remi-php73) you can replace it with any php version you want for example : yum-config-manager –enable remi-php72

After this the you should have PHP 7.3 (or any other version you selected) up and running:
Important Note: Now you will get phpmyadmin permission error when you try to access, to fix this run below commands:

  • # cd /etc/httpd/conf.d/
  • # rm phpMyAdmin.conf
  • # rm roundcubemail.conf
  • # mv phpMyAdmin.conf.rpmsave phpMyAdmin.conf
  • # mv roundcubemail.conf.rpmsave roundcubemail.conf
  • # service httpd restart

Now install php Opcache to further improve the performance:

  • # yum install php-opcache -y
  • # service httpd restart

Upgrade MariaDB/MySQL:

First take backup of all database:

  • # mysqldump -u root -ppassword –all-databases > /tmp/all-database.sql
    (replace “password” with real root pass)

And copy the databases directory in a separate folder like this:

  • # cp -a /var/lib/mysql/ /var/lib/mysql.bak

–You can skip above steps of you have no db or just installed server

Now stop maradb services:

  • # service mariadb stop

Create file /etc/yum.repos.d/mariadb.repo

  • # nano /etc/yum.repos.d/mariadb.repo

paste the below code into this file:

# MariaDB 10.5 CentOS repository list – created 2020-12-08 18:44 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

and save the file
Note: We can create custom repo for mariadb here: https://downloads.mariadb.org

Now run the below codes:

  • # yum update
  • # service mysql start
    or
  • # service mariadb.service start
  • # systemctl enable mariadb.service
  • # mysql_upgrade

done

restart apache

How to transfer Vestacp to a new Server?:

taking backup on old server:

  • # v-backup-user admin

copying backup files to new server:

  • # scp /home/backup/admin.2020-04-30_10-29-25.tar <new-server’s-ip>:/home/backup/
    (here “new-server” is hostname of new server or ip)

restore on new server:
login and install vestacp then follow steps

  • # v-restore-user admin admin.2021-04-30_10-29-25.tar
    (imp: if returns error command not found then try this:)
  • # bash -x /usr/local/vesta/bin/v-restore-user admin admin.2021-01-14.tar
    done

If you are facing any error or issue feel free to comment below, i will try to help you as soon as possible.

100%
Awesome
  • Code
Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

How to whitelist website on AdBlocker?