nullnullHow to Install Cacti on Ubuntu
在写这篇文章之前,xxx已经写过了几篇关于改nullnull主题的文章,想要了解的朋友可以去翻一下之前的文章Installation prerequisite
The following packages are required to run Cacti properly
Apache2
# apt-get install apache2
# apt-get install php5 php5-cli php5-mysql php5-snmp
MYSQL
# apt-get install mysql-server mysql-client
SNMP
# apt-get install snmp snmpd
RRDTool
# apt-get install rrdtool
Cacti User
# useradd -d /home/cactiuser -m cactiuser
Installation
Download and decompress Cacti Package
# cd /usr/share
# wget http://www.cacti.net/downloads/cacti-0.8.7i.tar.gz
# gzip -d cacti-0.8.7i.tar.gz
# tar -xvf cacti-0.8.7i.tar
# mv cacti-0.8.7i cacti
Create cacti DB
#mysql -p
mysql> create database cacti
Import the default DB
mysql --user=root --password cacti < /usr/share/cacti/cacti.sql
Create Cacti user and set the right privileges to the database
# mysql --user=root --password
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipwd';
mysql> flush privileges;
mysql> exit
每日一道理
试试看——不是像企鹅那样静静的站在海边,翘首企盼机会的来临,而是如苍鹰一般不停的翻飞盘旋,执著的寻求。试试看——不是面对峰回路转、杂草丛生的前途枉自嗟叹,而是披荆斩棘,举步探索。试试看——不是拘泥于命运的禁锢,听凭命运的摆布,而是奋力敲击其神秘的门扉,使之洞开一个新的天地。微笑着,去唱生活的歌谣。
Configure Cacti with DB user and pwd
# vim /usr/share/cacti/include/config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipwd";
$database_port = "3306";
$database_ssl = false;
Create Cacti Apache configuration file
# vim /etc/apache2/conf.d/cacti.conf
Alias /cacti /usr/share/cacti
<Directory /usr/share/cacti >
Options None
Allow from 127.0.0.1
Allow from All
</Directory>
Restart the apache webserver
#/etc/init.d/apache2 restart
Finally We can log into cacti website:
http://IP/cacti
(use "admin" as the default username and password)
Add a line to your /etc/crontab file similar to
# vim /etc/cron.d/cacti
*/5 * * * * cactiuser php /usr/share/cacti/poller.php > /dev/null 2>&1
Configure SNMP
For easy to let cacti to access and monitor other hosts we use below simple way to configure snmp file.
# vim /etc/snmp/snmpd.conf
rocommunity public
syslocation "Your Location"
syscontact admin@domain.com
Try to add host into Cacti and see the result.Good luck!
文章结束给大家分享下程序员的一些笑话语录:
IBM和波音777
波音777是有史以来第一架完全在电脑虚拟现实中设计制造的飞机,所用的设备完全由IBM公司所提供。试飞前,波音公司的总裁非常热情的邀请IBM的技术主管去参加试飞,可那位主管却说道:“啊,非常荣幸,可惜那天是我妻子的生日,So..”..
波音公司的总载一听就生气了:“胆小鬼,我还没告诉你试飞的日期呢!”
页:
[1]