VestaCP,  Linux

Speed up VestaCP on CentOS 7

Let’s Learn  how to Speed up VestaCP on CentOS 7. Vesta Control Panel is an open source hosting control panel that is simple and easy to use. The interface is clean and simple with lots of useful functionalities which should help you host websites on your VPS.
Vesta Control Panel currently can be installed on RHEL 5, RHEL 6, CentOS 5, CentOS 6, CentOS 7, Debian 7, Debian 8, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04, Ubuntu 13.10, Ubuntu 14.04, and Ubuntu 16.04 operating systems.
In this tutorial,  we will teach you how to speed up VestaCP on CentOS 7.

Step 1: Upgrading PHP

Before you begin, make sure that your system is up-to-date.

Next, enable the ‘remi-php70’ so you can upgrade VestaCP to PHP 7:

Update the system once more using this command that will upgrade every PHP package to PHP 7.

Next, restart the php-fpm service.

Step 2: Installing Opcache

Opcache can be installed simply and by executing the command below.

Restart the php-fpm service once more:

Restart Nginx as well.

Now check if Opcache has been enabled by executing the command below.

If Opcache is enabled, you will receive something like the output shown here.

Step 3: Upgrading MariaDB

Before starting, create a backup from all of the databases.
Instead of the conventional ‘mysqldump’ utility, VestaCP CLI can be used to generate a backup for all of the users on your system. If you would like to do that, execute the following.

To restore the backup, if you want to, begin by retrieving the backup file name by entering the following.

Now execute the command below to restore all the databases for a specific user:

Swap ‘<username>’ for the username you’d like to restore the databases for and ‘<backup_name> ‘for the name of the backup retrieved by the v-list-user-backups command.
You can now upgrade MariaDB. Begin by deleting the old MariaDB version:

Append the repository for Mariadb 10 by making the repo file with nano and then pasting the text below.

Update the system another time.

You can now install MariaDB 10.

Once the installation is done, initiate MariaDB by executing the command shown below.

Now enable the MariaDB service on boot:

Step 4: Installing Redis

Redis is an in-memory data structure store mainly used as a database and cache; A large benefit to speed can be gained by configuring Redis to cache your pages or to cache your database rows.
Install Redis by entering the command below.

Once the yum package manager is done installing Redis, enter in the command below to initiate Redis.

We may now enable the Redis service so that it initiates on boot.

Step 5: Configuring WordPress

If you would like to use WordPress for your site, it could be a good choice to install Redis as a caching system for WordPress.
This will require the Phpredis extension in order to configure WordPress to use Redis. First install this package.

Next, install the Phpredis extension by executing this command.

Press enter once the message below shows up.

Once PECEL is done installing Phpredis, open the ‘php.ini’ file and append the following line at the bottom.

Restarting ‘php-fpm’ will allow the changes to take affect.

Log into the WordPress backend and install the plugin ‘W3 Total Cache’ before activating it.
In the plugin settings for W3 Total Cache, choose ‘Redis’ as page cache and database cache then check the ‘enable’ checkbox for each option before clicking on the ‘Save all settings’ button.
Once this is done, restart Nginx.

Next, turn on the Redis monitor by executing the command below.

Open the web browser of your choice and navigate to your WordPress page. If Redis is working, you will see an output similar to the one shown below.

Tui là jamesblackvn!

Gửi phản hồi

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.