Created
January 1, 2013 00:17
-
-
Save 0xGGGGG/4424096 to your computer and use it in GitHub Desktop.
nginx-premature-build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nginx_version = "1.2.6" | |
download_url = "http://nginx.org/download/nginx-#{nginx_version}.tar.gz" | |
file_path = "#{Chef::Config[:file_cache_path]}/nginx-#{nginx_version}.tar.gz" | |
remote_file file_path do | |
owner "root" | |
group "root" | |
mode 00644 | |
source download_url | |
backup 2 | |
notifies :run, "bash[install_nginx]", :immediately | |
end | |
bash "install_nginx" do | |
user "root" | |
cwd "#{Chef::Config[:file_cache_path]}" | |
code <<-NGINX | |
tar -zxf nginx-#{nginx_version}.tar.gz | |
(cd nginx-#{nginx_version}/ && ./configure && make && make install) | |
NGINX | |
# action :nothing | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment