普通にyumインストールすると、古いバージョンのNginx
がインストールされてしまう。
リポジトリ設定
[code lang=text]
$ rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
[/code]
インストール
[code lang=text]
$ yum install nginx
[/code]
自動起動設定
[code lang=text]
$ chkconfig nginx on
$ chkconfig nginx –list
nginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[/code]
サーバの起動
[code lang=text]
$ nginx
[/code]
ブラウザで確認
サーバの停止
[code lang=text]
$ nginx -s stop
[/code]
簡単です。