ServersMan@VPS CentOS6へのNginx Install

というわけで、次はNginxのInstall

といっても配布されているパッケージ使うので簡単。
まずはyumレポジトリの追加

[xxxxx@dti-vps-srvXX ~]$ sudo yum install http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.4 MB     00:00
extras                                                   | 3.5 kB     00:00
extras/primary_db                                        |  19 kB     00:00
updates                                                  | 3.5 kB     00:00
updates/primary_db                                       | 2.1 MB     00:00
vz-base                                                  |  951 B     00:00
vz-updates                                               |  951 B     00:00
Setting up Install Process
nginx-release-centos-6-0.el6.ngx.noarch.rpm              | 4.2 kB     00:00
Examining /var/tmp/yum-root-q1v7MV/nginx-release-centos-6-0.el6.ngx.noarch.rpm: nginx-release-centos-6-0.el6.ngx.noarch
Marking /var/tmp/yum-root-q1v7MV/nginx-release-centos-6-0.el6.ngx.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nginx-release-centos.noarch 0:6-0.el6.ngx will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package      Arch   Version     Repository                                Size
================================================================================
Installing:
 nginx-release-centos
              noarch 6-0.el6.ngx /nginx-release-centos-6-0.el6.ngx.noarch 1.5 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total size: 1.5 k
Installed size: 1.5 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : nginx-release-centos-6-0.el6.ngx.noarch                      1/1
  Verifying  : nginx-release-centos-6-0.el6.ngx.noarch                      1/1

Installed:
  nginx-release-centos.noarch 0:6-0.el6.ngx

Complete!
[xxxxx@dti-vps-srvXX ~]$

後はyum installするだけ。

[xxxxx@dti-vps-srvXX ~]$ yum list nginx
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.4 MB     00:00
extras                                                   | 3.5 kB     00:00
extras/primary_db                                        |  19 kB     00:00
nginx                                                    | 2.9 kB     00:00
nginx/primary_db                                         |  23 kB     00:00
updates                                                  | 3.5 kB     00:00
updates/primary_db                                       | 2.1 MB     00:00
vz-base                                                  |  951 B     00:00
vz-base/primary                                          | 1.3 kB     00:00
vz-base                                                                     3/3
vz-updates                                               |  951 B     00:00
vz-updates/primary                                       |  157 B     00:00
Available Packages
nginx.x86_64                        1.4.1-1.el6.ngx                        nginx
[xxxxx@dti-vps-srvXX ~]$ sudo yum install nginx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
nginx                                                    | 2.9 kB     00:00
nginx/primary_db                                         |  23 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:1.4.1-1.el6.ngx will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package        Arch            Version                    Repository      Size
================================================================================
Installing:
 nginx          x86_64          1.4.1-1.el6.ngx            nginx          311 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 311 k
Installed size: 770 k
Is this ok [y/N]: y
Downloading Packages:
nginx-1.4.1-1.el6.ngx.x86_64.rpm                         | 311 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : nginx-1.4.1-1.el6.ngx.x86_64                                 1/1
----------------------------------------------------------------------

Thanks for using NGINX!

Check out our community web site:
* http://nginx.org/en/support.html

If you have questions about commercial support for NGINX please visit:
* http://www.nginx.com/support.html

----------------------------------------------------------------------
  Verifying  : nginx-1.4.1-1.el6.ngx.x86_64                                 1/1

Installed:
  nginx.x86_64 0:1.4.1-1.el6.ngx

Complete!
[xxxxx@dti-vps-srvXX ~]$

一応確認


[xxxxx@dti-vps-srvXX ~]$ chkconfig –list nginx
nginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[xxxxx@dti-vps-srvXX ~]$ service nginx status
nginx is stopped
[xxxxx@dti-vps-srvXX ~]$ sudo service nginx start
Starting nginx: [ OK ]

ブラウザで叩いて Welcome to nginx! が表示されたらとりあえずOK

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.