Chinaunix首页 | 论坛 | 博客

OPS

  • 博客访问: 490225
  • 博文数量: 117
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1210
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-05 14:50
个人简介

hellow 运维

文章分类

全部博文(117)

文章存档

2019年(1)

2018年(1)

2017年(45)

2016年(38)

2015年(32)

我的朋友

分类: 系统运维

2015-05-29 15:37:40

一.安装rrdtool
?
1
yum -y install rrdtool
二.安装配置net-snmp
1.安装net-snmp
?
1
yum -y install net-snmp net-snmp-libs net-snmp-utils
2.配置net-snmp
?
1
vim /etc/snmp/snmpd.conf
view    systemview    included   .1.3.6.1.2.1.1
改为
view    systemview    included   .1.3.6.1.2.1
3.测试net-snmp
?
1
2
service snmpd start
snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux test 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64
 
三.安装LAMP
?
1
2
3
4
5
yum -y install httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server
service httpd start
service mysqld start
mysqladmin -uroot password 123
mysqladmin --user=root --password reload
Enter password:
1.下载cacti
?
1
2
3
4
wget
tar zxfv cacti-0.8.8b.tar.gz
mv cacti-0.8.8b /var/www/html/cacti
cd /var/www/html/cacti/
2.创建数据库
?
1
mysqladmin --user=root -p create cacti
3.导入数据库
?
1
mysql -uroot -p cacti < cacti.sql
4.创建数据库用户
?
1
2
3
mysql -u root -p mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY '123';
mysql> flush privileges;
5.配置include/config.php
?
1
vim include/config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "123";
$database_port = "3306";
$database_ssl = false;
 
/* load up old style plugins here */   #enable plugins
$plugins = array();
//$plugins[] = 'thold';
 
 
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at this
   would be set to /cacti/
*/
//$url_path = "/cacti/";
 
/* Default session name - Session name must contain alpha characters */
//$cacti_session_name = "Cacti";
 
?>
 
6.设置目录权限
?
1
2
useradd cactiuser
chown -R cactiuser rra/ log/
7.配置计划任务
?
1
2
echo "*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1">>/etc/crontab
service crond restart
Stopping crond:                                            [  OK  ]
Starting crond:                                            [  OK  ]
8.设置开机启动服务
?
1
2
3
4
chkconfig --level 35 snmpd on
chkconfig --level 35 httpd on
chkconfig --level 35 mysqld on
chkconfig --level 35 crond on
9.SELINUX和IPTABLES设置
?
1
2
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
restorecon -Rv ../cacti/
9.完成cacti安装
1)在浏览器中输入:
默认用户名:admin 密码:admin
2)更改密码
3)安装指南
4)提示这个直接next
5)new install 然后next
6)直接点完成
7)登陆界面,登陆之后会提示你重置下密码
8)安装完成
阅读(1312) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~