Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

95.3. Source Install

Cacti requires MySQL, PHP, RRDTool, net-snmp, and a webserver that supports PHP such as Apache.

sudo apt-get install rrdtool
sudo apt-get install snmp snmpd
sudo apt-get install php5-snmp
		

At first, install snmp for linux

  1. wget http://www.cacti.net/downloads/cacti-0.8.7b.tar.gz

  2. tar zxvf cacti-0.8.7b.tar.gz

  3. mv cacti-0.8.7b /home/netkiller/public_html/cacti

  4. mysqladmin --user=root create cacti

  5. mysql -uroot -p cacti < cacti.sql

  6. echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';" | mysql -uroot -p

  7. echo "flush privileges;" | mysql -uroot -p

  8. vi include/config.php

    例 95.1. cacti config.php

    					
    $database_type = "mysql";
    $database_default = "cacti";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "somepassword";
    $database_port = "3306";
    					
    					

  9. crontab -e

    */5 * * * * php /var/www/neo.6600.org/html/cacti/poller.php > /dev/null 2>&1

    or

    /etc/crontab

    */5 * * * * nobody php /home/netkiller/public_html/cacti/poller.php > /dev/null 2>&1

  10. mkdir -p /var/log/cacti/

configure cacti

http://your-server/cacti/