0
0

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 5 years have passed since last update.

CentOS 7 に Nginx をインストールする手順

Last updated at Posted at 2019-09-15

以下では stable 版をインストールする。公式ドキュメントには EPEL を使う方法と公式レポジトリを使う方法があるが、公式レポジトリを使う方が新しいバージョンになるので、公式レポジトリを使う。

sudo -i で管理者になっておくと便利。

レポジトリの作成

/etc/yum.repos.d/nginx.repo というファイル名で以下の内容のファイルを作成する。

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

インストール

# yum install nginx

確認

$ nginx -v

自動起動の有効化

# systemctl enable nginx
0
0
1

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?