Skip to content

Instantly share code, notes, and snippets.

@jrob00
Created July 14, 2012 00:48
Show Gist options
  • Save jrob00/3108519 to your computer and use it in GitHub Desktop.
Save jrob00/3108519 to your computer and use it in GitHub Desktop.
Install Nginx on a dv 3.5
wget -q -O - http://www.atomicorp.com/installers/atomic | sh
yum install nginx
OR build from source (because 3.5 doesn't support --with-file-aio)
* note the 'make' resulted in a number of errors and we abandoned it
groupadd nginx
useradd -d /var/lib/nginx -g nginx -s /bin/false -c "Nginx user" nginx
yum install gcc GeoIP pcre-devel libxml2-devel libxslt-devel gd-devel GeoIP-devel
wget http://nginx.org/download/nginx-1.2.2.tar.gz
tar xvfz nginx-1.2.2.tar.gz
cd nginx-1.2.2
./configure --with-http_ssl_module --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-file-aio --with-mail_ssl_module --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --with-ld-opt=-Wl,-E
make
make install
create a new /etc/nginx/conf.d/default.conf
create a /etc/nginx/conf.d/proxy.conf
mv /etc/nginx/conf.d/ssl.conf /etc/nginx/conf.d/ssl.conf.old
mv /etc/nginx/conf.d/virtual.conf /etc/nginx/conf.d/virtual.conf.old
launch
/etc/init.d/httpd stop;/etc/init.d/nginx start
todo:
gzip
buffer sizes?
serve static files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment