CentOS使用epel安装不同版本php-fpm
针对CentOS使用epel安装
yum -y install epel-release
安装好后可以通过如下命令查看
yum info epel-release
yum repolist
查看php版本
php -v
yum list installed | grep php
yum remove php*
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
php7.0安装
yum install -y php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 php70w-fpm
php7.1安装
yum install -y php71w-fpm php71w-opcache php71w-cli php71w-gd php71w-imap php71w-mysqlnd php71w-mbstring php71w-mcrypt php71w-pdo php71w-pecl-apcu php71w-pecl-mongodb php71w-pecl-redis php71w-pgsql php71w-xml php71w-xmlrpc php71w-devel mod_php71w
systemctl start php-fpm.service
systemctl enable php-fpm.service
########### 新版本php安装方法 #############
1、首先安装 EPEL 源:
yum install epel-release
安装 REMI 源:
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2、安装 Yum 源管理工具:
yum install yum-utils
3、安装 PHP7.3:
yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-xmll
安装完成后最好重启一下计算机,不然有可能无法启动php
设置开机启动、运行服务:
systemctl enable php73-php-fpm
systemctl start php73-php-fpm
设置 PHP
查找安装包:
[root@xxx etc]# rpm -qa | grep 'php'
php73-php-cli-7.3.6-1.el7.remi.x86_64
php73-php-mbstring-7.3.6-1.el7.remi.x86_64
php73-php-pecl-mcrypt-1.0.2-1.el7.remi.x86_64
php73-runtime-2.0-1.el7.remi.x86_64
php73-php-pdo-7.3.6-1.el7.remi.x86_64
php73-php-bcmath-7.3.6-1.el7.remi.x86_64
php73-php-fpm-7.3.6-1.el7.remi.x86_64
php73-php-mysqlnd-7.3.6-1.el7.remi.x86_64
php73-php-snmp-7.3.6-1.el7.remi.x86_64
php73-php-gd-7.3.6-1.el7.remi.x86_64
php73-php-json-7.3.6-1.el7.remi.x86_64
php73-php-soap-7.3.6-1.el7.remi.x86_64
php73-php-recode-7.3.6-1.el7.remi.x86_64
php73-php-pecl-crypto-0.3.1-5.el7.remi.x86_64
php73-php-common-7.3.6-1.el7.remi.x86_64
php73-php-opcache-7.3.6-1.el7.remi.x86_64
php73-php-pecl-geoip-1.1.1-6.el7.remi.x86_64
找到:php73-php-fpm-7.3.6-1.el7.remi.x86_64安装位置
[root@xxx etc]# rpm -ql php73-php-fpm-7.3.6-1.el7.remi.x86_64
/etc/logrotate.d/php73-php-fpm
/etc/opt/remi/php73/php-fpm.conf
/etc/opt/remi/php73/php-fpm.d
/etc/opt/remi/php73/php-fpm.d/www.conf
/etc/opt/remi/php73/sysconfig/php-fpm
/etc/systemd/system/php73-php-fpm.service.d
/opt/remi/php73/root/usr/sbin/php-fpm
/opt/remi/php73/root/usr/share/doc/php73-php-fpm-7.3.6
/opt/remi/php73/root/usr/share/doc/php73-php-fpm-7.3.6/php-fpm.conf.default
/opt/remi/php73/root/usr/share/doc/php73-php-fpm-7.3.6/www.conf.default
/opt/remi/php73/root/usr/share/fpm
/opt/remi/php73/root/usr/share/fpm/status.html
/opt/remi/php73/root/usr/share/licenses/php73-php-fpm-7.3.6
/opt/remi/php73/root/usr/share/licenses/php73-php-fpm-7.3.6/fpm_LICENSE
/opt/remi/php73/root/usr/share/man/man8/php-fpm.8.gz
/usr/lib/systemd/system/php73-php-fpm.service
/var/opt/remi/php73/lib/php/opcache
/var/opt/remi/php73/lib/php/session
/var/opt/remi/php73/lib/php/wsdlcache
/var/opt/remi/php73/log/php-fpm
/var/opt/remi/php73/run/php-fpm
查找php.ini位置:
[root@xxx etc]# find /etc/opt/remi/php73 -name php.ini
/etc/opt/remi/php73/php.ini
1
编辑/etc/opt/remi/php73/php.ini替换换 ;cgi.fix_pathinfo=1 为 cgi.fix_pathinfo=0 快捷命令:
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini
重启php73-php-fpm
systemctl restart php73-php-fpm
更多操作:
systemctl restart php73-php-fpm #重启
systemctl start php73-php-fpm #启动
systemctl stop php73-php-fpm #关闭
systemctl status php73-php-fpm #检查状态
查看 PHP
验证一下是否安装成功:
root@mf88.biz-service:~# php73 -v
PHP 7.3.0-1+(cli) (built: Dec 6 2018 20:24:55) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.0-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
更新 PHP
运行下面的命令系统就会更新所有可以更新的软件包括 PHP
yum update
安装更多组件
上面的一条命令安装 PHP 只是安装了部分 PHP 拓展,更多的软件可见:
# yum search php73
Updating Subscription Management repositories.
Last metadata expiration check: 0:27:54 ago on Wed 15 May 2019 10:39:52 AM EDT.
============================================================================================= Name Exactly Matched: php73 ==============================================================================================
php73.x86_64 : Package that installs PHP 7.3
php73.x86_64 : Package that installs PHP 7.3
============================================================================================ Name & Summary Matched: php73 =============================================================================================
php73-syspaths.x86_64 : System-wide wrappers for the php73 package
php73-syspaths.x86_64 : System-wide wrappers for the php73 package
php73-scldevel.x86_64 : Package shipping development files for php73
php73-scldevel.x86_64 : Package shipping development files for php73
php73-php-zstd-devel.x86_64 : php73-php-zstd developer files (header)
php73-runtime.x86_64 : Package that handles php73 Software Collection.
php73-runtime.x86_64 : Package that handles php73 Software Collection.
php73-runtime.x86_64 : Package that handles php73 Software Collection.
php73-php-pecl-psr-devel.x86_64 : php73-php-pecl-psr developer files (header)
php73-php-pecl-psr-devel.x86_64 : php73-php-pecl-psr developer files (header)
php73-php-pecl-raphf-devel.x86_64 : php73-php-pecl-raphf developer files (header)
php73-php-pecl-raphf-devel.x86_64 : php73-php-pecl-raphf developer files (header)
php73-php-pecl-propro-devel.x86_64 : php73-php-pecl-propro developer files (header)
php73-php-pecl-yaconf-devel.x86_64 : php73-php-pecl-yaconf developer files (header)
php73-php-pecl-propro-devel.x86_64 : php73-php-pecl-propro developer files (header)
php73-php-pecl-yaconf-devel.x86_64 : php73-php-pecl-yaconf developer files (header)
php73-php-pecl-xmldiff-devel.x86_64 : php73-php-pecl-xmldiff developer files (header)
php73-php-pecl-swoole4-devel.x86_64 : php73-php-pecl-swoole4 developer files (header)
php73-php-pecl-xmldiff-devel.x86_64 : php73-php-pecl-xmldiff developer files (header)
php73-php-zephir-parser-devel.x86_64 : php73-php-zephir-parser developer files (headers)
php73-php-zephir-parser-devel.x86_64 : php73-php-zephir-parser developer files (headers)
php73-php-pecl-handlebars-devel.x86_64 : php73-php-pecl-handlebars developer files (header)
================================================================================================= Name Matched: php73 ==================================================================================================
php73-php.x86_64 : PHP scripting language for creating dynamic web sites
php73-php.x86_64 : PHP scripting language for creating dynamic web sites
php73-build.x86_64 : Package shipping basic build configuration
……
————————————————
版权声明:本文为CSDN博主「laohe08」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/laohe08/article/details/93166590
参考https://blog.csdn.net/laohe08/article/details/93166590
CentOS使用epel安装不同版本php-fpm的更多相关文章
- centos上手动安装最新版本ELK
软件包下载地址:https://www.elastic.co/downloads/elasticsearch 1,安装es #tar zxvf elasticsearch-2.3.4.tar.gz # ...
- 在Linux Centos 7.2 上安装指定版本Docker。
相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum remov ...
- 在Linux Centos 7.2 上安装指定版本Docker 17.03
相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum insta ...
- CentOS 5.X安装LAMP最高版本环境
#------------CentOS 5.X安装LAMP最高版本环境------------------#! /bin/sh #安装Apacheyum install httpd -y#1.关闭se ...
- CentOS 6 中安装Node.js 4.0 版本或以上
如果想在CentOS 6 中安装Node.js >4.0,如果通过以往的方式安装: wget http://nodejs.org/dist/v4.0.0/node-v4.0.0.tar.gz t ...
- centos下安装最新版本git(通过master分支下载最新版)
centos6.7下安装最新版本git 本文参考:http://www.01happy.com/centos-install-latest-git/ 按照原博主所提供的思路安装可能会出现下列问题 解决 ...
- 在Centos环境下安装兼容Apache2.4高版本SVN服务
在阿里云Centos环境下,搭建PHP运行环境,PHP选择了php7版本,Mysql选择了5.7版本,Apache选择了2.4版本,在搭建SVN版本控制服务过程中出现了不兼容问题,当前环境下Apach ...
- CentOS 6.9/7通过yum安装指定版本的MySQL
一.安装CENTOS 6 # wget http://repo.mysql.com/mysql57-community-release-el6.rpm && rpm -ivh mysq ...
- CentOS下安装高版本GCC
CentOS下安装高版本GCC 微信分享: 有时编译需要用到4.8以上版本的GCC,由于CentOS源没有提供高版本的GCC安装包,这时就不能通过安装包安装.通常的解决方案就是通过编译安装高版本的 ...
随机推荐
- jQuery ajax中的dataType——JSON和JSONP
引用:http://www.cnblogs.com/dowinning/archive/2012/04/19/json-jsonp-jquery.html [原创]说说JSON和JSONP,也许你会豁 ...
- [USACO09MAR]向右看齐Look Up(单调栈、在线处理)
https://www.luogu.org/problem/P2947 题目描述 Farmer John's N (1 <= N <= 100,000) cows, convenientl ...
- SQL count与distinct的结合使用
select Score,(select count(distinct score) from Scores where score >= s.score) as Rank from Score ...
- IDEA中的常用插件安装以及使用的介绍
IDEA中的lombok插件安装以及各注解的详细介绍 Grep Console 当你密密麻麻一大片的日志,去查看起来,很容易看花眼:这个工具正好解决了这个痛点,可以说它就是 IDEA 自带 Conso ...
- 黑科技如何制造人类V2.0?
黑科技泛指人类尚未成熟但具有巨大潜力的科学技术,智能手机.大数据.扫码支付.电子地图等等都曾属于黑科技范畴,随着时间的推移,它们慢慢成熟,且展现出巨大的能力,影响人类进程,最终黑科技转变成人类伟大的创 ...
- Git log 中文乱码
以下三条命令搞定(系统是centos 7.4) git config --global i18n.commitencoding utf-8 git config --global i18n.logo ...
- 序列化模块Serializer
序列化组件: 知识点:Serializer(偏底层).ModelSerializer(重点).ListModelSerializer(辅助群改) Serializer 序列化准备: 模型层:model ...
- String Distance and Transform Process
http://acm.hdu.edu.cn/showproblem.php?pid=1516 Problem Description String Distance is a non-negative ...
- 基础篇四:Ngnix安装
然后直接 yum install nginx 安装nginx
- 53)PHP,类的继承
详见 视频第十七天 中的第二节 类的继承 所以 类之间的继承就是一种新的关系的建立,并不是将父类的东西重新复制给子类--------------------- 当你实例化一个类的时候,调用它 ...