您的位置:首页 > 运维架构

openresty安装(MAC)

2017-08-05 10:33 399 查看
1、下载官方包 解压

#wget https://openresty.org/download/openresty-1.11.2.3.tar.gz[/code] 2、安装依赖:pcre(默认安装)、openssl

#brew update
#brew install pcre openssl
3、安装

#cd openresty-1.11.2.3
#./configure \
--with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/“ \        #指定依赖目录, 否则MAC下会找不到依赖
--with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" \
--prefix=/Users/xuefeihu/software/openresty/    \                            #自定义安装目录
-j8
4、启动
#sudo ~/software/openresty/nginx/sbin/nginx -p ~/software/openresty/nginx/ -c ~/software/openresty/nginx/conf/nginx.conf
-p指定开发目录、-c指定配置文件目录
5、查看
#ps -ef | grep nginx




链接:http://moguhu.com/article/detail?articleId=12
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  OpenResty 安装 MAC