在 MacOS 安装 OpenResty
brew update
brew install pcre openssl
wget https://openresty.org/download/openresty-1.13.6.2.tar.gz
tar xzvf openresty-1.13.6.2.tar.gz
cd openresty-1.13.6.2
./configure \
--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/" \
-j8
make
sudo mkdir -p /usr/local/openresty/
sudo chown $(whoami):admin /usr/local/openresty/
make install
export PATH=/usr/local/openresty/bin:/usr/local/openresty/nginx/sbin:$PATH