In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I would like to share with you the relevant knowledge points about how to install PHP 7.4 manual on CentOS. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article.
Add EPEL and Remi repositories
First, you need to add an EPEL&Remi repository where you can install PHP 7.4 on CentOS 8 Linux.
To install and enable the EPEL repository on CentOS 8, execute the following dnf command.
[root@localhost www.linuxidc.com] # dnf install https://dl.Fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
To confirm the existence of the EPEL repository, run the following rpm command.
[root@localhost www.linuxidc.com] # rpm-qa | grep epelepel-release-8-7.el8.noarch
Next, run the following command to add the Remi repository.
[root@localhost www.linuxidc.com] # dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Again, to verify the existence of the Remi repository, run the command.
[root@localhost www.linuxidc.com] # rpm-qa | grep remiremi-release-8.0-4.el8.remi.noarch
Install PHP 7.4 on CentOS 8
After successfully adding the EPEL and Remi repositories, execute the following command to get a list of available PHP module streams.
[root@localhost www.linuxidc.com] # dnf module list phpRemi's Modular repository for Enterprise Linux 7.6 kB/s | 508 kB 01:06 Safe Remi's RPM repository for Enterprise Linux 12 kB/s | 1.4 MB 01:54
Last metadata expiration check: before 0:00:34, performed at 00:20:37 on Thursday, November 7, 2019.
CentOS-8-AppStreamName Stream Profiles Summary php 7.2 [d] common [d], devel, minimal PHP scripting language Remi's Modular repository for Enterprise Linux 8-x86_64Name Stream Profiles Summary php remi-7.2 common [d], devel, minimal PHP scripting language php remi-7.3 common [d], devel Minimal PHP scripting language php remi-7.4 common [d], devel, minimal PHP scripting language Hint: [d] efault, [e] nabled, [x] disabled, [I] nstalledCentOS 8 install PHP 7.4 manual on CentOS 8 install PHP 7.4 manual
From the output above, remi-7.4 is the latest PHP stream, so we will enable the module flow, as shown below.
[root@localhost www.linuxidc.com] # dnf module enable php:remi-7.4 Last metadata expiration check: before 0:00:38, performed on Thursday 07 November 2019 at 00:21:47. Dependency resolution. = package schema version repository size = Enabling module streams:httpd 2.4 php remi-7.4 transaction summary = = are you sure? [y/N]: y
Over!
Switching module streams does not change installed packages (for more information, see "Module enabled" in dnf (8))
Once the PHP remi-7.4 module is enabled, you can continue and install PHP using the following command. This will also install many other software packages, such as Apache and Nginx modules.
[root@localhost www.linuxidc.com] # dnf install php php-cli php-common
To check the installed version of PHP, run the command.
[root@localhost www.linuxidc.com] # php-vPHP 7.4.0RC5 (cli) (built: Oct 29 2019 08:49:19) (NTS) Copyright (c) The PHP GroupZend Engine v3.4.0-dev, Copyright (c) Zend Technologies with Zend OPcache v7.4.0RC5, Copyright (c), by Zend Technologies
From the output, we can clearly see that we have installed PHP version 7.4! You can now continue to test and deploy the application using PHP.
These are all the contents of the article "how to install PHP 7.4 on CentOS". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.