PHP is free and open source programming language. It is widely
used Linux based system to write application. The latest PHP packages are not
available in CentOS 8 AppSteam
repository.
[root@linuxcnf ~]# cat /etc/redhat-release
CentOS Linux release
8.5.2111
[root@linuxcnf ~]#
|
Step 1. Setup EPEL Repository: Follow
the article How
to configure EPEL repository on CentOS 8 to setup EPEL Repository.
Step 2. Setup REMI Repository: Follow
the article How
to Install REMI Repository on CentOS 8 to setup REMI Repository.
Step 3. Enable Remi Repository for PHP Installation: Run
the following command to enable REMI Repository for PHP 8.0 installation:
[root@linuxcnf ~]# dnf module enable php:remi-8.0
Remi's Modular
repository for Enterprise Linux
280 B/s | 858 B
00:03
Remi's Modular
repository for Enterprise Linux 3.0
MB/s | 3.1 kB 00:00
……………………..
Enabling module
streams:
php remi-8.0
Transaction Summary
========================================================
Is this ok [y/N]: y
Complete!
[root@linuxcnf ~]#
|
Step 4. PHP 8.0 Installation: Run
the following command to install PHP 8.0:
[root@linuxcnf ~]# dnf install php -y
……………………..
php-8.0.14-1.el8.remi.x86_64
php-cli-8.0.14-1.el8.remi.x86_64
php-common-8.0.14-1.el8.remi.x86_64
php-fpm-8.0.14-1.el8.remi.x86_64
php-mbstring-8.0.14-1.el8.remi.x86_64
php-opcache-8.0.14-1.el8.remi.x86_64
php-pdo-8.0.14-1.el8.remi.x86_64
php-sodium-8.0.14-1.el8.remi.x86_64
php-xml-8.0.14-1.el8.remi.x86_64
Complete!
[root@linuxcnf ~]#
|
Step 5. Validate PHP Installation: Run
the following command to validate/verify PHP installation:
[root@linuxcnf ~]# php -v
PHP 8.0.14 (cli)
(built: Dec 16 2021 03:01:07) ( NTS gcc x86_64 )
Copyright (c) The PHP
Group
Zend Engine v4.0.14,
Copyright (c) Zend Technologies
with Zend OPcache v8.0.14, Copyright (c),
by Zend Technologies
[root@linuxcnf ~]#
|
No comments:
Post a Comment