[CentOS 7] How to upgrade PHP version on CentOS 7
Sabtu, 02 September 2023
Tulis Komentar
This tutorial will show you how to upgrade PHP 5.4 to PHP 7.4 on CentOS 7
To install PHP type the next command:
# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfoType the following command to see the current PHP version:
# php -v PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
As you can see the default PHP version is 5.4, and now we will update it.
Turn on Remi repo:
# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpmInstall yum-utils packages:
# yum install yum-utilsThe yum-utils package includes yum-config-manager, which you can use to enable Remi repo as the default repository for installing different PHP versions.
If you want to install PHP 7.1, PHP 7.2, PHP 7.3, or PHP 7.4 on CentOS 7, just enable it as below.
# yum-config-manager --enable remi-php71 # yum-config-manager --enable remi-php72 # yum-config-manager --enable remi-php73 # yum-config-manager --enable remi-php74
For this tutorial, I will choose PHP 7.4
# yum-config-manager --enable remi-php74Now you should refresh the repository:
# yum updateChecking PHP version one more time:
# php -v PHP 7.4.2 (cli) (built: Jan 21 2020 11:35:20) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
Sumber : https://unihost.com/help/how-to-update-php-centos-7/


Belum ada Komentar untuk "[CentOS 7] How to upgrade PHP version on CentOS 7"
Posting Komentar