net-snmpインストール手順(Linux)

配布元

インストール手順

以下の手順にてnet-snmpdのインストールを行う。

tar xfvz net-snmp-5.0.8.tar.gz
cd net-snmp-5.0.8
./configure

configureを実行すると以下の項目が質問される。

  • 設定セクションの開始
    ---------------------------------------
    ************** Configuration Section **************
    -Press return to continue-
    
  • 初期状態で使用するSNMPのバージョンを指定[選択肢:1・2c・3]
    ---------------------------------------
    *** Default SNMP Version:
    Default version of SNMP to use (3):
  • システム管理者の連絡先を設定
    ---------------------------------------
    *** System Contact Information:
    System Contact Information (root@):
  • システムの設置場所情報を入力
    ---------------------------------------
    *** System Location:
    System Location (Unknown):
  • ログファイルの出力先とログファイル名を指定
    ---------------------------------------
    *** Logfile location:
    Location to write logfile (/var/log/snmpd.log):
  • snmpdが保持する管理情報の保管場所を設定
    ---------------------------------------
    *** snmpd persistent storage location:
    Location to write persistent information (/var/net-snmp):
  • configureの完了後、コンパイルを行う。
    make
    make install
  • 自動起動の設定を行う
    cp ./dist/snmpd-init.d /etc/rc.d/init.d/snmpd
    cd /etc/rc.d/rc3.d/
    ln -s ../init.d/snmpd S91snmpd
    cd ../rc5.d/
    ln -s ../init.d/snmpd S91snmpd

設定ファイル作成

標準添付のEXAMPLE.confを所定位置に移動させる。

cp /usr/local/src/net-snmp-5.0.8/EXAMPLE.conf /usr/local/share/snmp/snmpd.conf

設定内容は「net-snmpd基礎設定手順」参照。

エラー対策

libnetsnmpmibs.la

SNMP v3を使用する設定の場合に発生するエラー

make[1]: *** [libnetsnmpmibs.la] Error 1

libbeecrypt.la

beecrypt-develを導入していない場合に発生するえらー

/bin/sed: can't read /usr/lib/libbeecrypt.la: No such file or directory
libtool: link: `/usr/lib/libbeecrypt.la' is not a valid libtool archive
make[1]: *** [libnetsnmpmibs.la] Error 1

libbeecrypt.laを含むbeecrypt-develを導入する

yum install beecrypt-devel

cannot find -lelf

elfutils-develを導入して居ない場合に発生するエラー

/usr/bin/ld: cannot find -lelf

elfutils-develを導入する

yum install elfutils-devel

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS