cactiをインストール
yum -y install cacti
yum -y install net-snmp
Net-SNMPの設定
ここのサイトを参考
cactiの設定
1)Cacti用MySQLデータベース作成
[root@centos ~]# mysql -u root -p ← MySQLへrootでログイン
Enter password: ← MySQLのrootパスワード応答
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 297
Server version: 5.0.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database cacti; ← Cacti用データベース作成
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on cacti.* to cactiuser@localhost identified by '任意のパスワード'; ← Cacti用データベースアクセスユーザ登録
Query OK, 0 rows affected (0.06 sec)
mysql> exit ← MySQLからログアウト
Bye
[root@centos ~]# mysql -u cactiuser -p cacti < /usr/share/doc/cacti-0.8.8h/cacti.sql ← Cacti用データベース初期化
Enter password: ← Cacti用データベースアクセスユーザのパスワード応答
2)Cacti設定
[root@centos ~]# vi /etc/cacti/db.php ← Cactiデータベース設定ファイル編集
$database_password = "cactiuser";
↓
$database_password = "パスワード"; ← Cacti用データベースアクセスユーザのパスワードを指定
(3)Apache設定
[root@centos ~]# vi /etc/httpd/conf.d/cacti.conf ← Cacti用Apache設定ファイル編集
lias /cacti /usr/share/cacti
<Directory /usr/share/cacti/>
<IfModule mod_authz_core.c>
# httpd 2.4
Require host localhost
Require ip 192.168.1.0/24
</IfModule>
<IfModule !mod_authz_core.c>
# httpd 2.2
Order deny,allow
Deny from all
Allow from localhost
Allow from 192.168.10.0/24
</IfModule>
</Directory>
[root@centos ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
httpd を再読み込み中: [ OK ]
mkdir /var/log/cacti
touch /var/log/cacti/cacti.log