Cactiインストール
SNMPインストール
# yum install net-snmp
# yum install net-snmp-utils
# vi /etc/snmp/snmpd.conf
/etc/snmp/snmpd.conf
...
# sec.name source community
#com2sec notConfigUser default public
com2sec local localhost public
#com2sec mynet 192.168.1.0/24 public
...
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group mygroup v1 local
#group mygroup v1 mynet
...
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
...
# group context sec.model sec.level prefix read write notif
#access notConfigGroup "" any noauth exact systemview none none
access mygroup "" any noauth exact all none none
...
disk / 10000
# chkconfig snmpd on
# /etc/rc.d/init.d/snmpd start
RRDToolインストール
# yum install rrdtool
mysqlインストール
# yum install mysql-server
# yum install php-mysql
# chkconfig mysqld on
# /etc/rc.d/init.d/mysqld start
cactiインストール
# yum install cacti
mysql DB作成
# mysqladmin --user=root create cacti
# mysql cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
# mysql --user=root mysql
> grant all on cacti.* to cacti@localhost identified by '$PASSWORD';
> flush privileges;
> exit;
# yum install net-snmp
# yum install net-snmp-utils
# vi /etc/snmp/snmpd.conf
...
# sec.name source community
#com2sec notConfigUser default public
com2sec local localhost public
#com2sec mynet 192.168.1.0/24 public
...
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group mygroup v1 local
#group mygroup v1 mynet
...
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
...
# group context sec.model sec.level prefix read write notif
#access notConfigGroup "" any noauth exact systemview none none
access mygroup "" any noauth exact all none none
...
disk / 10000
# chkconfig snmpd on
# /etc/rc.d/init.d/snmpd start
# yum install rrdtool
mysqlインストール
# yum install mysql-server
# yum install php-mysql
# chkconfig mysqld on
# /etc/rc.d/init.d/mysqld start
cactiインストール
# yum install cacti
mysql DB作成
# mysqladmin --user=root create cacti
# mysql cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
# mysql --user=root mysql
> grant all on cacti.* to cacti@localhost identified by '$PASSWORD';
> flush privileges;
> exit;
# yum install mysql-server
# yum install php-mysql
# chkconfig mysqld on
# /etc/rc.d/init.d/mysqld start
# yum install cacti
mysql DB作成
# mysqladmin --user=root create cacti
# mysql cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
# mysql --user=root mysql
> grant all on cacti.* to cacti@localhost identified by '$PASSWORD';
> flush privileges;
> exit;
# mysqladmin --user=root create cacti
# mysql cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
# mysql --user=root mysql
> grant all on cacti.* to cacti@localhost identified by '$PASSWORD';
> flush privileges;
> exit;
ログインできるか確認
# mysql -u cacti -p
cacti設定
# chown -R cacti:cacti /usr/share/cacti
# chmod 755 /etc/cacti/db.php
# vi /etc/cacti/db.php
/etc/cacti/db.php
...
$database_username = "cacti";
$database_password = "$PASSWORD";
...
# chown -R cacti:cacti /usr/share/cacti
# chmod 755 /etc/cacti/db.php
# vi /etc/cacti/db.php
...
$database_username = "cacti";
$database_password = "$PASSWORD";
...
cron起動(コメントアウトをはずす)
# vi /etc/cron.d/cacti
BASIC認証設定
...
<Directory /usr/share/cacti/>
AuthType Basic
AuthName "Secret Zone"
AuthUserFile /var/www/.htpasswd
Require user junsuke
# <IfModule mod_authz_core.c>
# # httpd 2.4
# Require host localhost
# </IfModule>
# <IfModule !mod_authz_core.c>
# # httpd 2.2
# Order deny,allow
# Deny from all
# Allow from localhost
# </IfModule>
</Directory>
...
この辺りの設定はいらないかも
PHPセッションディレクトリの書き込み権限がないとログイン出来ない。
# chown -R apache:apache /var/lib/php/session
データ作成のためパーミッション変更必要?
# chmod 777 /var/lib/cacti/rra
httpd再起動
# /etc/rc.d/init.d/httpd restart
# /etc/rc.d/init.d/httpd restart
http://HOST/cacti/
にアクセス。
初回アクセス時の設定はそのままハイハイ。
初回ログインは admin/admin で。
管理者パスワードの設定して、ログイン。
参考
http://c.itdo.jp/technical-information/cacti/181-cacti-install-ex.html
http://centossrv.com/rrdtool-cacti.shtml
http://d.hatena.ne.jp/eco31/20101212/1292120350
環境
CentOS6.4 (さくらのVPS)
Cacti0.8.8b
PHP5.3.3
MySql5.1.69
Author And Source
この問題について(Cactiインストール), 我々は、より多くの情報をここで見つけました https://qiita.com/junsuke/items/efc0b666a32c663cea17著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .