Mac Mini M4安装openresty
主要参考 https://www.cnblogs.com/helios-fz/p/15703260.html
bash
brew uninstall nginx
brew update
brew install pcre openssl
#brew install geoip
# brew tap openresty/brew
# brew install openresty
# brew install openresty/brew/openresty
# VERSION=1.21.4.4
wget https://openresty.org/download/openresty-VERSION.tar.gz
tar -xzvf openresty-VERSION.tar.gz
cd openresty-VERSION/
./configure \
--with-cc-opt="-I/opt/homebrew/opt/openssl/include/ -I/opt/homebrew/opt/pcre/include/" \
--with-ld-opt="-L/opt/homebrew/opt//openssl/lib/ -L/opt/homebrew/opt/pcre/lib/" \
-j8
make
sudo make install
# 最后输出内容为 ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/local/openresty/bin/openresty
vim ~/.zshrc
# openresty
export OPENRESTY_HOME=/usr/local/openresty
export NGINX_HOME=$OPENRESTY_HOME/nginx
export PATH=$PATH:$NGINX_HOME/sbin:$OPENRESTY_HOME/bin
source ~/.zshrc
which resty
resty -e "print('Hary Lua')