mahonglin123456 发表于 2015-11-22 14:12:20

CentOS 6.4 Cacti安装

  转载地址:http://jicki.blog.iyunv.com/1323993/1159427
  

  
一.安装rrdtool 1yum -y install rrdtool二.安装配置net-snmp 1.安装net-snmp 1yum -y install net-snmp net-snmp-libs net-snmp-utils2.配置net-snmp 1vim /etc/snmp/snmpd.confview    systemview    included   .1.3.6.1.2.1.1 改为 view    systemview    included   .1.3.6.1.2.1 3.测试net-snmp 1service snmpd start2snmpwalk -v 1-c public localhost .1.3.6.1.2.1.1.1.0SNMPv2-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 1yum -y install httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server2service httpd start3service mysqld start4mysqladmin -uroot password 1235mysqladmin --user=root --password reloadEnter password: 1.下载cacti 1wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz2tar zxfv cacti-0.8.8b.tar.gz3mv cacti-0.8.8b /var/www/html/cacti4cd /var/www/html/cacti/2.创建数据库 1mysqladmin --user=root -p create cacti3.导入数据库 1mysql -uroot -p cacti < cacti.sql4.创建数据库用户 1mysql -u root -p mysql2mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY'123';3mysql> flush privileges;5.配置include/config.php 1vim include/config.php$database_type = &quot;mysql&quot;; $database_default = &quot;cacti&quot;; $database_hostname = &quot;localhost&quot;; $database_username = &quot;cactiuser&quot;; $database_password = &quot;123&quot;; $database_port = &quot;3306&quot;; $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 http://serverip/cacti/ this    would be set to /cacti/ */ //$url_path = &quot;/cacti/&quot;;   /* Default session name - Session name must contain alpha characters */ //$cacti_session_name = &quot;Cacti&quot;;   ?>   6.设置目录权限 1useradd cactiuser2chown -R cactiuser rra/ log/7.配置计划任务 1echo &quot;*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1&quot;>>/etc/crontab2service crond restartStopping crond:                                           Starting crond:                                           8.设置开机启动服务 1chkconfig --level 35 snmpd on2chkconfig --level 35 httpd on3chkconfig --level 35 mysqld on4chkconfig --level 35 crond on9.SELINUX和IPTABLES设置 1iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT2restorecon -Rv ../cacti/9.完成cacti安装 1)在浏览器中输入:http://www.yourdomain.com/cacti默认用户名:admin 密码:admin 2)更改密码 3)安装指南 4)提示这个直接next 5)new install 然后next 6)直接点完成 7)登陆界面,登陆之后会提示你重置下密码 8)安装完成   
  
页: [1]
查看完整版本: CentOS 6.4 Cacti安装