読者です 読者をやめる 読者になる 読者になる

AKAI TSUKI

System development or Technical something

Nginx install CentOS 7(Docker Container)

お試しインストールということで、コンテナ環境を使っています。

(参考)
mainline version
http://nginx.org/en/linux_packages.html#mainline

write about stable version install
https://www.nginx.com/resources/wiki/start/topics/tutorials/install/#

yum repositoryを設定

[root@docker01 ~]# docker run -it --rm centos bash
[root@f77c015d2d6a /]# vi /etc/yum.repos.d/nginx.repo
[root@f77c015d2d6a /]# cat /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
[root@f77c015d2d6a /]#

インストール

[root@f77c015d2d6a /]# yum info nginx
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
Available Packages
Name        : nginx
Arch        : x86_64
Epoch       : 1
Version     : 1.11.2
Release     : 1.el7.ngx
Size        : 653 k
Repo        : nginx/7/x86_64
Summary     : High performance web server
URL         : http://nginx.org/
License     : 2-clause BSD-like license
Description : nginx [engine x] is an HTTP and reverse proxy server, as well as
            : a mail proxy server.

[root@f77c015d2d6a /]# yum install -y nginx