search
HomeBackend DevelopmentPHP7How 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.

How to install php7 extension in yum

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:

1. Install epel:

#yum list installed | grep php
#查看已安装的PHP,查到后rpm -e 卸载
#yum repolist all | grep php
yum install epel-release -y

2. Install REMI source:

rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm

3. Check the PHP version that can be installed:

yum repolist all | grep php

4. Set the default installed version:

yum

5. Install PHP:

yum -y install php
#查看PHP版本
php -v
#查看已安装的模块
php -m

6. Check which PHP extensions can be installed:

yum search php74-php

7. Install PHP extension:

示例:安装php74-php-fpm扩展,则执行:(不用加php74-)
yum -y install php-fpm

8.php-fpm command:

# 启动
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!

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
详解CentOS6.5使用yum升级gcc的步骤详解CentOS6.5使用yum升级gcc的步骤Dec 31, 2023 am 10:59 AM

因为需要用到C++11,但CentOS自带的gcc4.4.7不支持,所以决定升级gcc。操作如下:#备份mv/etc/yum.repos.d/devtools-2.repo/etc/yum.repos.d/devtools-2.repo.bakwgethttp://people.centos.org/tru/devtools-2/devtools-2.repo-O/etc/yum.repos.d/devtools-2.repoyuminstalldevtoolset-2-gccdevtoolse

centos离线安装中文版GitLabcentos离线安装中文版GitLabFeb 19, 2024 am 11:36 AM

1.下载gitlab安装包从【清华大学开源软件镜像站】下载最新中文版gitlab安装包,安装包里自带了简体中文汉化包。从【gitlab官网】下载gitlab最新安装包。2.安装gitlab以gitlab-ce-14.9.4-ce.0.el7.x86_64为例,将其上传至centos服务器使用yum安装gitlabyum-yinstallgitlab-ce-14.3.2-ce.0.el7.x86_64.rpm使用yum安装gityum-yinstallgit#安装git修改gitlab配置文件vi

Linux包管理工具yum和apt有什么区别Linux包管理工具yum和apt有什么区别May 30, 2023 am 09:53 AM

一般来说著名的Linux系统基本上分两大类:RedHat系列:Redhat、Centos、Fedora等;Debian系列:Debian、Ubuntu等。yum(YellowdogUpdater,Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。apt(AdvancedPackagingTool)是一个在Debian和Ubuntu中的Shell前端软件包管理器。概述一般来说著名的Linux系统基本上分两大类:RedHat系列:Redhat、Cento

centos7+yum怎么删除phpcentos7+yum怎么删除phpJan 19, 2023 am 10:00 AM

centos7 yum删除php的方法:1、通过“php-v”查看PHP版本;2、使用“rpm -qa|grep php”查看已经安装的PHP相关扩展;3、通过执行“yum remove php”命令卸载php即可。

linux yum是什么工具linux yum是什么工具Feb 10, 2023 am 10:09 AM

在linux中,yum是一个专门为了解决包的依赖关系而存在的软件包管理器;yum是改进型的RPM软件管理器,它很好的解决了RPM所面临的软件包依赖问题。当管理员使用yum安装RPM包时,yum会先从服务器端下载包的依赖性文件,通过分析此文件从服务器端一次性下载所有相关的RPM包并进行安装。

linux怎么使用yum安装phplinux怎么使用yum安装phpJan 29, 2023 am 09:46 AM

linux使用yum安装php的方法:1、执行“mkdir /usr/local/php”命令;2、下载yum源的更新安装包;3、安装相关yum源安装包;4、通过“yum install”命令安装php即可。

【Linux工具】-yum/gdb使用教程!【Linux工具】-yum/gdb使用教程!Mar 07, 2024 am 11:10 AM

yum是一种常用的软件包管理工具,而gdb是一种强大的调试工具。下面是它们的使用教程:yum使用教程:安装软件包:使用yuminstall命令安装软件包。例如,要安装ApacheWeb服务器,可以运行yuminstallhttpd。升级软件包:使用yumupdate命令升级已安装的软件包。例如,运行yumupdate将升级系统中的所有软件包。删除软件包:使用yumremove命令删除软件包。例如,要删除ApacheWeb服务器,可以运行yumremovehttpd。搜索软件包:使用yumsear

Linux中yum有何作用?主要功能是什么?Linux中yum有何作用?主要功能是什么?Feb 19, 2024 pm 05:30 PM

大家都或许熟悉Linux系统中的yum,但初学者可能对它并不了解。本文将介绍yum是什么,以及它的功能。请继续阅读。  在Linux中,yum是一个包管理器,用于管理和安装软件包。它是YellowdogUpdater,Modified的缩写,最初是为RedHat系列发行版设计的,但现在也被其他许多基于RPM的Linux发行版所采用。  YUM命令的主要功能包括:YUM是一种软件包管理工具,可用于查找、安装、更新和卸载软件包。通过YUM命令,用户可以方便地管理系统上的软件包,并自动解决软件包之间的

See all articles

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)