191
190

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.

CentOS6.xにてnginxの最新版をインストールする手順

Last updated at Posted at 2014-01-30

nginx公式ページからyumリポジトリのURLをコピー

公式ページはここ。
http://nginx.org/en/linux_packages.html#stable

「CentOS 6」ってリンクがあるので、URLをコピー。現時点でのURLはこれ(2014/01/30)。まぁ変わらないと思うけど。

CentOSにてリポジトリを登録

先ほど取得したURLを使って、yumリポジトリをCentOSに登録。

# rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

下記ファイルが/etc/yum.repos.d/配下につくられる。

nginx.repo
# nginx.repo

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

nginxをyumでインストール

あとは普通に。。。

# yum -y install nginx

バージョン確認。

# nginx -v
nginx version: nginx/1.4.4

nginxを起動

あ、これだけなんだ。

# nginx

Blog URL : http://www.utano.jp/ (Syntax Error.)

191
190
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
191
190

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?