1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS7にnginxのバージョンを指定してインストール

Last updated at Posted at 2019-10-29

nginx の最新は1.17.5 (2019/10/29 現在)

1.17.4を取得したい場合

$ rpm -ivh http://nginx.org/packages/mainline/centos/7/x86_64/RPMS/nginx-1.17.4-1.el7.ngx.x86_64.rpm

もしくは

$ vi /etc/yum.repos.d/nginx.repo

以下追加

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key

///////////////////////////////////////////////////
$releasever
/etc/yum.conf の distroverpkg の値
distroverpkg=centos-release

$basearch
x86_64
///////////////////////////////////////////////////

$ yum search --showduplicate nginx --enablerepo=nginx-mainline
$ yum install nginx-1.17.4-1.el7.ngx.x86_64 --enablerepo=nginx

$ nginx -v
nginx version: nginx/1.17.4
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?