amazon-web-services – 如何在amazon linux disto上安装nginx 1.9.15

前端之家收集整理的这篇文章主要介绍了amazon-web-services – 如何在amazon linux disto上安装nginx 1.9.15前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我尝试在新的亚马逊linux上安装最新版本的Nginx(> = 1.9.5)来使用http2.我按照这里描述的说明 – > http://nginx.org/en/linux_packages.html

我创建了一个repo文件/etc/yum.repos.d/Nginx.repowith这个内容

[Nginx]
name=Nginx repo
baseurl=http://Nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1

如果我运行yum update和yum install Nginx,我会得到:

Nginx x86_64 1:1.8.1-1.26.amzn1 amzn-main 557 k

看起来它仍然来自amzn-main回购.如何安装较新版本的Nginx

– 编辑 –
我在Nginx.repo文件添加了“priority = 10”,现在我可以使用yum install Nginx安装1.9.15,结果如下:

Loaded plugins: priorities,update-motd,upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package Nginx.x86_64 1:1.9.15-1.el7.ngx will be installed
--> Processing Dependency: systemd for package: 1:Nginx-1.9.15-1.el7.ngx.x86_64
--> Processing Dependency: libpcre.so.1()(64bit) for package: 1:Nginx-1.9.15-1.el7.ngx.x86_64
--> Finished Dependency Resolution
Error: Package: 1:Nginx-1.9.15-1.el7.ngx.x86_64 (Nginx)
           Requires: libpcre.so.1()(64bit)
Error: Package: 1:Nginx-1.9.15-1.el7.ngx.x86_64 (Nginx)
           Requires: systemd
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
最佳答案
您收到错误是因为这些Nginx RPM是为RHEL7构建的,而不是为Amazon Linux构建的. Amazon Linux是RHEL6,RHEL7和Fedora的奇怪混合体.您应该联系亚马逊并要求他们创建专门为其发行版构建的适当的Nginx19 RPM.
原文链接:https://www.f2er.com/nginx/434930.html

猜你在找的Nginx相关文章