search
HomeBackend DevelopmentPHP7How to reinstall php7.2 on centos7

How to reinstall php7.2 on centos7

Dec 31, 2021 am 09:52 AM
centos7

How to reinstall php7.2 in centos7: 1. Clean the old php through "yum -y remove php*"; 2. Check the php version that can be installed; 3. Install php streamlined extension; 4. Set up php -fpm can start automatically after booting.

How to reinstall php7.2 on centos7

The operating environment of this article: centos7 system, PHP7.2 version, DELL G3 computer

How to reinstall php7.2 in centos7?

Centos7 install PHP7.2

Suggested method

 # 安装EPEL yum存储库
 yum install epel-release -y
 # 安装Remi存储库
 rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
 # 安装 PHP 7.3 
 yum --enablerepo=remi-php73 install php
 # 安装 PHP 7.2 
 yum --enablerepo=remi-php72 install php
 # 安装 PHP 7.1 
 yum --enablerepo=remi-php71 install php

Install php yum source

# 方法一:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# 方法二:
yum install epel-release -y
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Clean up old php

yum -y remove php*

Check the php version that can be installed

yum list php*

Install php streamlined extension

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

# 也可以安装 豪华版拓展
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

php-fpm starts automatically after booting

systemctl enable php-fpm

This installation method may cause problems yum info php and php -v The php versions displayed by the two commands are different

Recommended study: "PHP Video Tutorial

The above is the detailed content of How to reinstall php7.2 on centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software