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
When compiling and installing Nginx, some modules...
1. Same IP address, different port numbers Virtua...
Samba Overview Samba is a free software that impl...
Recently, there is a requirement for uploading pi...
Without further ado, I will post the code for you...
Preface The count function is used to count the r...
Preface If the query information comes from multi...
1 Problem description: 1.1 When VMware is install...
Table of contents Create a vue + ts project using...
Record the installation and use of openssh-server...
Table of contents 1. Basic conditions for databas...
Table of contents 1. Write an HTML, the first Vue...
We often want to find a file in Linux, but we don...
The code looks like this: .process{ border:1px so...
This article example shares the specific implemen...