Tuesday 18 August 2020

How to Install PHP 7.2 on CentOS 8 [AppStream Repo]




PHP is free and open source programming language. It is widely used Linux based system to write application. PHP package is available in CentOS 8 AppSteam repository.

This article describes How to Install PHP 7.2 on CentOS 8 [AppStream Repo].

Step 1. Search the package: Run the following command to list out the package using yum command on CentOS 8:

[root@linuxcnf ~]# dnf list php
Last metadata expiration check: 0:58:40 ago on Tue 18 Aug 2020 10:12:50 AM EDT.
Available Packages
php.x86_64                                                        7.2.24-1.module_el8.2.0+313+b04d0a66                                                         AppStream
[root@linuxcnf ~]#

PHP 7.2.24-1 version is available for installation.

Step 2. Package Installation: Run the following command to install PHP 7.2.24 package and its dependencies.

[root@linuxcnf ~]# dnf install @php
CentOS-8 – AppStream
………………………..
Installed:
  php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
………………………..
Complete!
[root@linuxcnf ~]#

Step 3. Verify the installation: Run the following command to verify the installation:

[root@linuxcnf ~]# php --version
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@linuxcnf ~]#

Done!!! PHP 7.2.24 is successfully installed on CentOS 8.

No comments:

Post a Comment