在RockyLinux 8中安装Nginx 1.18(通过AppStream)

首先或开始

使用Application Stream(AppStream)在RockyLinux8上安装Nginx 1.18
主文:Nginx的各种安装方法和EOL概述

支持

如果使用这种方法进行引入,则根据Red Hat企业版Linux应用流生命周期-红帽客户门户网站,2021年5月可能会到达终止支持(EOL)状态。
之后可能不会对报告的漏洞和问题进行响应。

记录

安装

# cat /etc/redhat-release
Rocky Linux release 8.8 (Green Obsidian)

# yum module list nginx
Last metadata expiration check: 0:00:03 ago on Fri Jul  7 04:36:43 2023.
Rocky Linux 8 - AppStream
Name                      Stream                       Profiles                       Summary
nginx                     1.14 [d]                     common [d]                     nginx webserver
nginx                     1.16                         common [d]                     nginx webserver
nginx                     1.18                         common [d]                     nginx webserver
nginx                     1.20                         common [d]                     nginx webserver
nginx                     1.22                         common [d]                     nginx webserver

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

# yum install -y @nginx:1.18
... 略

各种确认

# which nginx
/usr/sbin/nginx

# nginx -v
nginx version: nginx/1.18.0

# yum module info nginx:1.18
Last metadata expiration check: 0:00:30 ago on Fri Jul  7 04:42:38 2023.
Name             : nginx
Stream           : 1.18 [e] [a]
Version          : 8040020210610090124
Context          : 9f9e2e7e
Architecture     : x86_64
Profiles         : common [d] [i]
Default profiles : common
Repo             : appstream
Summary          : nginx webserver
Description      : nginx 1.18 webserver module
Requires         : platform:[el8]
Artifacts        : nginx-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.src
                 : nginx-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-all-modules-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.noarch
                 : nginx-debuginfo-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-debugsource-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-filesystem-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.noarch
                 : nginx-mod-http-image-filter-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-http-image-filter-debuginfo-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-http-perl-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-http-perl-debuginfo-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-http-xslt-filter-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-http-xslt-filter-debuginfo-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-mail-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-mail-debuginfo-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-stream-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64
                 : nginx-mod-stream-debuginfo-1:1.18.0-3.module+el8.4.0+544+e40554cf.1.x86_64

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled, [a]ctive