Linux Server

自動アップデート

  

ご注意下さい

この記事は3年以上前に書かれた記事ですので、内容が古い可能性があります。

0
(0)

お次は自動アップデート。WindowsUpdateのLinux版の設定です。

aptとyumがあるけど、Fedoraではyumを推奨しているのでyumを利用することにする。
パッケージの取得先は国内のミラーサーバに変更する。
Fedoraのミラーサイトはここで確認できます。
ミラーサーバが決まったら、設定ファイルを変更します。

/etc/yum.confを修正

[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://fedora.redhat.com/releases/fedora-core-$releasever
baseurl=ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/$releasever/$basearch/os

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://fedora.redhat.com/updates/released/fedora-core-$releasever
baseurl=ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/updates/$releasever/$basearch

で、利用可能なパッケージリストをまず取得。

[root@www2 etc]# yum list
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
iiimf-protocol-lib-1-11.4 100% |=========================| 5.3 kB 00:00
xorg-x11-xauth-0-6.7.0-5. 100% |=========================| 68 kB 00:00
finger-0-0.17-24.i386.hdr 100% |=========================| 2.7 kB 00:00
bison-0-1.875c-1.i386.hdr 100% |=========================| 3.8 kB 00:00
iiimf-client-lib-1-11.4-4 100% |=========================| 5.2 kB 00:00
php-pear-0-4.3.6-5.i386.h 100% |=========================| 10 kB 00:00
iiimf-protocol-lib-devel- 100% |=========================| 5.5 kB 00:00
net-tools-0-1.60-25.1.i38 100% |=========================| 6.2 kB 00:00
cups-libs-1-1.1.20-11.1.i 100% |=========================| 6.7 kB 00:00
ppp-0-2.4.2-3.FC2.1.i386. 100% |=========================| 6.7 kB 00:00
xorg-x11-xfs-0-6.7.0-5.i3 100% |=========================| 70 kB 00:00
php-0-4.3.6-5.i386.hdr 100% |=========================| 7.6 kB 00:00
.....

次にアップデート可能なパッケージを表示。

[root@www2 etc]# yum check-update

Unable to find pid
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Name Arch Version Repo
--------------------------------------------------------------------------------
GConf2 i386 2.6.0-7 updates-released
bison i386 1.875c-1 updates-released
cups i386 1:1.1.20-11.1 updates-released
cups-libs i386 1:1.1.20-11.1 updates-released
cvs i386 1.11.17-2 updates-released
dhclient i386 2:3.0.1rc14-1 updates-released
finger i386 0.17-24 updates-released
ftp i386 0.17-21 updates-released
hwdata noarch 0.120-1 updates-released
iiimf-client-lib i386 1:11.4-46.1.svn1587 updates-released
iiimf-client-lib-devel i386 1:11.4-46.1.svn1587 updates-released
iiimf-csconv i386 1:11.4-46.1.svn1587 updates-released
iiimf-docs i386 1:11.4-46.1.svn1587 updates-released
iiimf-le-canna i386 1:11.4-46.1.svn1587 updates-released
iiimf-protocol-lib i386 1:11.4-46.1.svn1587 updates-released
iiimf-protocol-lib-devel i386 1:11.4-46.1.svn1587 updates-released
iiimf-server i386 1:11.4-46.1.svn1587 updates-released
jcode.pl noarch 2.13-9.2 updates-released
kcc i386 2.3-20.1 updates-released
kernel i686 2.6.6-1.435.2.3 updates-released
kernel-smp i686 2.6.6-1.435.2.3 updates-released
krb5-devel i386 1.3.3-7 updates-released
krb5-libs i386 1.3.3-7 updates-released
krb5-server i386 1.3.3-7 updates-released
libgnome i386 2.6.0-3 updates-released
libpng i386 2:1.2.5-5 updates-released
net-tools i386 1.60-25.1 updates-released
nfs-utils i386 1.0.6-22 updates-released
php i386 4.3.6-5 updates-released
php-ldap i386 4.3.6-5 updates-released
php-pear i386 4.3.6-5 updates-released
ppp i386 2.4.2-3.FC2.1 updates-released
rsync i386 2.6.2-1 updates-released
squid i386 7:2.5.STABLE5-4.fc2 updates-released
strace i386 4.5.5-1 updates-released
xorg-x11-Mesa-libGL i386 6.7.0-5 updates-released
xorg-x11-devel i386 6.7.0-5 updates-released
xorg-x11-font-utils i386 6.7.0-5 updates-released
xorg-x11-libs i386 6.7.0-5 updates-released
xorg-x11-libs-data i386 6.7.0-5 updates-released
xorg-x11-xauth i386 6.7.0-5 updates-released
xorg-x11-xfs i386 6.7.0-5 updates-released

へーカーネルもアップデートできるんだ。びっくり。
そして実際にアップデート。

[root@www2 etc]# yum update
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
.conflict between initscripts and pppd
[root@www2 etc]# yum upgrade
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Finding obsoleted packages
Resolving dependencies
.conflict between initscripts and pppd

なんかpppdが悪さしてアップデートもアップグレードもできないみたい。
どうせpppは使用しないのでアンインストールしよう。

[root@www2 etc]# rpm -qa | grpe -i ppp
-bash: grpe: command not found
[root@www2 etc]# rpm -qa | grep -i ppp
rp-pppoe-3.5-14
ppp-2.4.2-2
[root@www2 etc]# rpm -e ppp-2.4.2-2
エラー: Failed dependencies:
ppp >= 2.3.13 is needed by (installed) rp-pppoe-3.5-14
ppp >= 2.3.7 is needed by (installed) wvdial-1.53-13
[root@www2 etc]# rpm -e rp-pppoe-3.5-14
[root@www2 etc]# rpm -e wvdial-1.53-13
[root@www2 etc]# rpm -e ppp-2.4.2-2

再度アップデート開始してみると、今度はOK.

[root@www2 etc]# yum update
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[install: kernel-smp 2.6.6-1.435.2.3.i686]
[install: kernel 2.6.6-1.435.2.3.i686]
[update: cups 1:1.1.20-11.1.i386]
[update: xorg-x11-xauth 6.7.0-5.i386]
[update: jcode.pl 2.13-9.2.noarch]
[update: php 4.3.6-5.i386]
[update: finger 0.17-24.i386]
[update: net-tools 1.60-25.1.i386]
[update: cups-libs 1:1.1.20-11.1.i386]
[update: kcc 2.3-20.1.i386]
[update: ftp 0.17-21.i386]
[update: xorg-x11-devel 6.7.0-5.i386]
[update: GConf2 2.6.0-7.i386]
[update: iiimf-server 1:11.4-46.1.svn1587.i386]
[update: iiimf-protocol-lib 1:11.4-46.1.svn1587.i386]
[update: hwdata 0.120-1.noarch]
[update: xorg-x11-xfs 6.7.0-5.i386]
[update: iiimf-docs 1:11.4-46.1.svn1587.i386]
[update: krb5-server 1.3.3-7.i386]
[update: xorg-x11-libs 6.7.0-5.i386]
[update: krb5-devel 1.3.3-7.i386]
[update: libgnome 2.6.0-3.i386]
[update: bison 1.875c-1.i386]
[update: iiimf-client-lib 1:11.4-46.1.svn1587.i386]
[update: iiimf-csconv 1:11.4-46.1.svn1587.i386]
[update: cvs 1.11.17-2.i386]
[update: php-pear 4.3.6-5.i386]
[update: strace 4.5.5-1.i386]
[update: php-ldap 4.3.6-5.i386]
[update: xorg-x11-font-utils 6.7.0-5.i386]
[update: iiimf-protocol-lib-devel 1:11.4-46.1.svn1587.i386]
[update: iiimf-le-canna 1:11.4-46.1.svn1587.i386]
[update: iiimf-client-lib-devel 1:11.4-46.1.svn1587.i386]
[update: dhclient 2:3.0.1rc14-1.i386]
[update: nfs-utils 1.0.6-22.i386]
[update: krb5-libs 1.3.3-7.i386]
[update: libpng 2:1.2.5-5.i386]
[update: xorg-x11-Mesa-libGL 6.7.0-5.i386]
[update: squid 7:2.5.STABLE5-4.fc2.i386]
[update: rsync 2.6.2-1.i386]
[update: xorg-x11-libs-data 6.7.0-5.i386]
Is this ok [y/N]: y
Downloading Packages
Getting cups-1.1.20-11.1.i386.rpm
cups-1.1.20-11.1.i386.rpm 100% |=========================| 2.5 MB 00:03
Getting xorg-x11-xauth-6.7.0-5.i386.rpm
xorg-x11-xauth-6.7.0-5.i3 100% |=========================| 233 kB 00:00
Getting jcode.pl-2.13-9.2.noarch.rpm
jcode.pl-2.13-9.2.noarch. 100% |=========================| 15 kB 00:00
.....
xorg-x11-libs-data-6.7.0- 100% |=========================| 353 kB 00:00
Running test transaction:
Test transaction complete, Success!
krb5-libs 100 % done 1/80
iiimf-protocol-lib 100 % done 2/80
libpng 100 % done 3/80
GConf2 100 % done 4/80
cups-libs 100 % done 5/80
iiimf-client-lib 100 % done 6/80
iiimf-csconv 100 % done 7/80
kernel 100 % done 8/80
.....
Completing update for xorg-x11-libs-data - 80/80
Kernel Updated/Installed, checking for bootloader
Grub found - making this kernel the default
Installed: kernel-smp 2.6.6-1.435.2.3.i686 kernel 2.6.6-1.435.2.3.i686
Updated: cups 1:1.1.20-11.1.i386 xorg-x11-xauth 6.7.0-5.i386 jcode.pl 2.13-9.2.noarch php 4.3.6-5.i386 finger 0.17-24.i386 net-tools 1.60-25.1.i386 cups-libs 1:1.1.20-11.1.i386 kcc 2.3-20.1.i386 ftp 0.17-21.i386 xorg-x11-devel 6.7.0-5.i386 GConf2 2.6.0-7.i386 iiimf-server 1:11.4-46.1.svn1587.i386 iiimf-protocol-lib 1:11.4-46.1.svn1587.i386 hwdata 0.120-1.noarch xorg-x11-xfs 6.7.0-5.i386 iiimf-docs 1:11.4-46.1.svn1587.i386 krb5-server 1.3.3-7.i386 xorg-x11-libs 6.7.0-5.i386 krb5-devel 1.3.3-7.i386 libgnome 2.6.0-3.i386 bison 1.875c-1.i386 iiimf-client-lib 1:11.4-46.1.svn1587.i386 iiimf-csconv 1:11.4-46.1.svn1587.i386 cvs 1.11.17-2.i386 php-pear 4.3.6-5.i386 strace 4.5.5-1.i386 php-ldap 4.3.6-5.i386 xorg-x11-font-utils 6.7.0-5.i386 iiimf-protocol-lib-devel 1:11.4-46.1.svn1587.i386 iiimf-le-canna 1:11.4-46.1.svn1587.i386 iiimf-client-lib-devel 1:11.4-46.1.svn1587.i386 dhclient 2:3.0.1rc14-1.i386 nfs-utils 1.0.6-22.i386 krb5-libs 1.3.3-7.i386 libpng 2:1.2.5-5.i386 xorg-x11-Mesa-libGL 6.7.0-5.i386 squid 7:2.5.STABLE5-4.fc2.i386 rsync 2.6.2-1.i386 xorg-x11-libs-data 6.7.0-5.i386
Transaction(s) Complete

これで、パッケージのアップデートは終了です。

WS000000.JPG

確かにカーネルもアップしている!適当にcronに仕込んで自動アップデートしてみよう。

この記事は役に立ちましたか? | Is this article useful for you?

評価をお願いします | Please leave your rating.

平均 | Av.: 0 / 5. 投票数 | Votes: 0

最初の評価を下さい | Please vote for the first rating.

-Linux Server
-

© 1999 - 2021 蒲田ネット