<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Life Style! &#187; install cacti</title>
	<atom:link href="http://www.realqi.cn/tag/install-cacti/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.realqi.cn</link>
	<description>系统管理  维护监控  简单生活</description>
	<lastBuildDate>Wed, 25 Aug 2010 14:41:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>install cacti 0.87e</title>
		<link>http://www.realqi.cn/2009/08/install-cacti-on-centos4-7/</link>
		<comments>http://www.realqi.cn/2009/08/install-cacti-on-centos4-7/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 06:45:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[运维监控]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[install cacti]]></category>

		<guid isPermaLink="false">http://realqi.cn/?p=104</guid>
		<description><![CDATA[ 

安装LAMP    参考：lamp的安装及安全设置
安装并配置net-snmp  参考:  centos配置net-snmp 
下载CACTI源文件  Cacti for Linux/Unix
解开源包、改权限，打补丁
设置数据库，并导入数据
设置crontab
通过ui 进行必要的安装后设置

 
1、解开源包并打补丁
wget -P /root/tools/cacti/ http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
cd /usr/local/apache2/htdocs
tar zxvf /root/tools/cacti/cacti-0.8.7e.tar.gz
cd cacti-0.8.7e/
useradd cactiuser -s /sbin/nologin
chown -R cactiuser ./rra ./log
wget http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/template_duplication.patch
patch -p1 -N &#60; cli_add_graph.patch
patch -p1 -N &#60; snmp_invalid_response.patch
patch -p1 -N &#60; template_duplication.patch
2、创建并导入cacti的数据库
mysql -e 'create database cacti7e' -p
mysql cacti7e &#60; /usr/local/apache2/htdocs/cacti-0.8.7e/cacti.sql  -p
mysql -e "grant all on cacti7e.* to cactiuser@localhost identified by  <a href="http://www.realqi.cn/2009/08/install-cacti-on-centos4-7/" class="more-link">更多 &#62;</a>]]></description>
			<content:encoded><![CDATA[<p> </p>
<ul>
<li>安装LAMP    参考：<a href="http://realqi.cn/2009/09/%e5%ae%89%e8%a3%85lamp%e7%8e%af%e5%a2%83%e6%a0%87%e5%87%86%e7%89%88/">lamp的安装及安全设置</a></li>
<li>安装并配置net-snmp  参考:  centos配置net-snmp </li>
<li>下载CACTI源文件  <a href="http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz">Cacti for Linux/Unix</a></li>
<li>解开源包、改权限，打补丁</li>
<li>设置数据库，并导入数据</li>
<li>设置crontab</li>
<li>通过ui 进行必要的安装后设置</li>
</ul>
<p> </p>
<p><strong>1、解开源包并打补丁</strong></p>
<pre>wget -P /root/tools/cacti/ http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
cd /usr/local/apache2/htdocs
tar zxvf /root/tools/cacti/cacti-0.8.7e.tar.gz
cd cacti-0.8.7e/
useradd cactiuser -s /sbin/nologin
chown -R cactiuser ./rra ./log
wget http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/template_duplication.patch
patch -p1 -N &lt; cli_add_graph.patch
patch -p1 -N &lt; snmp_invalid_response.patch
patch -p1 -N &lt; template_duplication.patch</pre>
<p><strong>2、创建并导入cacti的数据库</strong></p>
<pre>mysql -e 'create database cacti7e' -p
mysql cacti7e &lt; /usr/local/apache2/htdocs/cacti-0.8.7e/cacti.sql  -p
mysql -e "grant all on cacti7e.* to cactiuser@localhost identified by 'cactiuser';" -p</pre>
<p><strong>3、更改 cacti-0.8.7e/include/config.php 相关数据库连接参数</strong></p>
<pre>$database_type = "mysql";
$database_default = "cacti7e";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";</pre>
<p><strong>4、添加crontab </strong></p>
<pre>echo  "*/1  * * * *  /usr/local/php/bin/php  /usr/local/apache2/htdocs/cacti-0.8.7e/poller.php" &gt;/tmp/cron.tmp

crontab  -u cactiuser  /tmp/cron.tmp</pre>
<p><strong>5、用ie打开<a href="http://server ip/cacti-0.8.7e">http://server ip/cacti-0.8.7e</a>进入cacti的web安装界面</strong></p>
<p><strong>     1、用admin admin 登入后，修改ADMIN为你自己密码</strong></p>
<p><strong>    2、进入settings -&gt;gernerl -web-Events 勾选所有项，如下：</strong>  </p>
<blockquote>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#e1e1e1">
<tbody>
<form action="settings.php" enctype="application/x-www-form-urlencoded" method="post">
<blockquote>
<tr>
<td width="60%"><span><strong>Web Events</strong></span><br />
What Cacti website messages should be placed in the log.</td>
<td>
<input id="log_snmp" checked="checked" name="log_snmp" type="checkbox" value="on" /> <label for="log_snmp">Web SNMP Messages</label><label for="log_snmp"></label><label for="log_snmp"></label><br />
<input id="log_graph" checked="checked" name="log_graph" type="checkbox" value="on" /> <label for="log_graph">Web RRD Graph Syntax</label><label for="log_graph"></label><label for="log_graph"></label></p>
<input id="log_export" checked="checked" name="log_export" type="checkbox" value="on" /> <label for="log_export">Graph Export Messages</label></td>
<p><strong> </strong></tr>
</blockquote>
</form>
</tbody>
</table>
</blockquote>
<p><strong>  3、进入settings -&gt;Poller -&gt;Poller Interval 设置为一分钟，如下：</strong></p>
<blockquote>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#e1e1e1">
<tbody>
<form action="settings.php" enctype="application/x-www-form-urlencoded" method="post">
<tr id="row_poller_interval" bgcolor="#f5f5f5">
<td width="50%"><span>Poller Interval</span><br />
The polling interval in use. This setting will effect how often rrd's are checked and updated. <strong><span style="text-decoration: underline;">NOTE: If you change this value, you must re-populate the poller cache. Failure to do so, may result in lost data.</span></strong></td>
<td>
<select id="poller_interval" name="poller_interval"><option selected="selected" value="60">Every Minute</option> <option value="15">Every 15 Seconds</option> <option value="20">Every 20 Seconds</option> <option value="30">Every 30 Seconds</option> <option value="60">Every Minute</option> <option value="300">Every 5 Minutes</option></select>
</td>
</tr>
<tr id="row_cron_interval" bgcolor="#e5e5e5">
<td width="50%"><span>Cron Interval</span><br />
The cron interval in use. You need to set this setting to the interval that your cron or scheduled task is currently running.</td>
<td>
<select id="cron_interval" name="cron_interval"><option selected="selected" value="60">Every Minute</option> <option value="300">Every 5 Minutes</option></select>
</td>
</tr>
</form>
</tbody>
</table>
</blockquote>
<p><strong> <strong>  4、进入settings -&gt;visual -&gt;Default RRDtool 1.2 Fonts 设置如下</strong></strong></p>
<blockquote>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#e1e1e1">
<tbody>
<form action="settings.php" enctype="application/x-www-form-urlencoded" method="post">
<tr id="row_fonts_header" bgcolor="#6d88ad">
<td colspan="2">Default RRDtool 1.2 Fonts</td>
</tr>
<tr id="row_title_size" bgcolor="#f5f5f5">
<td width="50%"><span>Title Font Size</span><br />
The size of the font used for Graph Titles</td>
<td>
<input id="title_size" maxlength="10" name="title_size" size="5" type="text" value="10" /></td>
</tr>
<tr id="row_title_font" bgcolor="#e5e5e5">
<td width="50%"><span>Title Font File</span><br />
The font file to use for Graph Titles</td>
<td>
<input id="title_font" maxlength="100" name="title_font" size="40" type="text" /></td>
</tr>
<tr id="row_legend_size" bgcolor="#f5f5f5">
<td width="50%"><span>Legend Font Size</span><br />
The size of the font used for Graph Legend items</td>
<td>
<input id="legend_size" maxlength="10" name="legend_size" size="5" type="text" value="8" /></td>
</tr>
<tr id="row_legend_font" bgcolor="#e5e5e5">
<td width="50%"><span>Legend Font File</span><br />
The font file to be used for Graph Legend items</td>
<td>
<input id="legend_font" maxlength="100" name="legend_font" size="40" type="text" /></td>
</tr>
<tr id="row_axis_size" bgcolor="#f5f5f5">
<td width="50%"><span>Axis Font Size</span><br />
The size of the font used for Graph Axis</td>
<td>
<input id="axis_size" maxlength="10" name="axis_size" size="5" type="text" value="8" /></td>
</tr>
<tr id="row_axis_font" bgcolor="#e5e5e5">
<td width="50%"><span>Axis Font File</span><br />
The font file to be used for Graph Axis items</td>
<td>
<input id="axis_font" maxlength="100" name="axis_font" size="40" type="text" /></td>
</tr>
<tr id="row_unit_size" bgcolor="#f5f5f5">
<td width="50%"><span>Unit Font Size</span><br />
The size of the font used for Graph Units</td>
<td>
<input id="unit_size" maxlength="10" name="unit_size" size="5" type="text" value="7" /></td>
</tr>
<tr id="row_unit_font" bgcolor="#e5e5e5">
<td width="50%"><span>Unit Font File</span><br />
The font file to be used for Graph Unit items</td>
</tr>
</form>
</tbody>
</table>
<p> </p>
<p> </p></blockquote>
<h3>相关文章</h3>
<ul class="related_post">
<li>2009年10月15日 -- <a href="http://www.realqi.cn/2009/10/linux%e6%80%a7%e8%83%bd%e5%86%85%e5%ad%98%e7%9b%b8%e5%85%b3%e6%8c%87%e6%a0%87/" title="linux性能相关指标[监控基础知识一]">linux性能相关指标[监控基础知识一] (0)</a></li>
<li>2009年09月24日 -- <a href="http://www.realqi.cn/2009/09/show-a-cacti-monitor-mysql-graphp/" title="show a cacti-monitor-mysql graph">show a cacti-monitor-mysql graph (1)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.realqi.cn/2009/08/install-cacti-on-centos4-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

