OpenResty(1)--Install,openresty--install
OpenResty(1)--Install,openresty--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
评论暂时关闭