このウィキの読者になる
更新情報がメールで届きます。
このウィキの読者になる
カテゴリー
最近更新したページ
最新コメント
Synergy by stunning seo guys
RedHat9でyum by stunning seo guys
MRTG by stunning seo guys
rpmbuild by stunning seo guys
WevDAV by awesome things!
ubuntuメモ by check it out
mingplotの導入 by check it out
ServerIron設定メモ by awesome things!
mount by stunning seo guys
FrontPage by check it out
Menu
ここは自由に編集できるエリアです。

MRTG

MRTG

apt-get install mrtg

Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  mrtg
0 packages upgraded, 1 newly installed, 0 removed and 106 not upgraded.
Need to get 864kB of archives.
After unpacking 2554kB of additional disk space will be used.
Get:1 http://download.fedoralegacy.org redhat/9/i386/os mrtg 2.9.17-13 [864kB]
Fetched 864kB in 4s (183kB/s)
Executing RPM (-Uvh)...
警告: /var/cache/apt/archives/mrtg_2.9.17-13_i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
  1:mrtg ########################################### [100%]

net-snmp

apt-get install net-snmp

vi /etc/snmp/snmp.conf

※最初apt-getにてMRTGとnet-snmpをインストールしたのだが、どうもしっくり来ないので、
 MRTGはrpm / net-snmpはソースでインストールし直した。

error

indexmaker使用時にエラーを吐く ファイル自身は作られる
MRTGのバージョンが古い?

Possible precedence problem on bitwise | operator at /usr/bin/../lib/mrtg2/BER.pm line 601.
Can't locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
    main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
    eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49



最新のMRTGをインストールしたほうがよさげ
ftp://ftp.aritia.org/pub/hizumi/RedHat9.0/RPMS/i38...

インストール
rpm -ivh mrtg-2.10.11-1.i386.rpm

indexmaker 問題なし!

上記のエラーがでたら最新バージョンのMRTGにあげることをお勧め


snmpwalkがない!?

apt-get install net-snmpで入手したのはいいものの、snmpwalkなどのプログラムがない。
RH9でapt-getはもう駄目かもわからんね。

とりあえずnet-snmpをソースからインストールすることにする。
wget http://jaist.dl.sourceforge.net/sourceforge/net-sn...

./configure
make

make中に以下のエラーがでた。
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status

"elfutils-devel"が必要なようなので、apt-get install


make中エラーその2
gcc: mibgroup/.libs/util_funcs.o: No such file or directory
gcc: mibgroup/.libs/header_complex.o: No such file or directory
make[1]: *** [libnetsnmpmibs.la] エラー 1
make[1]: 出ます ディレクトリ `/home/work/net-snmp-5.4/agent'
make: *** [subdirs] エラー 1

SNMPのversion3を使うと上記のファイルが必要らしいので、今回はversion2にすることにする。
./configureからやり直し

make中エラーその3
/usr/bin/ld: cannot find -lbz2
"bzip2-devel"というものが必要 apt-get install bzip2-devel

make test

make install
インストールOK!

コンフィグファイルのコピー
cp -p EXAMPLE.conf /usr/local/share/snmp/snmpd.conf


編集箇所
コミュニティ名はあまりよろしくはないだろうが、publicで。
(mail addressは伏字xxxx)

diff EXAMPLE.conf /usr/local/share/snmp/snmpd.conf
61,62c61,62
< com2sec local localhost COMMUNITY
< com2sec mynetwork NETWORK/24 COMMUNITY

> com2sec local localhost public
> com2sec mynetwork 192.168.1.0/24 public
87c87
> access MyRWGroup "" any noauth exact all all none

> #access MyRWGroup "" any noauth exact all all none
103,104c103,104
< syslocation Right here, right now.
< syscontact Me <me@somewhere.org>

> syslocation server
> syscontact xxxxx <xxxxx@xxxx.xx.xx>


/etc/rc.d/init.d/snmpd を作成

chkconfig --add snmpd
chkconfig --list snmpd
snmpd 0:オフ 1:オフ 2:オフ 3:オン 4:オン 5:オン 6:オフ



参考サイト

http://www.marronkun.net/linux/other/snmp_1.html
http://www.aconus.com/~oyaji/mrtg/snmp_linux.htm
2007年02月22日(木) 00:38:56 Modified by glass57




スマートフォン版で見る