Last active
October 27, 2019 23:12
-
-
Save slanterns/5e6e7d7efea980df4ceba2dfeee4c394 to your computer and use it in GitHub Desktop.
for building nginx
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
| apt install build-essential libpcre3 libpcre3-dev zlib1g-dev unzip git autoconf libtool automake cmake golang | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
| source $HOME/.cargo/env | |
| mkdir build_ngx && cd build_ngx | |
| wget https://github.com/axboe/liburing/archive/liburing-0.2.zip | |
| unzip liburing-0.2.zip | |
| cd liburing-liburing-0.2/ | |
| ./configure | |
| make && make install | |
| cd .. | |
| git clone --recursive https://github.com/google/ngx_brotli.git | |
| git clone https://github.com/kn007/patch.git | |
| git clone https://github.com/hakasenyang/openssl-patch | |
| wget https://raw.githubusercontent.com/kn007/patch/35f2b0decbc510f2c8adab9261e3d46ba1398e33/Enable_BoringSSL_OCSP.patch | |
| git clone --recursive https://github.com/cloudflare/quiche | |
| wget -c https://nginx.org/download/nginx-1.17.5.tar.gz | |
| tar zxf nginx-1.17.5.tar.gz | |
| cd nginx-1.17.5 | |
| patch -p1 < ../patch/nginx_with_quic.patch | |
| patch -p1 < ../Enable_BoringSSL_OCSP.patch | |
| patch -p1 < ../openssl-patch/nginx_io_uring.patch # https://github.com/hakasenyang/openssl-patch/pull/22 | |
| ./configure --with-cc-opt='-m64 -O3 -DTCP_FASTOPEN=23 -ffast-math -march=native -flto -fuse-ld=gold' --add-module=../ngx_brotli --with-openssl=../quiche/deps/boringssl --with-quiche=../quiche --with-openssl-opt='-m64 -O3 -ffast-math -march=native -flto -fuse-ld=gold' --with-http_v2_module --with-http_v3_module --with-http_ssl_module --with-http_gzip_static_module --with-http_v2_hpack_enc --with-file-aio # https://github.com/kn007/patch/issues/3 https://kn007.net/topics/my-nginx-compilation-tour/ | |
| make | |
| make install | |
| systemctl stop nginx && systemctl start nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment