zoukankan      html  css  js  c++  java
  • nginx Openresty安装及使用

    OpenResty是一个全功能的 Web 应用服务器。它打包了标准的 Nginx 核心,常用的第三方模块以及大多数依赖项。 可以把它看成是Nginx附加众多的第三方插件的合集。其主体是嵌入lua脚本的支持,让你能够使用lua灵活地处理运算逻辑。

    1、Openresty的安装配置
       1.1、简易的yum安装方式
            此方式简单,缺点是无法干预启停插件       

    yum install yum-utils

              yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo

            yum install openresty
    1.2、源码安装方式
    默认, --prefix=/usr/local/openresty 程序会被安装到/usr/local/openresty目录(当时安装完找半天找不到在哪,结果看官方文档说会默认安装到/usr/local/openresty目录,如果需要指定目录可以去看官方文档:http://openresty.org/cn/installation.html,不过这玩意不要去改,默认就挺好的)。

    wget https://openresty.org/download/openresty-1.15.8.1.tar.gz

    tar -zxvf openresty-1.15.8.1.tar.gz

    ##选择需要的插件启用, --with-Components 激活组件,--without 则是禁止组件

    ./configure  --without-http_redis2_module  --with-http_iconv_module

    ##默认, --prefix=/usr/local/openresty 程序会被安装到/usr/local/openresty目录。

    make  && make install


    ## 配置环境变量


    vi /etc/profile   ##加入path路径

    export PATH=$PATH:/usr/local/openresty/nginx/sbin/

    source /etc/profile  ##生效配置


    启停命令:
    ./nginx -c nginx.conf的文件。如果不指定,默认为NGINX_HOME/conf/nginx.conf
    ./nginx -s stop 停止
    ./nginx -s quit退出
    ./nginx -s reload 重新加载nginx.conf
    ————————————————
    版权声明:本文为CSDN博主「有头发的猩猩」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/m0_37574389/article/details/98873899

  • 相关阅读:
    安卓android.support.design使用中的问题
    处理requests SSl 证书问题
    python-excel
    post 请求包含相同参数
    关于zk 页面滚动问题 scroll
    Usefull Jquery
    Git 安装
    Comparison issues in TD
    Work Diary 12/13/17
    Unit10 I don't like work in the weekend
  • 原文地址:https://www.cnblogs.com/takemetoyourheart/p/12732526.html
Copyright © 2011-2022 走看看