Centos 安装 Openrety

记录一下如何编译安装 Openrety

初始化安装环境

1
2
dnf group install -y "Development Tools"
dnf install -y wget curl gcc gcc-c++ perl-devel perl-ExtUtils-Embed openssl openssl-devel ccache man-pages

  编译指令

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
./configure --prefix=/usr/local/openresty \
 --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' \
 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' \
 --with-cc='ccache gcc -fdiagnostics-color=always' \
 --with-pcre-jit \
 --with-stream \
 --with-stream_ssl_module \
 --with-stream_ssl_preread_module \
 --with-http_v2_module \
 --without-mail_pop3_module \
 --without-mail_imap_module \
 --without-mail_smtp_module \
 --with-http_stub_status_module \
 --with-http_realip_module \
 --with-http_addition_module \
 --with-http_auth_request_module \
 --with-http_secure_link_module \
 --with-http_random_index_module \
 --with-http_gzip_static_module \
 --with-http_sub_module \
 --with-http_dav_module \
 --with-http_flv_module \
 --with-http_mp4_module \
 --with-http_gunzip_module \
 --with-threads \
 --with-compat \
 --with-stream \
 --with-http_ssl_module \
 --add-dynamic-module=/app/plugins/ngx_brotli \
 --add-dynamic-module=/app/plugins/ngx_waf