7 Yum CentOS the mounting step PHP7.2

1, the installation source

Installation php72w, is the need to configure additional yum source address, otherwise it will error can not find the package.

yum version of php high source address has two parts, part of which is epel-release, from other part webtatic. If you skip epel-release, then the installation webtatic, there will be an error burst.

Therefore, the command is needed here:

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Of course, you can also select the following command, the effect is the same.

yum install epel-release -y

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

2, Clear version history

yum -y remove php*

3, the installation package extensions

In fact, there's a lot of correspondence extensions, here we must pay attention to cli fpm and two packages, while others related packages depends on your needs.

yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel

There are 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 installation is complete, start the service

systemctl enable php-fpm.service

systemctl start php-fpm.service

5, the installation was successful

Guess you like

Origin www.linuxidc.com/Linux/2019-07/159197.htm