码迷,mamicode.com
首页 > 系统相关 > 详细

Mac OpenResty安装

时间:2016-07-19 23:31:30      阅读:467      评论:0      收藏:0      [点我收藏+]

标签:

参考网址:
          http://openresty.org/cn/installation.html

1.安装前的准备 Mac OS X (Darwin) 用户

 使用brew工具安装pcre、openssl库: brew install pcre openssl

2.下载 OpenResty的源码包l, 请到 Download 页下载

  技术分享

   下载成功后解压openresty-1.9.15.1(版本号)

  技术分享

3. 使用终端,cd 到openresty-1.9.15.1目录下编译、安装openresty

  (1)$ ./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
(2)make

(3)make install


4.安装完成后,openresty会安装到 /usr/local/ 目录:
 技术分享

5.启动openresty 
sudo  /usr/local/openresty/nginx/sbin/nginx  

6.指定配置文件启动openresty 指定一个工程目录
cd /Users/xinshaofeng/Study/
mkdir nginx
cd nginx
mkdir conf logs lua
cd conf
 vi nginx.conf 把原来/usr/local/openresty/nginx/conf/nginx.conf内容拷贝进来

cd 到nginx目录下 cd /Users/xinshaofeng/Study/nginx
-c 指定配置文件 -p . 指定工程目录 . 当前目录 -s reload 修改配置文件后重启 -s stop 停止
pkill nginx 杀死nginx进程
ps -ef | grep nginx 查看nginx进程

 sudo /usr/local/openresty/nginx/sbin/nginx -c conf/nginx.conf -p .






Mac OpenResty安装

标签:

原文地址:http://www.cnblogs.com/xilanglang/p/5686567.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!