'--with-readline' '--with-libedit' '--with-mime-magic'
Extract the distribution tarball.
shell> tar xzvf cacti-version.tar.gz
Create the MySQL database:
shell> mysqladmin --user=root create cacti
Import the default cacti database:
shell> mysql cacti < cacti.sql
Optional: Create a MySQL username and password for Cacti.
shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
Add a line to your /etc/crontab file similar to:
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
Replace cactiuser with the valid user specified in the previous step.
Replace /var/www/html/cacti/ with your full Cacti path.
Point your web browser to:
http://your-server/cacti/
Log in the with a username/password of admin. You will be required to change this password immediately. Make sure to fill in all of the path variables carefully and correctly on the following screen.
下載rrdtool,及cactid,放到cacti目錄下
打開(kāi)默認(rèn)的/etc/snmp/snmp.conf文件,更改如下配置:
1、查找以下字段:
[Copy to clipboard] [ - ]CODE:
# sec.name source community
com2sec notConfigUser default public
將"comunity"字段改為你要設(shè)置的密碼.比如"public".
將“default”改為你想哪臺(tái)機(jī)器可以看到你的snmp信息,如10.10.10.10。
3、查找以下字段:
[Copy to clipboard] [ - ]CODE:
####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact mib2 none none
將"read"字段改為mib2.
[Copy to clipboard] [ - ]CODE:
#access notConfigGroup "" any noauth exact systemview none none
3、查找以下字段:
[Copy to clipboard] [ - ]CODE:
## -or just the mib2 tree-
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
將該行前面的"#"去掉.
保存關(guān)閉.
4、運(yùn)行/etc/init.d/snmpd start命令運(yùn)行snmpd.
最后運(yùn)行netstat -ln查看161端口是否打開(kāi)了.
二、FreeBSD
如果使用port安裝net-snmp,默認(rèn)的配置文件應(yīng)該是在/usr/local/share/snmp/snmpd.conf(沒(méi)有默認(rèn)的文件)。
可以建立一個(gè)簡(jiǎn)單的配置文件,如:
[Copy to clipboard] [ - ]CODE:
syslocation YourDefineName
syscontact YourEmailAddress
sysservices 77
rocommunity public (請(qǐng)更改)
load 12 12 12
然后運(yùn)行snmpd,netstat 看是否打開(kāi)了161端口。
上述用法只針對(duì)默認(rèn)的安裝,如果你是自定義的安裝請(qǐng)依照你的安裝目錄來(lái)設(shè)置。作者: zw047 時(shí)間: 2008-04-14 16:32
不全作者: zenglingping 時(shí)間: 2008-04-14 18:24
我最近也在搞這個(gè)東東,還有zabbix作者: hulin1219 時(shí)間: 2008-05-04 11:08
汗!!!!看不懂!作者: tspy007 時(shí)間: 2008-05-14 16:36
大家能不能補(bǔ)全點(diǎn)呀,這樣看得有點(diǎn)麻煩呀