dqenv99518 2016-09-14 18:05
浏览 82

我可以使用puppet在aws ec2上将php升级到php56而不登录并使用yum吗?

Apparently if you use puppet to require "php" and you have version 5.3 installed, then even if your yum repos have 5.6 php packages, requiring "php56" will not perform an upgrade. All the docs I read say to log into the node and use sudo and yum to remove the existing php packages and replace them with 5.6. These nodes are in production and I would like to use puppet to upgrade my php. Anyone have experience in this?

  • 写回答

1条回答

  • dqwh1119 2016-09-25 23:33
    关注

    Generally speaking, Puppet will only upgrade packages if you use a resource such as the following:

    # always update to the latest version
    package { 'php':
      ensure => 'latest',
    }
    
    # update (or revert) to a specific version
    package { 'php':
      ensure => '5.6',
    }
    

    Note that in the latter case, the given version must exactly match the label on the package, e.g. 5.6.24+dfsg-0+deb8u1 on Debian 8.

    Since you're probably using a Forge module to manage PHP (you should), you need to check that module's capabilities to override the appropriate ensure value(s).

    If none, you can resort to a minor hack using a resource collector:

    Package<| title == "php" |> { ensure => 'latest' }
    

    This has same caveats, but might just suffice for your use case.

    Whatever you do, test the code carefully before throwing it at your entire production environment.

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP