Mac系统安装openresty

brew install pcre openssl
export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.zshrc
wget https://openresty.org/download/openresty-1.19.9.1.tar.gz
tar -zxf openresty-1.19.9.1.tar.gz
cd openresty-1.19.9.1
./configure --prefix=/usr/local/openresty  --with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" --with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" --with-luajit --with-http_realip_module --with-http_stub_status_module  --with-http_ssl_module --with-http_v2_module  --add-module=/usr/local/fastdfs-nginx-module/src/  -j4