SystemMen - In this article, I will show you how to update VestaCP to PHP 7.3.
By default with the current version (the time of this article), VestaCP will install PHP 5.6.40.
This may not seem optimal when PHP 7.3 was born. And it has also demonstrated higher performance.
Update VestaCP to PHP 7.3
Recommended Reading: How to install VestaCP in CentOS 7
You will in turn take the following steps to update PHP for your VestaCP.
First, check the current PHP version.
[root@vestacp ~]# php -v PHP 5.6.40 (cli) (built: Apr 2 2019 12:46:42) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Next, you need to install EPEL package.
yum install epel-release -y
And next, we will use Remi’s repository to update PHP packages.
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm rpm -Uvh remi-release-7.rpm
Activate PHP using Remi’s 7.3 repository.
yum-config-manager --enable remi-php73
If you get an error in this command like this.
-bash: yum-config-manager: command not found
You need to install the yum-utils
package to fix the error.
yum install yum-utils -y
And finally, implement PHP update for VestaCP. The process may take several minutes.
yum update -y
After update finish, restart the php-fpm service.
service php-fpm restart
Then, check the version after the update. It has successfully updated.
[root@vestacp ~]# php -v PHP 7.3.4 (cli) (built: Apr 2 2019 13:48:50) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
Conclusion
With only a few steps, you have successfully completed the update to PHP 7.3.4 so it has better performance. In the next article, I will guide you to update MariaDB.
«« How to install VestaCP in CentOS 7How to update VestaCP to MariaDB 10.3 »»
Chào Dũng, mình bị lỗi khi update php từ 5.6 lên 7.x
đến bước
yum update -y
thì mình bị lỗi như này
Error: Package: clamav-server-0.99.2-1.el7.x86_64 (@epel)
Requires: libclamav.so.7()(64bit)
Removing: clamav-lib-0.99.2-1.el7.x86_64 (@epel)
libclamav.so.7()(64bit)
Updated By: clamav-lib-0.102.4-1.el7.x86_64 (epel)
~libclamav.so.9()(64bit)
Error: Package: clamav-server-0.99.2-1.el7.x86_64 (@epel)
Requires: libclamav.so.7(CLAMAV_PRIVATE)(64bit)
Removing: clamav-lib-0.99.2-1.el7.x86_64 (@epel)
libclamav.so.7(CLAMAV_PRIVATE)(64bit)
Updated By: clamav-lib-0.102.4-1.el7.x86_64 (epel)
~libclamav.so.9(CLAMAV_PRIVATE)(64bit)
Error: Package: clamav-server-0.99.2-1.el7.x86_64 (@epel)
Requires: clamav-filesystem = 0.99.2-1.el7
Removing: clamav-filesystem-0.99.2-1.el7.noarch (@epel)
clamav-filesystem = 0.99.2-1.el7
Updated By: clamav-filesystem-0.102.4-1.el7.noarch (epel)
clamav-filesystem = 0.102.4-1.el7
Error: Package: clamav-server-0.99.2-1.el7.x86_64 (@epel)
Requires: clamav-lib = 0.99.2-1.el7
Removing: clamav-lib-0.99.2-1.el7.x86_64 (@epel)
clamav-lib = 0.99.2-1.el7
Updated By: clamav-lib-0.102.4-1.el7.x86_64 (epel)
clamav-lib = 0.102.4-1.el7
Error: Package: clamav-server-0.99.2-1.el7.x86_64 (@epel)
Requires: libclamav.so.7(CLAMAV_PUBLIC)(64bit)
Removing: clamav-lib-0.99.2-1.el7.x86_64 (@epel)
libclamav.so.7(CLAMAV_PUBLIC)(64bit)
Updated By: clamav-lib-0.102.4-1.el7.x86_64 (epel)
~libclamav.so.9(CLAMAV_PUBLIC)(64bit)
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
rất mong được Dũng trả lời sớm, xin cảm ơn !