OpenResty介绍
- Nginx的非阻塞网络模型,高并发、高性能
- Lua脚本语言的灵活、小巧、高效
- Lua协程与Nginx非阻塞网络模型融合,以同步的方式写非阻塞代码
- OpenResty生态日趋完善,大量应用在高并发场景下,大量优秀的模块
- 参考
- https://openresty.org/en/download.html
- http://nginx.org/en/docs/
- http://luajit.org/index.html
- http://www.lua.org/manual/5.1/
- https://www.gitbook.com/book/moonbingbing/openresty-best-practices/details(最佳实践)
- https://github.com/openresty/lua-nginx-module
- https://github.com/Iresty/nginx-lua-module-zh-wiki(上一官方文档中文翻译)
- https://github.com/bungle/awesome-resty(相关资源整理汇总)
安装配置命令(ubuntu)
安装步骤
依赖安装
1sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev ibssl-dev perl make build-essential源码解压
1tar zxvf openresty-version.tar.gz && cd openresty-version/configure
1./configure --prefix=/opt/openresty --with-luajit --withhttp_iconv_module -j2编译
1make -j2安装
1sudo make install
命令
|
|
配置
|
|
hello world
|
|