安装OpenResty

默北 Nginx744,92421字数 813阅读2分42秒阅读模式

OpenResty,也被称为“ngx_openresty”,是一个基于Nginx的核心Web应用程序服务器,它包含了大量的第三方的Nginx模块和大部分系统依赖包。 OpenResty不是Nginx的分支,它只是一个软件包。主要有章亦春维护。

为什么是OpenResty?

OpenResty允许开发人员使用lua编程语言构建现有的Nginx的C模块,支持高流量的应用程序。文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

安装OpenResty

依赖的软件包:文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

  • perl 5.6.1+
  • libreadline
  • libpcre
  • libssl

Debian 和 Ubuntu系统:文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make

Fedora 、RedHat 和 centos系统:文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

yum install readline-devel pcre-devel openssl-devel

下载OpenResty

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

解压、编译、安装:文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

tar xzvf ngx_openresty-1.5.8.1.tar.gz
cd ngx_openresty-1.5.8.1/
./configure --with-luajit
make
make install

另外的配置选项:文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

./configure --prefix=/opt/openresty 
--with-luajit 
--without-http_redis2_module 
--with-http_iconv_module 
--with-http_postgres_module 
-j2
--help to see more options

参考资料:文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

官方: http://openresty.org/
Github: https://github.com/agentzh/ngx_openresty文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/ 文章源自运维生存时间-https://www.ttlsa.com/nginx/how-to-install-openresty/

weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
默北
  • 本文由 发表于 26/09/2014 01:00:35
  • 转载请务必保留本文链接:https://www.ttlsa.com/nginx/how-to-install-openresty/
评论  7  访客  7
    • 匿名
      匿名 9

      这个支持https协议吗?????我看了一下好像不支持。

      • 12
        12 0

        511

        • 运维生存时间网友
          运维生存时间网友 9

          测试一下,学习到了很多的东西

          • 匿名
            匿名 9

            测试一下,学习到了很多的东西

            • 小周
              小周 1

              alert(“11”) 你好

              • Aceslup
                Aceslup 9

                lua语言学起来不知道会不会有难度。

                • xy
                  xy 9

                  虽然不知道老默北写的什么,但是还是要支持一下,给你32个赞啊

                评论已关闭!