19.2. Yum 安装

yum install cacti
		

创建数据库

# mysql -u root -p
mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'cacti';
mysql> FLUSH privileges;
mysql> quit;

mysql -ucacti -pcacti cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql		

数据配置

# cat /etc/cacti/db.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 = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "cacti";
$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 = "/cacti/";

/* Default session name - Session name must contain alpha characters */
//$cacti_session_name = "Cacti";

?>

配置httpd

# cat /etc/httpd/conf.d/cacti.conf
#
# Cacti: An rrd based graphing tool
#

# For security reasons, the Cacti web interface is accessible only to
# localhost in the default configuration. If you want to allow other clients
# to access your Cacti installation, change the httpd ACLs below.
# For example:
# On httpd 2.4, change "Require host localhost" to "Require all granted".
# On httpd 2.2, change "Allow from localhost" to "Allow from all".

Alias /cacti    /usr/share/cacti

<Directory /usr/share/cacti/>
	<IfModule mod_authz_core.c>
		# httpd 2.4
		#Require host any
		Require all granted
	</IfModule>
</Directory>

<Directory /usr/share/cacti/install>
	# mod_security overrides.
	# Uncomment these if you use mod_security.
	# allow POST of application/x-www-form-urlencoded during install
	#SecRuleRemoveById 960010
	# permit the specification of the rrdtool paths during install
	#SecRuleRemoveById 900011
</Directory>

# These sections marked "Require all denied" (or "Deny from all")
# should not be modified.
# These are in place in order to harden Cacti.
<Directory /usr/share/cacti/log>
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
</Directory>
<Directory /usr/share/cacti/rra>
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
</Directory>		

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

时间: 2022-10-30

19.2. Yum 安装的相关文章

Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 无法更新. redhat 默认自带的 yum 源需要注册,才能更新.我们想不花钱也可以更新,需要替换掉redhat的yum源.   1.检查是否安装yum包 查看RHEL是否安装了yum

CentOS本地YUM安装单节点icehouse的异常

问题描述 本人使用CentOS,本地YUM安装单节点icehouse的异常,参考的文章是http://www.2cto.com/os/201410/343246.html下载和执行较顺利,但执行packstack--answer-fileopenstack-install.txt时有如下异常,求解:CopyingPuppetmodulesandmanifests[DONE]Applying192.168.10.30_prescript.pp192.168.10.30_prescript.pp:[

centos 7.x yum安装rabbitmq-server,启动报错解决方法

yum安装好rabbitmq-server后,启动报错 [root@openstack ~]# systemctl start rabbitmq-server.service Job for rabbitmq-server.service failed. See 'systemctl status rabbitmq-server.service' and 'journalctl -xn' for details. [root@openstack ~]# systemctl status rabb

Centos6 yum安装openldap+phpldapadmin+TLS+双主配置

原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%85%8D%E7%BD%AE.html 钿畑的文章索引 1.概念介绍 2. 环境介绍 2. 准备工作 3. yum部署ldap 4. phpldapadmin安装 5.ldap客户端配置 6.用户目录自动挂载 6.1 服务器端配置 6.2 客户端配置 7.配置TLS传输加密 8.配置openldap双

Mysql 5.7.19三种安装方式手册

Mysql 5.7.19三种安装方式手册 ** 环境准备 操作系统:CentOS 软件:MySQL-5.7.19 ** ** 一.RPM 方式安装 进入官方网站:https://www.mysql.com 注册账号 downloads 选择MySQL Community Edition (GPL)>>Community (GPL) Downloads >>MySQL Community Server (GPL)>>download 操作系统:Red Hat Enterp

【Linux】CentOS7 上使用yum安装和卸载软件【yum安装wine举例】

关于yum的相关解释,请 man yum 自行查看. 配置常用源:http://www.cnblogs.com/sxdcgaq8080/p/7516186.html yum的使用类似于在windows系统上的应用市场去下载安装软件. 配置源就是给你提供了一个又一个的应用市场.   下面举例说明,yum安装软件和卸载   1.安装 安装键入以下命令: yum install wine wine就是你要安装的软件的名字. 具体过程如下: [sxd@localhost ~]$ su root 密码:

CentOS 6.2下如何使用YUM安装MySQL

用yum安装MySql 打入如下命令: [root@mysql ~]# yum -y install mysql-server      //自动从网上搜索资源并自动下载安装 [root@mysql ~]# chkconfig mysqld on    //设置开机启动MySql服务 检查是否为开机启动 打入命令:[root@mysql ~]# chkconfig –list 看到:mysqld          0:off   1:off   2:on    3:on    4:on    5

linux下yum安装软件的常用配置

开门见山,今天来小谈一下linux下yum安装软件的一些常用的配置,Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE.CentOS中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器(当然也可以是本地)自动下载RPM包并且安装,可以自动处理依赖性关系(很好的优点),并且一次安装所有依赖的软件包,无须繁琐地一次次下载.安装. yum能很好实现一下功能: yum install 软件名 软件安装 yum inst

yum安装出错Error: Cannot find a valid baseurl for

  yum安装出错Error: Cannot find a valid baseurl for解决 解决方法如下 (修改dns配置) vi /etc/resolv.conf 在此文件中最后加入 nameserver 8.8.8.8 如果没有vi编辑器可用 echo "nameserver 8.8.8.8" >> /etc/resolv.conf