Created
January 4, 2016 05:25
-
-
Save c9n/b31d3ad9314ad923699e to your computer and use it in GitHub Desktop.
在 Mac 下编译安装 OpenResty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
pwd # /Users/Lynn/Desktop | |
brew install pcre | |
wget https://www.openssl.org/source/openssl-1.0.2e.tar.gz | |
tar xvf openssl-1.0.2e.tar.gz | |
cd ngx_openresty-1.9.7.1 | |
# 如果去掉 --with-ld-opt 有可能会在 make 的时候报错,参考 https://github.com/openresty/ngx_openresty/issues/3 | |
/configure --with-openssl=/Users/Lynn/Desktop/openssl-1.0.2e --with-cc-opt="-I/usr/local/include" --with-ld-opt="-L/usr/local/lib" | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"