I want to install apache using chef. But when I use:
package 'httpd' do
action :install
end
It will install apache inside /etc/httpd
but I want to install apache in another directory (for example: /abc
).
I want to install apache using chef. But when I use:
package 'httpd' do
action :install
end
It will install apache inside /etc/httpd
but I want to install apache in another directory (for example: /abc
).
2
Answers
I have created a custom package and then installed in to desired loaction it helped me a lot Thank you very much everyone
The Chef
package
resource uses the underlying system’s package manager such asyum
,apt
.You haven’t mentioned the distribution you are running on. However, using
package 'httpd'
on YUM based distribution will triggeryum install httpd
So, first find how you can change/set the install path using the underlying OS command. E.g. for YUM:
In a Chef
package
resource: