2007年7月16日月曜日

smartmontoolsのインストール方法

smartmontoolsのサイトにはインストール方法が解説されていますが、Mac OS Xにインストールするには情報が不足しています。ここでは、不足している部分も含むsmartmontoolsのインストール方法を紹介します。
smartmontools Home Page

ここでは、ソースコードのダウンロードとインストール方法がいくつか紹介されていますが、Darwinは三つ目にあります。
Third Method (Darwin/FreeBSD/Linux/NetBSD/ OpenBSD/Solaris/Cygwin) - Install from the CVS repository

まず以下のようにcvsにloginします。
$ cvs -d:pserver:anonymous@smartmontools.cvs.sourceforge.
net:/cvsroot/smartmontools login


cvs repositoryから以下のような応答があり、CVS password:で何も入力せずにリターンキーをタイプします。
Logging in to :pserver:anonymous@smartmontools.cvs.
sourceforge.net:2401/cvsroot/smartmontools
CVS password:


次に、以下のようにタイプします。
$ cvs -d:pserver:anonymous@smartmontools.cvs.sourceforge.
net:/cvsroot/smartmontools co sm5


上記のcvs命令に対して以下のように応答し、カレントディレクトリにsm5というフォルダができ、ソースコードがダウンロードされます。
$ cvs checkout: Updating sm5

ここまではsmartmontools Home Pageに書かれているとおりですが、次に書かれている./autogen.shを入力すると以下のようなエラーが表示されます。
You must have at least GNU Automake 1.7 (up to 1.9.x)
installed in order to bootstrap smartmontools from CVS.
Download the appropriate package for your distribution,
or the source tarball from ftp.gnu.org—automake <ftp:
//ftp.gnu.org/gnu/automake/> .

Also note that support for new Automake series (anything
newer than 1.9.x) is only added after extensive tests. If
you live in the bleeding edge, you should know what you're
doing, mainly how to test it before the developers.
Be patient.


上記にあるAutomakeを入手するために、Mac OS XのFinderで「移動 > サーバへ接続...」を選択し、「ftp://ftp.gnu.org/gnu/automake/ 」と入力してFTPサーバに接続し、automake-1.9.6.tar.gzを入手します。automake-1.9.6.tar.gzをダブルクリックして伸張し、ターミナル.appでautomake-1.9.6/ に移動してビルドします。
$ cd automake-1.9.6/
$ ./confiqure
:
$ make
:
$ sudo make install
Password:
:


以上でAutomakeの準備ができましたので、本来のsmartmontooolsのautogen.shに戻ります。
$ ./autogen.sh
:
$ ./configure
:
$ make
:
$ sudo make install
Password:
:


以上で、smartmontooolsのsmartctlとsmartdが利用できます。それぞれの使い方はmanに譲りますが、以下のようにすると起動ディスクのs.m.a.r.t.データを見ることができます。
$ smartctl --all disk0

0 件のコメント: