ラベル yum の投稿を表示しています。 すべての投稿を表示
ラベル yum の投稿を表示しています。 すべての投稿を表示

2008年8月8日金曜日

自宅サーバ構築 No.011(kernel update & grub)

yum の設定が終わっているので、頻繁に‘yum update’として、インストール済のパッケージをアップデートするわけですが、たまに kernel のアップデートが発生します。

kernel のアップデートは結構頻度が高いです。重要なコンポーネントですから当然と言えば当然でしょう。一般的に以下の様に grub の設定も同時に変更され、過去の kernel とアップデートされた kernel を選んで起動できるようになっています。(当然、標準は新しい kernel です。)

# pwd
/boot/grub

# cat menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.10.el5)
      root (hd0,0)
      kernel /vmlinuz-2.6.18-92.1.10.el5 ro root=LABEL=/
      initrd /initrd-2.6.18-92.1.10.el5.img
title CentOS (2.6.18-92.1.6.el5)
      root (hd0,0)
      kernel /vmlinuz-2.6.18-92.1.6.el5 ro root=LABEL=/
      initrd /initrd-2.6.18-92.1.6.el5.img
title CentOS (2.6.18-92.el5)
      root (hd0,0)
      kernel /vmlinuz-2.6.18-92.el5 ro root=LABEL=/
      initrd /initrd-2.6.18-92.el5.img

2008年7月21日月曜日

自宅サーバ構築 No.008(ClamAVインストール)

Linux でも、アンチウイルスソフトは必要ということで、ClamAV(Clam AntiVirus) をインストールします。

既に、yum のリポジトリを追加してあるので、追加したリポジトリからインストールします。今回は DAG(RPMForge) を使用します。DAG 以外のリポジでは、clamav という名前で提供されているのですが、DAG では、clamd という名前で、複数パッケージがセットになっています。

いろんなサイトでも、clamd でのインストール例が掲載されていますので、そちらに合せてインストールします。

  1. インストール
    # yum --enablerepo=rpmforge install clamd
    * clamd/clamav/clamav-db がインストールされます。
  2. ClamAV起動
    # service clamd start
    Starting Clam AntiVirus Daemon: [ OK ]
    ちなみに、chkconfig はインストール直後で、以下の設定(on)になっています。
    # chkconfig --list clamd
    clamd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
  3. ウイルスパターンアップデート
    # freshclam
  4. その他

2008年7月19日土曜日

自宅サーバ構築 No.006(必要なツールの導入)

準備作業が多いですが、必要なツールのインストールはやってしまいます。

  1. screen
    • インストール可能か確認
      # yum info | grep -i ^name | grep -i screen
      Name : gnome-screensaver
      Name : screen
      Name : xfce4-screenshooter-plugin
      Name : xscreensaver
      Name : xscreensaver-base
      Name : xscreensaver-extras
      Name : xscreensaver-extras-gss
      Name : xscreensaver-gl-base
      Name : xscreensaver-gl-extras
      Name : xscreensaver-gl-extras-gss
    • インストール
      # yum install screen
  2. compress
    # yum install ncompress
  3. ntp
    # yum install ntp

    # vi /etc/ntp.conf
    :
    #server 0.centos.pool.ntp.org
    #server 1.centos.pool.ntp.org
    #server 2.centos.pool.ntp.org
    ntp.jst.mfeed.ad.jp
    :

    # ntpdate ntp.jst.mfeed.ad.jp

    # chkconfig --list ntpd
    ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    # chkconfig ntpd on
    # chkconfig --list ntpd
    ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

    # /sbin/service ntpd start
    ntpd を起動中: [ OK ]
  4. その他

自宅サーバ構築 No.004(yum設定)

とりあえず一休みというわけではないのですが、最少構成のため、これから必要なパッケージは全てインストールしていくことになります。ということで、yum の設定を済ませておきます。

  1. yum の キャッシュディレクトリを掃除
    # yum clean all
    Cleaning up Everything
  2. yum-fastestmirror をインストール
    fastestmirror で最もアクセスしやすいミラーサイトを自動選択してくれるようになります。
    # yum install yum-fastestmirror
  3. アップデート可能なパッケージをすべて更新
    最少構成でも結構時間が掛かります。
    # yum update
まずは、このくらいでいいでしょう。標準のリポジトリにないパッケージをインストールしたりする場合、リポジトリを変更したりする必要がありますが、それは後程ということで。