Tripwire エラー

/root/tripwire.shを実行すると以下のようなエラーが出るようになった。

[root@server ~]# /root/tripwire.sh
### Warning: File system error.
### Filename: /var/lib/rpm/__db.001
### \xa4\xbd\xa4\xce\xa4\xe8\xa4\xa6\xa4\xca\xa5\xd5\xa5\xa1\xa5\xa4\xa5\xeb\xa4\xe4\xa5\xc7\xa5\xa3\xa5\xec\xa5\xaf\xa5\xc8\xa5\xea\xa4\xcf\xa4\xa2\xa4\xea\xa4\xde\xa4\xbb\xa4\xf3
### Continuing...
### Warning: File system error.
### Filename: /var/lib/rpm/__db.002
### \xa4\xbd\xa4\xce\xa4\xe8\xa4\xa6\xa4\xca\xa5\xd5\xa5\xa1\xa5\xa4\xa5\xeb\xa4\xe4\xa5\xc7\xa5\xa3\xa5\xec\xa5\xaf\xa5\xc8\xa5\xea\xa4\xcf\xa4\xa2\xa4\xea\xa4\xde\xa4\xbb\xa4\xf3
### Continuing...
### Warning: File system error.
### Filename: /var/lib/rpm/__db.003
### \xa4\xbd\xa4\xce\xa4\xe8\xa4\xa6\xa4\xca\xa5\xd5\xa5\xa1\xa5\xa4\xa5\xeb\xa4\xe4\xa5\xc7\xa5\xa3\xa5\xec\xa5\xaf\xa5\xc8\xa5\xea\xa4\xcf\xa4\xa2\xa4\xea\xa4\xde\xa4\xbb\xa4\xf3
### Continuing...

rpmのデータベース/var/lib/rpm/__db.001~/var/lib/rpm/__db.003を念のため移動してから再構築する。

[root@server ~]# ls -l /var/lib/rpm/
合計 46964
-rw-r--r-- 1 rpm  rpm    196608  8月 11 17:17 Requireversion
-rw-r--r-- 1 rpm  rpm     81920  8月 11 17:17 Sha1header
-rw-r--r-- 1 rpm  rpm     49152  8月 11 17:17 Sigmd5
-rw-r--r-- 1 rpm  rpm     12288  7月 15 06:01 Triggername
-rw-r--r-- 1 root root    24576  8月 11 18:46 __db.001
-rw-r--r-- 1 root root  1318912  8月 11 18:46 __db.002
-rw-r--r-- 1 root root   450560  8月 11 18:46 __db.003
[root@server ~]# mv /var/lib/rpm/__db.00? /tmp
[root@server ~]# rpm --rebuilddb

再構築が終了したら正常に動作するか確認する。

[root@server ~]# rpm -qa
[root@server ~]# yum list

再度/root/tripwire.shを実行

[root@server ~]# /root/tripwire.sh

エラーは出ないようになった。

yumのミラーサイトに関するエラー

久々に手動でyum updateしてみたら以下のようなエラーが出た。ネットで調べたらyumのミラーサイトに関するエラーのようだ。yum clean allしてからyum updateすれば大丈夫らしい。
Error: Missing Dependency: bind-libs = 30:9.3.4-10.P1.el5_3.1 is needed by package 30:bind-9.3.4-10.P1.el5_3.1.i386 (updates)

[root@server ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@server ~]# yum update

カーネルも上がってるようなので、まずはバージョンチェック。

[root@server ~]# uname --kernel-release
2.6.18-128.2.1.el5.centos.plus

カーネルは再起動しないと反映されないので、再起動してみる。

[root@server ~]# shutdown -r now

再起動できたので、再度カーネルのバージョン確認

[root@server ~]# uname --kernel-release
2.6.18-128.4.1.el5.centos.plus  ← 新しくなっている。

Webサーバ(Apache)のドキュメントルートの所有者がrootに戻るので所有者変更が必要。
ドキュメントルート所有者変更確認

[root@server ~]# ll /var/www/
合計 36
drwxr-xr-x  2 root root   4096  7月 14 19:08 cgi-bin
drwxr-xr-x  3 root root   4096  7月 15 06:01 error
drwxr-xr-x 38 root root   4096  7月 14 19:08 html
drwxr-xr-x  3 root root   4096  7月 15 06:01 icons
drwxr-xr-x 10 root apache 4096  1月 23  2009 phpmyadmin

ドキュメントルートの所有者変更と確認

[root@server ~]# chown higo:higo /var/www/html/
[root@server ~]# ll /var/www/
合計 36
drwxr-xr-x  2 root root   4096  7月 14 19:08 cgi-bin
drwxr-xr-x  3 root root   4096  7月 15 06:01 error
drwxr-xr-x 38 higo higo   4096  7月 14 19:08 html
drwxr-xr-x  3 root root   4096  7月 15 06:01 icons
drwxr-xr-x 10 root apache 4096  1月 23  2009 phpmyadmin