Home >Backend Development >PHP7 >How to install php7 extension in yum
Yum method to install php7 extension: 1. Install epel and REMI sources; 2. Check the PHP version that can be installed and use the "yum -y install php" command to install PHP; 3. Use "yum -y install Just run the php-fpm" command to install the PHP extension.
The operating environment of this article: centos7 system, PHP version 7.4, Dell G3 computer.
yum How to install php7 extension?
Centos7 yum installation PHP7 and PHP extension installation:
#yum list installed | grep php #查看已安装的PHP,查到后rpm -e 卸载 #yum repolist all | grep php
yum install epel-release -y
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
yum repolist all | grep php
yum
yum -y install php #查看PHP版本 php -v #查看已安装的模块 php -m
yum search php74-php
示例:安装php74-php-fpm扩展,则执行:(不用加php74-) yum -y install php-fpm
# 启动 systemctl start php-fpm # 停止 systemctl stop php-fpm #重启 systemctl restart php-fmp # 重载 systemctl reload php-fpm #设置开机启动 systemctl enable php-fpm #禁止开机启动 systemctl disable php-pfm
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to install php7 extension in yum. For more information, please follow other related articles on the PHP Chinese website!