如何在代理后使用php pear和vagrant和chef?

如何在代理后使用php pear和vagrant和chef?,php,proxy,pear,chef-infra,vagrant,Php,Proxy,Pear,Chef Infra,Vagrant,我在用配方git://github.com/opscode-cookbooks/php.git 在我的漫游盒(ubuntu)上安装php with chef。不幸的是,我的箱子后面有一个代理 似乎我不得不这样称呼: pear config-set http_proxy http://domain:3128 如何调用它以及在哪里调用它?安装PHP后,您可以通过execute资源调用它: include_recipe "php::default" execute "set proxy for P

我在用配方git://github.com/opscode-cookbooks/php.git 在我的漫游盒(ubuntu)上安装php with chef。不幸的是,我的箱子后面有一个代理

似乎我不得不这样称呼:

pear config-set http_proxy http://domain:3128

如何调用它以及在哪里调用它?

安装PHP后,您可以通过
execute
资源调用它:

include_recipe "php::default"

execute "set proxy for PEAR" do
  command "pear config-set http_proxy http://domain:3128"
end

php_pear "pear_package" do
  version "x.x.x"
  action :install
end

...

如果在安装PHPEAR的配置运行之后就可以配置它,那么您可以使用该插件。(但如果您需要在同一provisioner运行中安装pear软件包,则这没有帮助。)