1.安装OpenResty的依赖开发库
yum install -y pcre-devel openssl-devel gcc --skip-broken
2.安装OpenResty仓库
yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
3.安装OpenResty
yum install -y openresty
4.安装opm工具
yum install -y openresty-opm
5.配置nginx的环境变量
vi /etc/profile
export NGINX_HOME=/usr/local/openresty/nginx export PATH=${NGINX_HOME}/sbin:$PATH
source /etc/profile
6.启动和运行
# OpenResty底层是基于Nginx的,查看OpenResty目录的nginx目录,,所以运行方式与nginx基本一致 # 启动nginx nginx # 重新加载配置 nginx -s reload # 停止 nginx -s stop
标签:openresty,nginx,yum,install,安装,OpenResty From: https://www.cnblogs.com/navysummer/p/17469324.html