源码包地址
https://openresty.org/download/openresty-1.15.8.1.tar.gz
在编译源码之前需要确保本机已经安装了依赖环境
brew install pcre openssl
安装完成之后就可以编译了,下面的例子是自定义模块的编译,添加了HTTP2模块
./configure --prefix=/Users/user/soft/openresty/nginx\
--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\
--without-http_redis2_module \
--with-http_v2_module
如果以上步骤没有问题,最后应该会出现下面的字样
Type the following commands to build and install:
make
sudo make install
按提示继续操作就可以了
make && make install
网友评论