douju2053
2018-07-17 09:30
浏览 1.1k
已采纳

在CentOS 7中设置Php的默认版本

I have two versions of PHP in opt/remi folder php56 and php72 but when I php -v on cmd it shows PHP 5.6.24 (cli) (built: Jul 21 2016 07:33:38) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans how to set default version to PHP 7.2

图片转代码服务由CSDN问答提供 功能建议

我在opt / remi文件夹php56和php72中有两个版本的PHP 但是当我 php -v 在cmd上显示 PHP 5.6.24(cli)(内置:2016年7月21日07:33:38) 版权所有(c)1997-2016 PHP Group Zend Engine v2.6.0,版权所有( c)1998-2016 Zend Technologies ,Zend OPcache v7.0.6-dev,Copyright(c)1999-2016,Zend Technologies ,Xdebug v2.4.1,Copyright(c)2002-2016,Derick Rethans how将默认版本设置为PHP 7.2

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

  • duanqin2026 2018-07-17 11:58
    最佳回答

    I have two versions of PHP in opt/remi folder php56 and php72

    how to set default version to PHP 7.2

    SCL are designed for parallel installation so don't alter default version in base system

    Once the collection is enabled, the version will be used

    $ scl enable php72 bash
    $ php -v
    PHP 7.2.8 (cli) (built: Jul 17 2018 05:35:43) ( NTS )
    

    If you want 7.2 to be the default version (base system) you should install it, according to Wizard instructions for "Default / single version" (and keep 5.6 as secondary version)

    评论
    解决 无用
    打赏 举报
查看更多回答(1条)

相关推荐 更多相似问题