zoukankan      html  css  js  c++  java
  • Mac OpenResty安装

    参考网址:
              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 .






  • 相关阅读:
    前端之JavaScript
    前端之CSS
    前端之HTML
    编程总结
    线程
    锁机制,信号机制,事件机制
    并发编程
    struct
    linux查看端口
    vue页面跳转传参
  • 原文地址:https://www.cnblogs.com/xilanglang/p/5686567.html
Copyright © 2011-2022 走看看