标签:cacti--简单篇
cacti拓扑
安装需求
lamp环境
net-snmp
rrdtool
cacti-0.8.8b.tar.gz
cacti环境搭建之lamp
[root@cjl ~]# yum -y install httpd mysql mysql-server mysql-php mysql-devel php php-mysql [root@cjl ~]# cat /var/www/html/index.php <?php phpinfo(); ?> [root@cjl ~]# /etc/init.d/httpd start 正在启动 httpd: [确定] [root@cjl ~]# /etc/init.d/mysqld start 正在启动 mysqld: [确定] [root@cjl ~]#
访问测试php是否完成
安装信息采集
[root@cjl ~]# yum -y install net-snmp net-snmp-utils net-snmp-devel [root@cjl ~]# /etc/init.d/snmpd start 正在启动 snmpd: [确定] [root@cjl ~]# chkconfig snmpd on
安装绘图工具
[root@cjl ~]# yum -y install rrdtool
安装cacti,设置连接数据库
[root@cjl ~]# tar zxf cacti-0.8.8b.tar.gz [root@cjl ~]# mv cacti-0.8.8b/ /var/www/html/cacti/ [root@cjl ~]# mysqlWelcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 19Server version: 5.1.73 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> create database cactidb; mysql> grant all on cactidb.* to ‘cactiuser‘@‘127.0.0.1‘ identified by ‘123123‘; mysql> quit [root@cjl ~]# cd /var/www/html/cacti/ [root@cjl cacti]# mysql cactidb< cacti.sql [root@cjl cacti]# vim include/config.php <?php /* +-------------------------------------------------------------------------+ | Copyright (C) 2004-2013 The Cacti Group | | | | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU General Public License | | as published by the Free Software Foundation; either version 2 | | of the License, or (at your option) any later version. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | +-------------------------------------------------------------------------+ | Cacti: The Complete RRDTool-based Graphing Solution | +-------------------------------------------------------------------------+ | This code is designed, written, and maintained by the Cacti Group. See | | about.php and/or the AUTHORS file for specific developer information. | +-------------------------------------------------------------------------+ | http://www.cacti.net/ | +-------------------------------------------------------------------------+ */ /* make sure these values refect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cactidb"; $database_hostname = "127.0.0.1"; $database_username = "cactiuser"; $database_password = "123123"; $database_port = "3306"; $database_ssl = false; /* Edit this to point to the default URL of your Cacti install ex: if your cacti install as at http://serverip/cacti/ this would be set to /cacti/ */ $url_path = "/"; /* Default session name - Session name must contain alpha characters */ //$cacti_session_name = "Cacti"; ?>
cacti的初始化安装
[root@cjl ~]# vim /etc/httpd/conf/httpd.conf ocumentRoot "/var/www/html/cacti" <Directory "/var/www/html/cacti"> Options None AllowOverride None Order allow,deny Allow from all </Directory> [root@cjl ~]# /etc/init.d/httpd restart 停止 httpd: [确定] 正在启动 httpd: [确定] [root@cjl ~]#
访问安装
cacti默认登陆
admin 用户
admin 密码
需要修改
登陆界面
通过命令采集本机信息
[root@cjl cacti]# php /var/www/html/cacti/poller.php --force
里面的操作随便点也能懂。
本文出自 “某某” 博客,请务必保留此出处http://moumou.blog.51cto.com/9995443/1693758
标签:cacti--简单篇
原文地址:http://moumou.blog.51cto.com/9995443/1693758