Install nginx Using Yum Command on CentOS release 5.7 (Final)

とりあえずインストール編!

前々からPOSTした記事をtwitter連携でつぶやいたりしたときは一時的に処理が重くなってたっぽく、何かしら対策をしようと思いつつやってなかったので3連休の最後の夜にメモ残しも兼ねて。nginxって何って紹介はしないけども。

とりあえずyumする。

[root@defenceless sasaki]# 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
base | 1.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Setting up Install Process
No package nginx available.
Nothing to do

って言われたので、これまた前々から導入しようと思っていたyum-prioritiesをこの際に導入。

[root@defenceless sasaki]# yum -y install yum-priorities
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Setting up Install Process
]Resolving Dependencies
-->Running transaction check
--->Package yum-priorities.noarch 0:1.1.16-21.el5.centos set to be updated

-->Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================================================
Installing:
yum-priorities noarch 1.1.16-21.el5.centos base 16 k

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

Total download size: 16 k
Downloading Packages:
yum-priorities-1.1.16-21.el5.centos.noarch.rpm | 16 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : yum-priorities 1/1

Installed:
yum-priorities.noarch 0:1.1.16-21.el5.centos

Complete!

その後、

[root@defenceless sasaki]# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
[root@defenceless sasaki]# rpm -ivh http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
[root@defenceless sasaki]# rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-5
[root@defenceless sasaki]# rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
[root@defenceless sasaki]# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
[root@defenceless sasaki]# rpm -ivh http://rpms.famillecollet.com/enterprise/5/remi/x86_64/remi-release-5-8.el5.remi.noarch.rpm

とかってやる。(history見てみると、なんでか先頭にスペース打つときがあるって謎。癖?)
その後、それぞれのrepoのプライマリにenableが立ってることを確認。

[root@defenceless sasaki]# vi /etc/yum.repos.d/rpmforge.repo

### Name: RPMforge RPM Repository for RHEL 5 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

本来の目的である下記を実施。

[root@defenceless sasaki]# yum install nginx
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* rpmforge: ftp.riken.jp
* updates: ftp.iij.ad.jp
epel | 3.7 kB 00:00
epel/primary_db | 3.9 MB 00:00
rpmforge | 1.9 kB 00:00
rpmforge/primary_db | 6.9 MB 00:01
Setting up Install Process
Resolving Dependencies
-->Running transaction check
--->Package nginx.x86_64 0:0.8.55-2.el5 set to be updated
-->Processing Dependency: libgd.so.2()(64bit) for package: nginx
-->Processing Dependency: libGeoIP.so.1()(64bit) for package: nginx
-->Running transaction check
--->Package gd.x86_64 0:2.0.33-9.4.el5_4.2 set to be updated
--->Package geoip.x86_64 0:1.4.6-1.el5.rf set to be updated
-->Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================================================
Installing:
nginx x86_64 0.8.55-2.el5 epel 389 k
Installing for dependencies:
gd x86_64 2.0.33-9.4.el5_4.2 base 155 k
geoip x86_64 1.4.6-1.el5.rf rpmforge 754 k

Transaction Summary
========================================================================================================================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)

Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): gd-2.0.33-9.4.el5_4.2.x86_64.rpm | 155 kB 00:00
(2/3): nginx-0.8.55-2.el5.x86_64.rpm | 389 kB 00:00
(3/3): geoip-1.4.6-1.el5.rf.x86_64.rpm | 754 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 3.8 MB/s | 1.3 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : geoip 1/3
Installing : gd 2/3
Installing : nginx 3/3

Installed:
nginx.x86_64 0:0.8.55-2.el5

Dependency Installed:
gd.x86_64 0:2.0.33-9.4.el5_4.2 geoip.x86_64 0:1.4.6-1.el5.rf

Complete!

4 thoughts on “Install nginx Using Yum Command on CentOS release 5.7 (Final)”

Leave a Reply

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