openresty简单部署

安装

#依赖包:yum install readline-devel pcre-devel openssl-devel gcc

# 确保yum周边工具已经安装:yum install yum-utils -y

# 添加仓库: yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo

# 安装openresty:yum install openresty -y

openresty默认安装在/usr/local/openresty,其中已自带nginx。

nginx配置文件:

cd /usr/local/openresty/nginx/conf

安装命令行工具 resty

安装 openresty-resty 包:

sudo yum install openresty-resty –y

启动

# 启动openresty:/usr/local/openresty/bin/openresty

# 启动openresty:/usr/local/openresty/bin/openresty -s stop

验证是否可用:

openresty -V

curl -vo /dev/null http://localhost/index.html

你可能感兴趣的:(分布式,网关与负载均衡)