Ubuntu安裝cacti步驟

科技探索者發表於2017-11-20
Ubuntu安裝cacti步驟

# apt-get install apache2

# apt-get install libapache2-mod-php5

# apt-get install php5

# apt-get install msyql-server

# apt-get install php5-mysql

# apt-get install php5-snmp

# apt-get install snmp snmpd

# apt-get install rrdtool

# cd /var/www/

# tar zxf /root/cacti-0.8.7b.tar.gz

# mv cacti-0.8.7b cacti

# useradd cactiuser

# chown -R cactiuser:cactiuser  cacti/rra   cacti/log

# mysql -u root -p

密碼

> create database cacti default character set utf8;

> grant all on cacti.* to cactiuser@localhost identified by `123456`;

> quit

# mysql -u cactiuser -p cacti < cacti/cacti.sql

# cd cacti/include

# vi config.php

<? php
$ database_type = “mysql”;
$ database_default = “cacti”;
$ database_hostname = “localhost”;
$ database_username = “cactiuser”;
$ database_password = “123456”;
$ database_port = “3306”;
?>


# /usr/bin/php  /var/www/cacti/poller.php

# crontab -e

*/5 * * * *  /usr/bin/php   /var/www/cacti/poller.php & > /dev/null

瀏覽器:http://localhost/cacti


cacti安裝嚮導介面 – 下一步 – 全新安裝(php路徑為/usr/local/php/bin/php) – 完成


使用者名稱密碼預設均為admin,第一次會讓修改密碼

本文轉自linux部落格51CTO部落格,原文連結http://blog.51cto.com/yangzhiming/1352177如需轉載請自行聯絡原作者


yangzhimingg


相關文章