1、简介
OpenResty(又称:ngx_openresty)是一个基于Nginx的可伸缩的Web平台,由中国人章亦春发起,提供了很多高质量的第三方模块。
OpenResty是一个强大的Web应用服务器,Web开发人员可以使用lua脚本语言调动Nginx支持的各种C以及Lua模块,更主要的是在性能方面,OpenResty可以快速的构造出足以胜任10K以上的并发连接响应的超高性能的Web应用系统。
2、安装
2.1 查看centos本地版本
cat /etc/redhat-release
2.2 安装yum-utils
yum install -y yum-utils
2.3 给yum 添加安装openresty的repo
yum-config-manager --add-repo https://openresty.org/package/rhel/openresty.repo
2.4 安装openresty
yum install -y openresty
2.5 启动openresty
systemctl start openresty
2.6 关闭防火墙(无影响可不执行)
systemctl stop firewalld
systemctl disable firewalld
2.7 访问测试
2.8 安装openresty的命令行工具 resty
yum install -y openresty-resty
2.9 查看当前安装的openresty的版本
/usr/local/openresty/bin/openresty -V