Server-Side/Linux2010. 12. 19. 08:49
downloads update-0.4.tar.gz in /usr/local/src

# cd /usr/local/src
# tar xzfv update-0.4.tar.gz -C /usr/local/cacti/plugins/
# cd /usr/local/cacti/plugins/update
# mysql -u root -p cacti < update.sql
# vi /usr/local/cacti/include/config.php
---------------->append<-----------------
$plugins[] = "update";
-------------------------------------------

go to http://your.ip.address/cacti/
console -> User Management -> admin -> Realm Permissions -> check for updates -> save

Posted by 준피
Server-Side/Linux2010. 12. 18. 21:48
download settings & move to cacti directory
download settings plugin 
# cd /usr/local/src
# tar xzfv settings-v0.7-1.tgz
# mv /usr/local/src/settings /usr/local/cacti/plugins

configure settings
vi  /usr/local/cacti/include/config.php
-------------->append<--------------
$plugins[] = 'settings';
--------------------------------------

console 탭에서는 뜨지 않고 graphs 탭에서만 오른쪽에 settings 탭이 뜬다.
이상한건 내가 설치한 0.8.6i, 0.8.7g 버전은 처음부터 settings 탭이 있다. 
혹시 이게 기본설치에 포함되있는건가...?

Posted by 준피
Server-Side/Linux2010. 12. 18. 21:13
cacti의 plugin을 쓰기 위해서는 PIA를 설치해야 한다.

PIA 다운로드 & cacti 디렉토리로 이동
download cacti-plugin-0.8.7g-PA-v2.8.tar.gz in /usr/local/src

# cd /usr/local/src
# tar xzfv cacti-plugin-0.8.7g-PA-v2.8.tar.gz
# cd cacti-plugin-arch
# cp /usr/local/src/cacti-plugin-arch/* /usr/local/cacti/ -R

PIA 설치
# cd /usr/local/cacti/
# patch -p1 -N --dry-run < cacti-plugin-0.8.7g-PA-v2.8.diff
# patch -p1 -N < cacti-plugin-0.8.7g-PA-v2.8.diff
# mysql -u root -p cacti < pa.sql

cacti 변수 설정
# vi /usr/local/cacti/include/config.php
---------------->modify<------------------
$config['url_path'] = '/cacti/';
-------------------------------------------

Plugin Management 활성화
http://your.ip.address/cacti/ 로 접속을 한다. 
상단 탭중에 'console'을 누른다.
왼쪽 메뉴중에 'User Management'을 선택한다. 
'admin'계정을 선택한다.
하단에 보면 Realm Permissions 탭이 있고 'Plug Management'를 활성화 하고 저장한다.



참고사이트
Posted by 준피
Server-Side/Linux2010. 12. 18. 16:58

problem

log/cacti.log 에 다음과 같은 로그가 남았다면...


12/17/2010 07:00:10 PM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.



solution

include/config.php 파일을 보면 $database_hostname = "localhost"; 라고 되어있을텐데

$database_hostname = "127.0.0.1"; 로 변경하면 잘 작동한다.


Posted by 준피
Server-Side/Linux2010. 12. 18. 16:52

Required software(s)

 - MySQL server : Store cacti data.

 - NET-SNMP server : SNMP(Simple Network Management Protocol) is a protocol used for network management.

 - PHP with net-snmp module : Access SNMP data using PHP.

  - RRDTOOL(round robin database tool)

 - Apache / lighttpd / nginx webserver : Web server to display graphs created with PHP and RRDTOOL.


Install the software

# yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd


Configure MySQL server

# mysql -u root -p

Enter password: **********


mysql> create database cacti;

mysql> use mysql;

mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'password';

mysql> FLUSH privileges;

mysql> quit


Install snmpd

# yum install net-snmp-utils php-snmp net-snmp-libs

# vi /etc/snmp/snmpd.conf


------------> append <----------------

.

.


com2sec local   localhost       public

group   MyRWGroup       v1      local

group   MyRWGroup       v2c     local

group   MyRWGroup       usm     local

view    all     included        .1      80

access  MyRWGroup       ""      any     noauth  exact   all     all     none

syslocation     Unknown (edit /etc/snmp/snmpd.conf)

syscontact      Root    (configure /etc/snmp/snmp.local.conf)

pass .1.3.6.1.4.1.4413.4.1      /usr/bin/ucd5820stat

------------------------------------


# /etc/init.d/snmpd start

# chkconfig snmpd on

# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex


(output)

IP-MIB::ipAdEntIfIndex.your.ip.address = INTEGER: 2

IP_MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1


Install cacti

# cd /usr/local/src

# wget http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz


# tar xzfv cacti-0.8.7g.tar.gz

# cp -Rf cacti-0.8.7g /usr/local/cacti/

# ln -s /usr/local/cacti/ /usr/local/apache/htdocs/cacti


# vi /usr/local/cacti/include/config.php

--------------->modify<------------------

#database_type = "mysql";

#database_default = "cacti";

$database_hostname = "127.0.0.1";

$database_username = "cacti";

$database_password = "password";

$database_port = "3306";

------------------------------------------


# mysql -u root -p cacti < /usr/local/cacti/cacti.sql



Configure crond

# crontab -e

-------------->append<----------------

*/5 * * * * php /usr/local/cacti/poller.php > /dev/null 2>&1

----------------------------------------

# service crond restart


Install cacti web console

go to http://your.ip.address/cacti/

click 'Next'

choose 'New Install' and click 'Next'

if all of Path is [FOUND], click 'Finish'


if you show "[NOT FOUND] PHP Binary Path", install php-cli

# yum install php-cli


Username: admin

Password: admin



reference site

cacti plug-in

install cacti

install cacti

more specific information about cacti


Posted by 준피