[不花钱站长]:从免费域名开始[0元] Oracle永久免费VPS[0元] VPS环境搭建免费脚本[0元] 秒变大盘挂载免费网盘[0元] 小白免费采集器1天500W[0元] CF免费DNS+CDN服务[0元]
[零基础网赚]:撸本站免费源码[0元] 网站强引免费蜘蛛法[0元] 图片视频文件免费存储[0元] 外链轻松发布免费友链[0元] 入坑免费教程学习源代码[0元] 网上百种+赚钱联盟推荐[?元]

↑↑主机测评网牛逼个人站长零成本从白嫖到精通指南↑↑


您现在的位置是:首页 > 全球[VPS测评] >  CentOS,PHP7.2,VPS,yum命令,国外永久免费VPS

如何在 CentOS 7 服务器上使用 yum命令安装 PHP7.2

全球[VPS测评]来源:主机测评网2023-01-29点击:922
【性价之王】【线路之王】【价格之王】【配置之王】
【免费之王】【香港首推】【梯子之王】【独服之王】
如何在 CentOS 7 服务器上使用 yum命令安装 PHP7.2

本文将介绍如何在 CentOS 7 服务器上使用 yum 命令安装 PHP7.2。

内容 1 安装 PHP7.2 2 php-fpm 服务 2.1 相关文章

安装 PHP7.2

安装 EPEL 软件包:

$ sudo yum install epel-release

安装 remi 源:

$ sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

安装 yum 扩展包:

$ sudo yum install yum-utils

启用 remi 仓库:

$ sudo yum-config-manager --enable remi-php72$ sudo yum update

安装 PHP7.2

$ sudo yum install php72

安装 php-fpm 和一些其他模块

$ sudo yum install php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache

输入 php72 -v 查看安装结果

php-fpm 服务

设置开机自启

$ sudo systemctl enable php72-php-fpm.service

常用 php-fpm 命令

# 开启服务$ sudo systemctl start php72-php-fpm.service# 停止服务$ sudo systemctl stop php72-php-fpm.service# 查看状态$ sudo systemctl status php72-php-fpm.service

通过 egrep 查询 nginx 服务器的用户和用户组:

$ egrep '^(user|group)' /etc/nginx/nginx.conf

结果示例:

user nginx;

编辑 /etc/opt/remi/php72/php-fpm.d/www.conf,修改执行 php-fpm 的权限:

$ sudo vi /etc/opt/remi/php72/php-fpm.d/www.conf

设置用户和用户组为 nginx:

user = nginxgroup = nginx

保存并关闭文件,重启 php-fpm 服务:

$ sudo systemctl restart php72-php-fpm.service

路径整理

# php 安装路径/etc/opt/remi/php72# nginx 配置文件/etc/nginx/nginx.conf# nginx 默认项目路径/usr/share/nginx/html
[CentOS]历史优惠活动内容
  • Linux CentOS,Debian用iptables屏蔽IP和删除IP2022-12-24
  • #Vultr#Debian 8及Centos7系统VPS安装破解版锐速图文教程2022-12-24
  • 搬瓦工Debian和Centos安装锐速教程2022-12-24
  • 使用centos7系统的国外VPS制作google镜像2022-12-24
  • Centos7 yum安装Python3.6环境2022-12-24
  • CentOS 7环境下安装MySQL2022-12-24
  • CentOS7不换内核体验类似BBR的单边加速2022-12-24
  • CentOS7详细搭建CSGO服务器2022-12-24
  • #趣玩#华为手机安装CentOS7搭建博客过程2022-12-24
  • centos6安装transmission+flexget实现PT自动刷流量2022-12-24
  • CentOS系统安装Transmission和FlexGet全自动刷PT流量2022-12-24
  • Linux一键重装脚本,Centos、Debain、Ubuntu随意安装2022-12-24
  • CentOS更改yum源与更新系统2022-12-24
  • Centos7安装transmission2022-12-24
  • #建站教程#centos系统搭建Mastodon2022-12-24
  • Centos 7系统python2.6升级到2.7.112022-12-24
  • Centos系统安装人人影视linux客户端,随时随地下载大量电影资源2022-12-24
  • Centos Debian Ubuntu如何改更DNS2022-12-24
  • CentOS7创建并启用RAMDISK(内存盘)2022-12-24
  • Linux CentOS,Debian用iptables屏蔽IP和删除IP2022-12-24
  • #Vultr#Debian 8及Centos7系统VPS安装破解版锐速图文教程2022-12-24
  • 搬瓦工Debian和Centos安装锐速教程2022-12-24
  • 使用centos7系统的国外VPS制作google镜像2022-12-24
  • Centos7 yum安装Python3.6环境2022-12-24
  • CentOS 7环境下安装MySQL2022-12-24
  • CentOS7不换内核体验类似BBR的单边加速2022-12-24
  • CentOS7详细搭建CSGO服务器2022-12-24
  • #趣玩#华为手机安装CentOS7搭建博客过程2022-12-24
  • centos6安装transmission+flexget实现PT自动刷流量2022-12-24
  • CentOS系统安装Transmission和FlexGet全自动刷PT流量2022-12-24
  • Linux一键重装脚本,Centos、Debain、Ubuntu随意安装2022-12-24
  • CentOS更改yum源与更新系统2022-12-24
  • Centos7安装transmission2022-12-24
  • #建站教程#centos系统搭建Mastodon2022-12-24
  • Centos 7系统python2.6升级到2.7.112022-12-24
  • Centos系统安装人人影视linux客户端,随时随地下载大量电影资源2022-12-24
  • Centos Debian Ubuntu如何改更DNS2022-12-24
  • CentOS7创建并启用RAMDISK(内存盘)2022-12-24
  • Linux CentOS,Debian用iptables屏蔽IP和删除IP2022-12-24
  • #Vultr#Debian 8及Centos7系统VPS安装破解版锐速图文教程2022-12-24
  • 搬瓦工Debian和Centos安装锐速教程2022-12-24
  • 使用centos7系统的国外VPS制作google镜像2022-12-24
  • Centos7 yum安装Python3.6环境2022-12-24
  • CentOS 7环境下安装MySQL2022-12-24
  • CentOS7不换内核体验类似BBR的单边加速2022-12-24
  • CentOS7详细搭建CSGO服务器2022-12-24
  • #趣玩#华为手机安装CentOS7搭建博客过程2022-12-24
  • centos6安装transmission+flexget实现PT自动刷流量2022-12-24
  • CentOS系统安装Transmission和FlexGet全自动刷PT流量2022-12-24
  • Linux一键重装脚本,Centos、Debain、Ubuntu随意安装2022-12-24
  • Linux一键重装脚本,Centos、Debain、Ubuntu随意安装2022-12-24
  • Linux一键重装脚本,Centos、Debain、Ubuntu随意安装2022-12-24
  • 在centos 6上安装Minecraft Server2022-12-20
  • 在centos6上安装ownCloud2022-12-20
  • centminmod,centos系统下LNMP一键安装脚本2022-12-20
  • VPS新手教程-重启Linux系统(centos/debian/ubuntu)2022-12-20
  • 给centos7修改默认SS 22端口增强安全性2022-12-20
  • CentOS 6安裝Xfce桌面、VNC、Firefox、Flashplayer2022-12-20
  • 纯手工教程→centos6.x搭建LAMP环境2022-12-20
  • Centos搭建图形界面和VNC2022-12-20

  • 猜你可能想看的VPS


    转载请注明原文地址:https://motoll.com/read-225951.html

    使用该VPS服务器的演示站:

    下一篇       上一篇