1、查看centos 版本

lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.9 (Final)
Release: 6.9
Codename: Final

2、切换yum 源

.检查当前安装的PHP包

yum list installed | grep php
1
如果有安装的PHP包,先删除他们 yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
1
配置yum源
CentOS 7.0的源。 yum install epel-release rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
1
2
3
使用yum list命令查看可安装的包(Packege) yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
1
安装PHP5.6.x yum源配置好了,下一步就安装PHP5.6。 yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
1
2用PHP命令查看版本。 php --version PHP 5.6.0 (cli) (built: Sep 3 2014 19:51:31) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
1安装PHP-fpm yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
1在这里安装的版本是PHP5.6.13。 从PHP5.5开始PHP代码缓存从APC变成了Zend OPcache了。 重新启动服务: 在 CentOS 7 系统上: $ sudo systemctl restart httpd
$ sudo systemctl restart php-fpm
---------------------
原文:https://blog.csdn.net/TH_NUM/article/details/78195568

  

  

centos7 安装php5.6的更多相关文章

  1. centos7 安装php5.6.0 、nginx1.7.4、phpssdbadmin

    1 创建用户.网站目录和下载相关的安装包 groupadd www #添加www组 创建目录/data/www/ chown www:www /data/www/ -R #设置目录所有者 chmod ...

  2. centos7 安装PHP5.3 报错undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3'

    系统:centos 7 原有PHP版本:5.6.27,5.4.45 试着安装nginx+多php版本,首先安装了5.6和5.4的版本,一帆风顺,但是在安装5.3.29版本时,出现问题了,configu ...

  3. Centos7安装php5.6并配置php-fpm协同工作

    yum install epel-release rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum in ...

  4. centos7.5下yum安装php-5.6.40(LNMP环境)

    cd /etc/yum.repos.d/ yum -y install epel-release #<===安装centos7下php5.6的epel和remi源 rpm -ivh http:/ ...

  5. centos7上安装php5.6

    配置yum源 追加CentOS 6.5的epel及remi源. # rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel- ...

  6. centos7的编译安装php5.3 (针对老系统必须安装php5.3才能运行)

    大家都知道,centos6以上yum都自带5.4以上的php版本,可是一些老系统必须安装 php-5.3该怎么办呢.下面我来教大家一步步编译安装.看看我踩过的坑. 第一步: 网上下载php5.3的源码 ...

  7. Linux CentOS7 VMware 安装PHP5 、安装PHP7

    一.安装PHP5 PHP官网www.php.net 当前主流版本为5.6/7.1 cd /usr/local/src/ wget http://cn2.php.net/distributions/ph ...

  8. CentOS 7 安装php5.6,Nginx,Memcached环境及配置

    安装php5.6版本以后不再需要安装Zend Guard,而是用yum命令安装php-opcache及php-pecl-apcu就可以有效的提高php执行速度. 1. 配置yum源 事先确认yum源的 ...

  9. 安装PHP5 PHP7

    安装 PHP5 PHP官网www.php.net • 当前主流版本为5./7.1 • cd /usr/local/src/ • wget http://cn2.php.net/distribution ...

随机推荐

  1. mysql in 查询参数化

    mysql查询语句where条件in mysql查询语句where条件in 正常情况需要查询的语句:select *from temp where id in ('1','2','3','4','5' ...

  2. jwt 接口加密

    什么是JWT Json web token (JWT), 是为了在网络应用环境间传递声明而执行的一种基于JSON的开放标准((RFC 7519).该token被设计为紧凑且安全的,特别适用于分布式站点 ...

  3. POJ3017 Cut the Sequence

    题意 Language:Default Cut the Sequence Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 122 ...

  4. 自定义pip 包开发简单说明

    文档主要来自官方文档,主要是为了测试学习 创建pip 包项目 项目结构 ├── LICENSE ├── README.md ├── dalongrong_example_pkg │ └── __ini ...

  5. shell脚本使用## or %%

    今天写脚本的时候,遇到一个文件路径需要去掉右边一部分,当时就想到了这个,但是很久没用过了,很多不记得了,记录一下这种用法   1:vim test.sh #!/bin/bash location=/f ...

  6. 网络之 Iptables总结

    查询iptables -L 默认 filter表iptables -L -t filteriptables -L -t natiptables -L -t mangle Filter表service ...

  7. [UE4]Safe Zone:安全区域

    一.在做移动开发的时候,为了避免被手机上的硬件元素挡住界面,就可以使用Safe Zone控件,如下图所示的棕色区域就是Apple IphoneX的课被挡住界面的区域:上面的是Iphone的喇叭位置,下 ...

  8. html5 + shiro

    偶然与巧合 舞动了蝶翼 谁的心头风起 前赴而后继 万千人追寻 荒漠唯一菩提 似擦肩相遇 或擦肩而去 命运犹如险棋 无数时间线 无数可能性 终于交织向你

  9. WPF 去掉Drag a column header here to group by that column

    <dxg:GridControl.View> <dxg:TableView x:Name="view" ShowGroupPanel="False&qu ...

  10. 解决idea下载依赖包慢到出奇

    右键项目选中maven选项,然后选择“open settings.xml”或者 “create settings.xml”,然后把如下代码粘贴进去就可以了.重启IDE. <?xml versio ...