php56-CentOS-Remi Repo [英] php56 - CentOS - Remi Repo

查看:65
本文介绍了php56-CentOS-Remi Repo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在测试盒上安装了php 5.6,而普通的cli php解释器似乎不存在:

I just installed php 5.6 on a test box, and the normal cli php interpreter doesn't appear to exist:

$ -> php -v
-bash: php: command not found

$ -> php56 -v
PHP 5.6.13 (cli) (built: Sep  3 2015 13:41:04)    

如果我尝试执行 yum install php --enablerepo = remi ,则它将尝试安装php 5.4.

If I try to do a yum install php --enablerepo=remi then it tries to install php 5.4.

因此,很明显php56是一个cli解释器,但是我一直习惯于只键入 php vs php56 .这是新规范吗,还是在CentOS(6.7)上再安装php56?它像创建符号链接一样简单吗? ln -s/usr/bin/php56/usr/bin/php

So it's obvious that php56 is a cli interpreter, but I've always been used to just typing php vs php56. Is this the new norm, or is there another step for installing php56 on CentOS (6.7)? Is it as simple as creating a symlink? ln -s /usr/bin/php56 /usr/bin/php

升级步骤:

$ -> yum remove php* --enablerepo=remi

$ -> yum install php56* --enablerepo=remi

向Remi致谢以朝正确的方向推进,这就是我的仓库配置:

Thx to Remi for the push in the right direction, here's what my repo config looks like:

[upstream_remi54]
name=Remi - CentOS - $releasever/$arch
 baseurl=http://mirrors.mediatemple.net/remi/enterprise/$releasever/remi/$basearch/
enabled=0

gpgcheck=1

gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi

[upstream_remi56]
name=Remi - CentOS - $releasever/$arch
baseurl=http://mirrors.mediatemple.net/remi/enterprise/$releasever/php56/$basearch/
enabled=0

gpgcheck=1

gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi

如果要完全替换现有的PHP,而不是并行运行的版本,则此方法很好用.对于Roundcube和Postfix Admin,我必须保留PHP 5.4的位置,因为尚未移植一些使它们正常工作所需的模块,因此该服务器必须暂时保留5.4.

This works well if you want to completely replace existing PHP, vs running versions in parallel. I have to keep PHP 5.4 in place for Roundcube and Postfix Admin, as some of the modules necessary for those to work have not yet been ported, so that server has to stay 5.4 for now.

推荐答案

php- *是基本软件包,每个版本1个存储库

php-* are base packages, 1 repository per version

  • "remi" => php 5.4
  • "remi-php55" => php 5.5
  • "remi-php56" => php 5.6
  • "remi-php70" => php 7.0(发布候选版本,尚未准备就绪)

php56- *软件包是软件集合,可以并行安装,允许运行多个版本的PHP.

php56-* packages are Software Collections, parallel installation allowing to run multiple versions of PHP.

请参阅: http://blog.remirepo.net/pages/English-FAQ

因此,如果您只想要一个PHP版本5.6

So, if you only want a single php version 5.6

yum --enablerepo=remi-php56 install php-cli (and other needed modules)

您还可以启用存储库以供将来更新(因为"remi-php56"是安全的,并且仅提供php 5.6及其扩展名)

And you can also enable the repository for future update (as the "remi-php56" is safe and only provides php 5.6 and its extension)

yum-config-manager --enable remi-php56

这篇关于php56-CentOS-Remi Repo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆