linux centos 安装 openresty

本文介绍了在CentOS上安装OpenResty的过程,包括配置仓库、解决下载问题等关键步骤,并分享了针对不同系统版本可能遇到的问题及解决方案。

centos 安装 openresty

1.0 前言

因公司需要搭建测试环境 我这里选择openresty 环境 centos

2.0 实现

1.安装openresty 仓库

wget https://openresty.org/package/centos/openresty.repo

2.安装命令

yum install -y openresty

3 正确情况
在这里插入图片描述

4异常情况

Official OpenResty Open Source Repository for CentOS                                                                                                                                                    340  B/s | 166  B     00:00    
Errors during downloading metadata for repository 'openresty':
  - Status code: 404 for https://openresty.org/package/centos/3/x86_64/repodata/repomd.xml (IP: 121.40.24.190)
Error: Failed to download metadata for repo 'openresty': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

在这里插入图片描述
5解决方案
vi /etc/yum/openresty.repo
我这里把变量修改为7,

baseurl=https://openresty.org/package/centos/7/$basearch

如还有问题 访问 把我的7 替换即可
https://openresty.org/package/centos/

3.0总结

安装步骤其实比较简单 ,但可能出现各种不同问题,因为系统版本可能不同 ,操作系统不同。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值