Skip to content

Commit

Permalink
Update 2023-06-14-you.md
Browse files Browse the repository at this point in the history
  • Loading branch information
icedterminal authored Oct 19, 2023
1 parent bfcb253 commit 2c06652
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions _posts/2023-06-14-you.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ apt install git gcc cmake mercurial libpcre3 libpcre3-dev zlib1g zlib1g-dev libp
```bash
pacman -Sy git gcc cmake mercurial gd base-devel
```
Now clone and init
Clone and init
```bash
git clone https://github.com/icedterminal/ngxqb.git; cd ngxqb; git submodule update --init --recursive; cd nginx;
git clone --recurse-submodules -j8 https://github.com/icedterminal/ngxqb.git
```
Build Brotli encoder (if you skip this step, Brotli will be absent)
```bash
cd ngxqb/ngx_brotli/deps/brotli && mkdir out && cd out
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..
cmake --build . --config Release --target brotlienc
cd ../../../../nginx
```

## OpenSSL Conf
Expand Down Expand Up @@ -47,8 +54,8 @@ Note: The default web server user is `www-data` on Debian and `http` on Arch. If
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
--user=[www-data|http] \
--group=[www-data|http] \
--user=http \
--group=http \
--with-debug \
--with-compat \
--with-file-aio \
Expand Down Expand Up @@ -82,8 +89,8 @@ Note: The default web server user is `www-data` on Debian and `http` on Arch. If
--add-module=../ngx_devel_kit \
--add-module=../set-misc-nginx-module \
--add-module=../njs/nginx \
--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' \
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
--with-cc-opt='-m64 -march=native -mtune=native -Ofast -flto -funroll-loops -ffunction-sections -fdata-sections -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,--gc-sections -Wp,-D_FORTIFY_SOURCE=2 -fPIC' \
--with-ld-opt='-m64 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie -Wl,-s -Wl,--gc-sections'
```
## Build and install
```bash
Expand Down Expand Up @@ -141,3 +148,4 @@ You can check your NGINX build information with `nginx -V`.
## Verify
- [https://http3check.net/](https://http3check.net)
- [https://geekflare.com/tools/http3-test](https://geekflare.com/tools/http3-test)
- When veryifying Brotli, you must use HTTP 2 or HTTP 3.

0 comments on commit 2c06652

Please sign in to comment.