First, let me introduce how to install PHP on CentOS through yum 1. Add PHP's yum software repository sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm 2. Install PHP related software and select yes during the execution process sudo yum install php71w.x86_64 php71w-cli.x86_64 php71w-common.x86_64 php71w-gd.x86_64 php71w-ldap.x86_64 php71w-mbstring.x86_64 php71w-mcrypt.x86_64 php71w-mysql.x86_64 php71w-pdo.x86_64 3. Install php71-fpm Wait for the installation to complete and enter php -version to view the php version ps: Let's take a look at the steps to install PHP7.2 with Yum under CentOS 7 1. Installation source To install php72w, you need to configure additional yum source addresses, otherwise an error will be reported and the relevant software package cannot be found. The yum source address of the higher version of PHP has two parts, one is epel-release and the other is from webtatic. If you skip epel-release, you will get an error when installing webtatic. So, the command needed here is: rpm -Uvh https://dl.Fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm Of course, you can also choose the command below, which will have the same effect. rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 2. Clear historical versions In order to prevent PHP conflicts on CentOS, it is better to execute this command first. 3. Install the extension pack In fact, there are many corresponding extension libraries here. Here you must pay attention to the two packages of cli and fpm, and other related packages depend on your needs. yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel There is also a more luxurious version: yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml 4. After the installation is complete, start the service systemctl enable php-fpm.service systemctl start php-fpm.service 5. Installation successful Summarize The above is the tutorial on how to install PHP on CentOS through Yum introduced by the editor. I hope it will be helpful to everyone! You may also be interested in:
|
<<: About VUE's compilation scope and slot scope slot issues
>>: MySQL 8.0.17 winx64 (with navicat) manual configuration version installation tutorial diagram
In the previous article, we wrote about how to de...
Table of contents Preface Motivation for Fragment...
Using depends_on to sort containers does not perf...
Docker is becoming more and more popular. It can ...
1. Add PRIMARY KEY (primary key index) mysql>A...
How to delete environment variables in Linux? Use...
I would like to share the installation and config...
Counting the size of each table in each database ...
Table of contents Preface toDoList just do it Pre...
A few days ago, I watched a video of a foreign gu...
Virtualization 1. Environment Centos7.3 Disable s...
1. Add users and groups 1. Add mysql user group #...
Step 1: yum install httpd -y #Install httpd servi...
Table of contents Mixin Mixin Note (duplicate nam...
Here are 10 tips on how to design better-usable w...