Last active
February 23, 2019 06:59
-
-
Save zzmmzz777/b85fa8a348ffa1bc460cd3af8506b96a to your computer and use it in GitHub Desktop.
Openresty + http2 + nginx_http_concat on Ubuntu 14.04
This file contains 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/bash | |
set -ex | |
OPENRESTY=openresty-1.13.6.2 | |
ROOT=/work/"$OPENRESTY" | |
OPENSSL=openssl-1.0.2j | |
NGINX_HTTP_CONCAT=nginx-http-concat | |
apt-get update && \ | |
apt-get install -yqq --no-install-recommends ca-certificates libreadline-dev libncurses5-dev libpcre3 libpcre3-dev \ | |
libssl-dev perl make build-essential curl git zlib1g.dev zlib1g | |
rm -rf "$ROOT" | |
mkdir -p "$ROOT" | |
cd "$ROOT" | |
wget https://openresty.org/download/"$OPENRESTY".tar.gz | |
wget https://www.openssl.org/source/"$OPENSSL".tar.gz | |
git clone git://github.com/alibaba/"$NGINX_HTTP_CONCAT".git | |
tar xaf "$OPENRESTY".tar.gz | |
tar xaf "$OPENSSL".tar.gz | |
cd "$OPENRESTY" | |
./configure \ | |
--prefix="$ROOT"/opt \ | |
--with-http_v2_module \ | |
--with-openssl="$ROOT"/"$OPENSSL" \ | |
--with-ipv6 \ | |
--with-http_realip_module \ | |
--with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module \ | |
--add-module="$ROOT"/nginx-http-concat && | |
make && \ | |
make install | |
ln -sf "$ROOT"/opt/nginx/sbin/nginx /usr/local/bin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment