How to use Chef PHP cookbook to install version hi

2019-07-12 17:43发布

I am using the Opscode community PHP cookbook to install PHP on a node. The node is CentOS and I have attempted setting the install_method to "source" and also tried overriding the version in my Role file.

No matter what I do - Chef continues to install PHP 5.3.3.

I want to know how to use this cookbook to install a newer version of PHP - or understand if it's even possible. I see references to PHP 5.3.28 and 5.4.15 in the default attribute settings - so I am under the impression that it should be possible.

Does anyone know how I might accomplish this?

1条回答
做自己的国王
2楼-- · 2019-07-12 18:29

Chef simply uses the packages available in the systems package repositories. So that might be 5.3 in your case.

The reference to 5.4.15 is for the source install. You'd have to use another recipe

php::source

You could set the preferred version for PHP from chef

:php => {
  :version => "5.5",
},
查看更多
登录 后发表回答