Skip to content

Instantly share code, notes, and snippets.

@damm
Created September 13, 2009 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damm/186305 to your computer and use it in GitHub Desktop.
Save damm/186305 to your computer and use it in GitHub Desktop.
#
# Cookbook Name:: nginx
# Recipe:: src
# Author:: Scott M. Likens <scott@likens.us>
%w(build-essential libxslt1-dev libxml2-dev libpcre3-dev libperl-dev libssl-dev).each do |p|
package(p)
end
bash "install_nginx" do
user "root"
cwd "/tmp"
not_if { FileTest.exists?("/usr/sbin/nginx") }
code <<-EOH
(cd /tmp; wget http://sysoev.ru/nginx/nginx-0.8.6.tar.gz)
(cd /tmp; tar zxfv nginx-0.8.6.tar.gz)
(cd /tmp/nginx-0.8.6;./configure --prefix=/usr --with-http_ssl_module --with-http_perl_module --with-http_stub_status_module --with-http_dav_module --with-http_sub_module --with-http_realip_module --with-http_addition_module --prefix=/usr --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access_log --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx/nginx.pid --with-md5-asm --with-md5=/usr/include --with-sha1-asm --with-sha1=/usr/include)
(cd /tmp/nginx-0.8.6;make)
(cd /tmp/nginx-0.8.6;make install)
EOH
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment