×

扫描二维码登录本站

QQ登录

只需一步,快速开始

标签: 暂无标签
来自:网络
五、编辑开机启动项               Cacti实施


    vi /etc/rc.conf  

在内容尾添加以下几行


    snmpd_flags="-a" snmpd_pidfile="/var/run/snmpd.pid" snmptrapd_enable="YES" snmptrapd_flags="-a -p /var/run/snmptrapd.pid"

上面snmpd和snmptrapd两点好像一种是标准写法,一种是缩写方法的。           Cacti培训
六、安装cacti
配置cacti
 


     vi ./include/config.php   $database_hostname = "localhost";   $database_username = "cacti"; */mysql中cacti的用户名/*   $database_password = "cacti"; */mysql中cacti用户的密码/*   $database_port = "3389"; */mysql监控端口/*   vi ./include/global.php   $database_hostname = "localhost";   $database_username = "cacti"; */mysql中cacti的用户名/*   $database_password = "cacti"; */mysql中cacti用户的密码/*   $database_port = "3389";  

在mysql中配置cacti数据库及cacti用户信息                 Cacti配置


    #mysql -u root -p   mysql>create database cacti default character set utf8;   mysql> use cacti;   mysql> source /data/cacti.mytest.com/cacti-0.8.7c/cacti.sql;   mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'cacti';  
  • mysql> flush privileges  
;
现在我们在nginx里创建一个虚拟主机来访问cacti,我们在nginx.conf 配置文件里添加以下配置块:             监控软件


    server {   listen 80;   server_name cacti.mytest.com;   root /data/cacti.mytest.com/cacti-0.8.7c;   location / {   index index.html index.htm index.php;   }   error_page 500 502 503 504 /50x.html;   location = /50x.html {   root /usr/local/www/nginx-dist;   }   # proxy the PHP scripts to Apache listening on 127.0.0.1:80   #   #location ~ \.php$ {   # proxy_pass http://127.0.0.1;   #}   # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000   #   location ~ \.php$ {   fastcgi_pass 127.0.0.1:9000;   fastcgi_index index.php;   fastcgi_param SCRIPT_FILENAME /data/cacti.mytest.com/cacti-0.8.7c$fastcgi_script_name;   include fastcgi_params;   }   # deny access to .htaccess files, if Apache's document root   # concurs with nginx's one   #   #location ~ /\.ht {   # deny all;   #}   }  

重启nginx             开源监控软件


    #/usr/local/etc/rc.d/nginx reload  

现在cacti已经完成.在浏览器里输入cacti访问地址就可以看到cacti的安装界面了,这里我们用的域名为 http://cacti.mytest.com.             Cacti安装
想做Nagios Zabbix,Cacti,iTop各种交流的,可以进入开源监控工具Nagios交流  QQ群号 476809427




上一篇:教你如何在FreeBSD下安装Cacti教程(2)
下一篇:教你如何在FreeBSD下安装Cacti教程(4)
monicazhang

写了 2297 篇文章,拥有财富 12859,被 21 人关注

您需要登录后才可以回帖 登录 | 立即注册
B Color Link Quote Code Smilies

成为第一个吐槽的人

手机版|小黑屋|最新100贴|论坛版块|ITIL先锋论坛 |粤ICP备11099876号|网站地图
Powered by Discuz! X3.4 Licensed  © 2001-2017 Comsenz Inc.
返回顶部