美文网首页
安装openresty

安装openresty

作者: 1995x | 来源:发表于2018-09-27 22:55 被阅读0次

    执行命令:

    mkdir -p /usr/server

    cd /usr/server

    yum install -y readline-devel openssl-devel gcc

    wget http://openresty.org/download/ngx_openresty-1.7.7.2.tar.gz

    tar -zxvf ngx_openresty-1.7.7.2.tar.gz

    cd /usr/server/ngx_openresty-1.7.7.2

    cd bundle/LuaJIT-2.1-20150120/

    make clean && make && make install

    ln -sf luajit-2.1.0-alpha /usr/local/bin/luajit

    cd /usr/server/ngx_openresty-1.7.7.2/bundle

    wget https://github.com/FRICKLE/ngx_cache_purge/archive/2.3.tar.gz

    tar -zxvf 2.3.tar.gz

    wget https://github.com/yaoweibin/nginx_upstream_check_module/archive/v0.3.0.tar.gz

    tar -zxvf v0.3.0.tar.gz

    cd /usr/server/ngx_openresty-1.7.7.2

    yum-y install zlib zlib-devel openssl openssl--devel pcre pcre-devel

    ./configure --prefix=/usr/server/ --with-http_realip_module --with-luajit --add-module=./bundle/ngx_cache_purge-2.3/ --add-module=./bundle/nginx_upstream_check_module-0.3.0/ -j2

    make && make install

    查看nginx版本:

    /usr/server/nginx/sbin/nginx -V

    启动nginx:

    /usr/server/nginx/sbin/nginx

    相关文章

      网友评论

          本文标题:安装openresty

          本文链接:https://www.haomeiwen.com/subject/nlndnftx.html