PHP is free and open source programming language. It is widely
used Linux based system for web application developments. PHP 5.4.xx packages
are available in CentOS 7 base/default repositories which are old versions and
about to end of life.
This article describes How to Install PHP 7.x on CentOS 7 from
other third party repositories.
Step 1. Setup Remi Repository: Follow the article Howto install Remi Repository on CentOS 7 to install latest version of PHP.
Step 2. List the packages: Run the following command
to list out PHP versions:
[root@linuxcnf ~]# yum list --enablerepo=remi-php73 php
Loaded plugins: fastestmirror, langpacks
…………………….
Available Packages
php.x86_64 7.3.11-1.el7.remi remi-php73
[root@linuxcnf ~]#
|
Here, the latest version 7.3 is available in the repository.
Step 2. Package Installation: Run the
following command to install PHP 5.4 package and its dependencies:
[root@linuxcnf ~]# yum install --enablerepo=remi-php73 php
Loaded plugins: fastestmirror, langpacks
………………………..
Installed:
php.x86_64 0:7.3.11-1.el7.remi
Dependency Installed:
libargon2.x86_64
0:20161029-3.el7 php-cli.x86_64
0:7.3.11-1.el7.remi php-common.x86_64
0:7.3.11-1.el7.remi php-json.x86_64
0:7.3.11-1.el7.remi
Complete!
[root@linuxcnf ~]#
|
Step 3. Verify the installation: Run the following
command to verify the installation:
[root@linuxcnf ~]# php --version
PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
[root@linuxcnf ~]#
|
Done!!! PHP 7.3 latest version is installed successfully.
No comments:
Post a Comment