Support : Cara Update PHP Version Dalam VestaCP Run On Centos 7

Soalan : Bagaimana Update Versi PHP Dalam VestaCP

Untuk update versi PHP anda boleh ikuti tutorial dibawah. Namun sebelum bermula, anda perlukan software bagi mengakses VPS anda menggunakan Command.

Untuk pengguna Windows, anda perlu download Putty.

Download Putty Dari Laman Official

Langkah Pertama Dapatkan IP Address Dan Password VPS Anda

Pasang putty dan ia akan kelihatan seperti dibawah.

Username : root

Kemudian tekan enter

Password :

Copy password anda dari email, kemudian paste dengan klik right klik mouse. Nanti password anda akan di copy ke putty, tetapi ia tidak akan kelihatan.

Cuma pastikan anda dah right click password tersebut di putty, kemudian tekan enter.

Nanti anda akan login ke VPS anda.

Tutorial Cara Tukar PHP Versi

Ini merupakan setting untuk Centos 7 sahaja

STEP 1 : Install Remi Repository and EPEL Repository on your server

Run this command one by one

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

STEP 2 : After you have installed repository you need to follow some extra configurations
Run this command one by one

yum install yum-utils
yum-config-manager --enable remi-php72

STEP 3 : Now just run this command

yum update -y

You’ll see php packages are getting updated, After the update process you need to restart Apache server/php-fpm-(nginx) and check the php version from by below mentioned command

php -v

You will see your server now using PHP V7 like below

[root@server ~]# php -v
PHP 7.2.7 (cli) (built: Jun 20 2018 08:21:26) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.7, Copyright (c) 1999-2018, by Zend Technologies