Last active
August 29, 2015 13:55
-
-
Save luceos/8780587 to your computer and use it in GitHub Desktop.
Install nginx and compile with speedy from commandline, use parameter to select version, image_filter requires php5-gd/php_gd and libgd2-xpm-dev
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
#!/bin/sh | |
# | |
# Obsolete; nginx 1.5.10 has in-built option for spdy, with compilation option: --with-http_spdy_module | |
# | |
# use ./install_nginx_w_spdy.sh <version> | |
NGINX_VERSION=$1 | |
TMP_PATH=/tmp | |
# Fetch and extract nginx source | |
cd $TMP_PATH | |
if [ ! -d nginx-$NGINX_VERSION ]; then | |
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz | |
tar xvfz nginx-$NGINX_VERSION.tar.gz | |
fi | |
cd nginx-$NGINX_VERSION | |
# Fetch the SPDY patch and apply it | |
#wget http://nginx.org/patches/spdy/patch.spdy.txt | |
#patch -p0 < patch.spdy.txt | |
# Configure nginx | |
./configure \ | |
--prefix=/usr \ | |
--sbin-path=/usr/sbin \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--pid-path=/var/run/nginx.pid \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--with-http_ssl_module \ | |
--with-http_gzip_static_module \ | |
--with-http_stub_status_module \ | |
--with-http_image_filter_module | |
mv /usr/sbin/nginx ~/nginx_old | |
# stop service | |
sudo service nginx stop | |
# Build and install nginx | |
make && sudo make install | |
# Cleanup | |
cd $TMP_PATH | |
#rm -r nginx-$NGINX_VERSION | |
rm nginx-$NGINX_VERSION.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment