首页 / MAC / Mac OpenResty安装
Mac OpenResty安装
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Mac OpenResty安装,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1009字,纯文字阅读大概需要2分钟。
内容图文
参考网址:
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 .
原文:http://www.cnblogs.com/xilanglang/p/5686567.html
内容总结
以上是互联网集市为您收集整理的Mac OpenResty安装全部内容,希望文章能够帮你解决Mac OpenResty安装所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。