OpenResty(1)--Install

OpenResty主要由春哥(agentzh)开发维护

OpenResty是一个全功能的 Web 应用服务器,它打包了标准的 Nginx 核心,很多的常用的第三方模块,以及它们的大多数依赖项。

OpenResty目标是让你的Web服务直接跑在 Nginx 服务内部,充分利用 Nginx 的非阻塞 I/O 模型

参考 http://www.openresty.org

安装:

本安装程序是在Ubuntu下安装

 

1.DownLoad OpenResty

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

本例:wget http://openresty.org/download/ngx_openresty-1.7.0.1.tar.gz

 

2.Install dependent packages

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

 

3.Install OpenResty

tar zxvf ngx_openresty-Version.tar.gz

cd ./ngx_openresty-Version

./configure --prefix=/usr/local/openresty --with-luajit

make -j2

make install

 

4.Test OpenResty

vim /usr/local/openresty/nginx/config/nginx.conf

location /test_lua {

     default_type 'text/plain';

     content_by_lua 'ngx.print("test lua")';

}

cd /usr/local/openresty/nginx

./sbin/nginx -t   //test configuration and exit 

./sbin/nginx      //start nginx

curl http://localhost/test_lua

 

5.other configuration

每次配置 nginx.conf

需要 ./sbin/nginx -s reload

 

 

 

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值