2017年12月20日水曜日

Cacti 1.1.28 を使ってみる。(Spineのインストール)

Spineのソースを取得し、コンパイルからインストールまでを行ってみました。

# cd /usr/local/src
# wget https://www.cacti.net/downloads/spine/cacti-spine-1.1.28.tar.gz
# tar xvfz cacti-spine-1.1.28.tar.gz
# cd cacti-spine-1.1.28/

README.md を読むと
6. Once on the package selection section make sure to select the following (TIP: use the search!):
       * autoconf
       * automake
       * dos2unix
       * gcc-core
       * gzip
       * help2man
       * libmysqlclient
       * libmysqlclient-devel
       * libtool
       * m4
       * make
       * net-snmp-devel
       * openssl-devel
       * wget

とのことでしたので、下記パッケージを追加しました。まとめでドンでも ok ですが、取りあえずひとつづつ追加することにしました。
# yum install gcc-c++
# yum install autoconf
# yum install automake
# yum install dos2unix
# yum install help2man
# yum install net-snmp-devel
# yum install MariaDB-devel

一気に入れるなら
# yum install -y gcc-c++ autoconf automake dos2unix help2man net-snmp-devel MariaDB-devel

続いてコンパイルとインストールです。
# ./configure
# make
# make install
# chown root:root /usr/local/spine/bin/spine
# chmod +s /usr/local/spine/bin/spine

仕上げに spine.conf の編集を行います。最初、spine.conf が無かったので、cmd.php から Spine に切り替えたときに snmpでのデータが取れなかったのは内緒です。
# cd /usr/local/spine/etc
# cp spine.conf.dist spine.conf
# vi spine.conf
※DB_Pass を cactiuser から自分で設定したものに変更
   remote database は使わないけど、RDB_Pass も変更しておきました。

残るは Cacti のセットアップです。

0 件のコメント:

コメントを投稿