I'm using the recipe git://github.com/opscode-cookbooks/php.git to install php with chef on my vagrant box (ubuntu). Unfortunatly my box is behind a proxy.
It seems that I have to call something like that:
pear config-set http_proxy http://domain:3128
How can I call it and where can I call it?
You can call it via an execute
resource, after installing PHP itself:
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
...
If it's enough to configure it right after the provision run that installs the php-pear, you can use the vagrant-proxyconf plugin. (But this doesn't help if you need to install the pear packages in the same provisioner run.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.