Skip to content

Instantly share code, notes, and snippets.

@ye-fight
Forked from ejlp12/install_openresty_in_mac.md
Last active February 14, 2019 01:53
Show Gist options
  • Save ye-fight/24b45c93ced868d576767b169b0a10ed to your computer and use it in GitHub Desktop.
Save ye-fight/24b45c93ced868d576767b169b0a10ed to your computer and use it in GitHub Desktop.
Install openresty in Mac OS-X

在 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment