nick4fake

Untitled

May 29th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.00 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. NGINX_VERSION=1.7.0
  4. TMP_PATH=/tmp
  5.  
  6. # Fetch and extract Nginx
  7. cd $TMP_PATH
  8. wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
  9. tar xvfz nginx-$NGINX_VERSION.tar.gz
  10. cd nginx-$NGINX_VERSION
  11.  
  12. # Fetch and apply the Nginx SPDY patch
  13. #wget http://nginx.org/patches/spdy/patch.spdy.txt
  14. #patch -p0 < patch.spdy.txt
  15.  
  16. # Install the latest passenger gem
  17. sudo gem install passenger
  18.  
  19. # Configure passenger (with ubuntu-style paths)
  20. sudo passenger-install-nginx-module \
  21.   --auto \
  22.   --languages ruby,nodejs \
  23.   --nginx-source-dir=$TMP_PATH/nginx-$NGINX_VERSION \
  24.   --prefix=/usr \
  25.   --extra-configure-flags=" \
  26.    --with-http_spdy_module \
  27.    --with-http_ssl_module \
  28.    --with-ipv6 \
  29.    --conf-path=/etc/nginx/nginx.conf \
  30.    --pid-path=/var/run/nginx.pid \
  31.    --sbin-path=/usr/sbin \
  32.    --error-log-path=/var/log/nginx/error.log \
  33.    --http-log-path=/var/log/nginx/access.log"
  34.  
  35. # Cleanup
  36. sudo rm -r $TMP_PATH/nginx-$NGINX_VERSION
  37. rm $TMP_PATH/nginx-$NGINX_VERSION.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment