php56 - CentOS - 雷米回购 [英] php56 - CentOS - Remi Repo

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

问题描述

我刚刚在一个测试盒上安装了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 解释器,但我一直习惯只输入 phpphp56.这是新规范,还是在 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 朝着正确的方向推进,这是我的 repo 配置的样子:

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

  • 雷米"=> 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 - 雷米回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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