首页 > 其他 > 详细

centos7安装配置cacti

时间:2016-01-18 12:24:37      阅读:286      评论:0      收藏:0      [点我收藏+]

第一步:(cacti的安装)

yum install net-snmp net-snmp-utils

yum install cacti

vi /etc/snmp/snmpd.conf

com2sec notConfigUser  default       public 

access  notConfigGroup ""      any       noauth    exact  systemview none none 

view all    included  .1           80

view    systemview    included   .1.3.6.1.2.1.1

view    systemview    included   .1.3.6.1.2.1.25.1.1

view    systemview    included   .1.3.6.1.2.1.2

systemctl start snmpd.service

netstat -tunlp

snmpwalk -v 2c -c public 127.0.0.1 if

whereis cacti

cacti: /etc/cacti /usr/share/cacti

find / -name cacti.sql

/usr/share/doc/cacti-0.8.8b/cacti.sql

create database cacti;

grant all privileges on cacti.* to cacti@‘localhost‘ identified by ‘cacti‘;

flush privileges;

use cacti;

source /usr/share/doc/cacti-0.8.8b/cacti.sql;

vi /usr/share/cacti/include/config.php

$database_type = "mysql";

$database_default = "cacti";

$database_hostname = "127.0.0.1";

$database_username = "cacti";

$database_password = "cacti";

$database_port = "3306";

第二步:(apache的配置)

因为是yum安装的,所以在/etc/httpd/conf.d/下自动生成了cacti.conf配置文件,默认如下:

Alias /cacti    /usr/share/cacti

<Directory /usr/share/cacti/>

        <IfModule mod_authz_core.c>

                # httpd 2.4

                Require host localhost

        </IfModule>

        <IfModule !mod_authz_core.c>

                # httpd 2.2

                Order deny,allow

                Deny from all

                Allow from localhost

        </IfModule>

</Directory>

<Directory /usr/share/cacti/install>

</Directory>

<Directory /usr/share/cacti/log>

        <IfModule mod_authz_core.c>

                Require all denied

        </IfModule>

        <IfModule !mod_authz_core.c>

                Order deny,allow

                Deny from all

        </IfModule>

</Directory>

<Directory /usr/share/cacti/rra>

        <IfModule mod_authz_core.c>

                Require all denied

        </IfModule>

        <IfModule !mod_authz_core.c>

                Order deny,allow

                Deny from all

        </IfModule>

</Directory>

第三步:(报错)

报错1:

[Mon Jan 18 11:56:36.849529 2016] [authz_host:error] [pid 13997] [client 110.110.110.110:61446] AH01753: access check of ‘localhost‘ to /cacti failed, reason: unable to get the remote host name

[Mon Jan 18 11:56:36.849636 2016] [authz_core:error] [pid 13997] [client 110.110.110.110:61446] AH01630: client denied by server configuration: /usr/share/cacti

解决:

centos7安装配置cacti

原文:http://guowang327.blog.51cto.com/6513732/1736067

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!