<?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>Towards Open Source</title>
	<atom:link href="http://www.g868.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g868.com</link>
	<description>记录各实践所得的开源方案、虚拟化方案、开源架构</description>
	<lastBuildDate>Wed, 10 Feb 2010 09:49:29 +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>Nagios监控系统部署</title>
		<link>http://www.g868.com/nagios-monitoring-system-deployment.html</link>
		<comments>http://www.g868.com/nagios-monitoring-system-deployment.html#comments</comments>
		<pubDate>Wed, 10 Feb 2010 09:45:33 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=994</guid>
		<description><![CDATA[Nagios介绍
Nagios是一套監視服務的軟體。它可以透過網路監視各種服務，像是TCP port, SMTP, POP3, HTTP,NNTP, PING等等。它提供一套介面，任何人都可以利用這個介面，為任何特殊的服務開發監視用插件，然後交給Nagios運行。
當所監視的對象(主機或服務)發生問題時，或是問題解決時，它可已經由email，呼叫器，或是任何設定好的方法，對於相關人士發出通知。
它可以定義一些事件的處理方法。當問題或是事件發生時，針對問題或是事件的種類進行問題對應或是事件反應。
它有一個美麗的Web畫面和很多便利的功能。你可以觀看現在各種服務運行的狀況，發出了那些通知，問題發生的履歷，以及運行期間的記錄檔。
它具有C語言的所有優點，設計也非常的平易近人。Nagios正是用這語言所寫的，讓Nagios很容易可以被客制化，作一些修改來更附合每個人的特殊需要。
它的設計可以讓插件的開發者很有發揮的空間。Nagios的核心裡包含了所有的功能，是以c語言寫成的。但是監視的插件是獨立於核心之外，這些插件可以用任何語言寫成，只要是輸入與輸出的結果能夠照者核心所能認識的格式，插件本身是如何被開發是完全自由的。 
Nagios部署
1.准备工作

yum install gcc glibc glibc-common gd gd-devel httpd php

2.优化服务

chkconfig NetworkManager off
chkconfig acpid off
chkconfig apmd off
chkconfig anacron off 
chkconfig atd off
chkconfig auditd off
chkconfig autofs off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig capi off
chkconfig conman off
chkconfig cpuspeed off
chkconfig crond on
chkconfig cups off
chkconfig dnsmasq off
chkconfig dund off
chkconfig firstboot off
chkconfig gpm off
chkconfig haldaemon [...]<p><a href="http://www.g868.com/nagios-monitoring-system-deployment.html">Nagios监控系统部署</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<h3>Nagios介绍</h3>
<p>Nagios是一套監視服務的軟體。它可以透過網路監視各種服務，像是TCP port, SMTP, POP3, HTTP,NNTP, PING等等。它提供一套介面，任何人都可以利用這個介面，為任何特殊的服務開發監視用插件，然後交給Nagios運行。</p>
<p>當所監視的對象(主機或服務)發生問題時，或是問題解決時，它可已經由email，呼叫器，或是任何設定好的方法，對於相關人士發出通知。</p>
<p>它可以定義一些事件的處理方法。當問題或是事件發生時，針對問題或是事件的種類進行問題對應或是事件反應。</p>
<p>它有一個美麗的Web畫面和很多便利的功能。你可以觀看現在各種服務運行的狀況，發出了那些通知，問題發生的履歷，以及運行期間的記錄檔。</p>
<p>它具有C語言的所有優點，設計也非常的平易近人。Nagios正是用這語言所寫的，讓Nagios很容易可以被客制化，作一些修改來更附合每個人的特殊需要。</p>
<p>它的設計可以讓插件的開發者很有發揮的空間。Nagios的核心裡包含了所有的功能，是以c語言寫成的。但是監視的插件是獨立於核心之外，這些插件可以用任何語言寫成，只要是輸入與輸出的結果能夠照者核心所能認識的格式，插件本身是如何被開發是完全自由的。 </p>
<h3>Nagios部署</h3>
<p>1.准备工作</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> glibc glibc-common gd gd-devel httpd php</pre></div></div>

<p>2.优化服务</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chkconfig NetworkManager off
chkconfig acpid off
chkconfig apmd off
chkconfig anacron off 
chkconfig atd off
chkconfig auditd off
chkconfig autofs off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig capi off
chkconfig conman off
chkconfig cpuspeed off
chkconfig crond on
chkconfig cups off
chkconfig dnsmasq off
chkconfig dund off
chkconfig firstboot off
chkconfig gpm off
chkconfig haldaemon off
chkconfig hidd off
chkconfig ip6tables off
chkconfig iptables off
chkconfig irda off
chkconfig irqbalance off
chkconfig isdn off
chkconfig kudzu off
chkconfig lvm2-monitor off
chkconfig mcstrans off
chkconfig mdmonitor off
chkconfig mdmpd off
chkconfig messagebus off
chkconfig microcode_ctl off
chkconfig multipathd off
chkconfig netconsole off
chkconfig netfs off
chkconfig netplugd off
chkconfig network on
chkconfig nfs off
chkconfig nfslock off
chkconfig nscd off
chkconfig ntpd off
chkconfig oddjobd off
chkconfig pand off
chkconfig pcscd off
chkconfig portmap off
chkconfig psacct off
chkconfig rawdevices off
chkconfig rdisc off
chkconfig readahead_early off
chkconfig readahead_later off
chkconfig restorecond off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig saslauthd off
chkconfig <span style="color: #c20cb9; font-weight: bold;">sendmail</span> off
chkconfig smartd off
chkconfig sshd on
chkconfig syslog on
chkconfig tcsd off
chkconfig vncserver off
chkconfig wdaemon off
chkconfig wpa_supplicant off
chkconfig xfs off
chkconfig ypbind off
chkconfig yum-updatesd off</pre></div></div>

<p>3.用户设置</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>useradd nagios
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>usermod <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>nologin nagios
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>groupadd nagcmd
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>usermod <span style="color: #660033;">-G</span> nagcmd nagios
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>usermod <span style="color: #660033;">-G</span> nagcmd apache</pre></div></div>

<p>4.编译程序</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-command-group</span>=nagcmd
<span style="color: #c20cb9; font-weight: bold;">make</span> all
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> install-init
<span style="color: #c20cb9; font-weight: bold;">make</span> install-config
<span style="color: #c20cb9; font-weight: bold;">make</span> install-commandmode
<span style="color: #c20cb9; font-weight: bold;">make</span> install-webconf</pre></div></div>

<p>5.配置邮件通知</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>objects<span style="color: #000000; font-weight: bold;">/</span>contacts.cfg</pre></div></div>

<blockquote><p>
define contact{<br />
        contact_name                    nagiosadmin<br />
        use                             generic-contact<br />
        alias                           Nagios Admin<br />
        email                          <strong>admin@g868.com</strong> ;<br />
        }
</p></blockquote>
<p>6.配置访问权限</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">htpasswd <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>htpasswd.users nagiosadmin
service httpd restart</pre></div></div>

<p>7.插件部署</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-nagios-user</span>=nagios <span style="color: #660033;">--with-nagios-group</span>=nagios
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>8.安装NRPE</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span> all
<span style="color: #c20cb9; font-weight: bold;">make</span> install-plugin
<span style="color: #c20cb9; font-weight: bold;">make</span> install-daemon
<span style="color: #c20cb9; font-weight: bold;">make</span> install-daemon-config</pre></div></div>

<p>9.配置NRPE通讯地址</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nrpe.cfg</pre></div></div>

<blockquote><p>allowed_hosts=127.0.0.1,服务器地址</p></blockquote>
<p>10.启动NRPE</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>nrpe <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nrpe.cfg <span style="color: #660033;">-d</span></pre></div></div>

<p>11.设置启动</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chkconfig <span style="color: #660033;">--add</span> nagios
chkconfig nagios on</pre></div></div>

<p>检查配置文件</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>nagios <span style="color: #660033;">-v</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios.cfg
service nagios start</pre></div></div>

<div class="exclamation alertMessage">注意：如果你开启了selinux 需要配置如下二步：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chcon <span style="color: #660033;">-R</span> <span style="color: #660033;">-t</span> httpd_sys_content_t <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>
chcon <span style="color: #660033;">-R</span> <span style="color: #660033;">-t</span> httpd_sys_content_t <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<h3>Linux监控部署</h3>
<p>1.用户设置</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>useradd nagios
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>usermod <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>nologin nagios</pre></div></div>

<p>2.安装NRPE</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span> all
<span style="color: #c20cb9; font-weight: bold;">make</span> install-plugin
<span style="color: #c20cb9; font-weight: bold;">make</span> install-daemon
<span style="color: #c20cb9; font-weight: bold;">make</span> install-daemon-config</pre></div></div>

<p>3.配置NRPE权限</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nrpe.cfg</pre></div></div>

<blockquote><p>allowed_hosts=127.0.0.1,服务器地址</p></blockquote>
<p>4.启动NRPE</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>nrpe <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nrpe.cfg <span style="color: #660033;">-d</span></pre></div></div>

<p>5.对象配置文件[<strong>Nagios监控服务器</strong>配置]</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>objects<span style="color: #000000; font-weight: bold;">/</span>Hostname.cfg</pre></div></div>

<blockquote><p>define host{<br />
        use                     linux-server<br />
        host_name               Hostname<br />
        alias                   Hostname<br />
        address                 IP address<br />
        }<br />
	define service{<br />
        use                             generic-service<br />
        host_name                       Hostname<br />
        service_description             PING<br />
        check_command                   check_ping!100.0,20%!500.0,60%<br />
        }</p></blockquote>
<div class="information alertMessage">对象配置文件还有许多的监控配置方法，日后再慢慢的详述该部分内容！</div>
<p>6.主配置文件</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;cfg_file=/usr/local/nagios/etc/objects/Hostname.cfg&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nagios<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios.cfg</pre></div></div>

<h3>Windows监控部署</h3>
<p>该部分配置比较简单，基本属于傻瓜方式安装。对象配置文件系统已经有了，修改一下就可以了！</p>
<p><a href="http://www.g868.com/nagios-monitoring-system-deployment.html">Nagios监控系统部署</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.g868.com/oracle-routine-maintenance.html" title="Oracle日常维护">Oracle日常维护</a></li><li><a href="http://www.g868.com/nginx-patches.html" title="Nginx漏洞补丁">Nginx漏洞补丁</a></li><li><a href="http://www.g868.com/backup-environmental-planning.html" title="备份环境规划之前期准备">备份环境规划之前期准备</a></li><li><a href="http://www.g868.com/loadrunner-parameter-of-type.html" title="LoadRunner参数化类型">LoadRunner参数化类型</a></li><li><a href="http://www.g868.com/esxi-4-install-guest-os-does-not-recognize-hard-drive.html" title="Esxi 4上安装Guest OS无法识别硬盘">Esxi 4上安装Guest OS无法识别硬盘</a></li><li><a href="http://www.g868.com/ora-04030-baocuo.html" title="ORA-04030报错">ORA-04030报错</a></li><li><a href="http://www.g868.com/mysql-fuzzy-query.html" title="MySQL模糊查询">MySQL模糊查询</a></li><li><a href="http://www.g868.com/how-do-i-know-the-last-friday-of-a-month-is-a-few-number.html" title="如何得知某个月的最后一个星期五是几号">如何得知某个月的最后一个星期五是几号</a></li><li><a href="http://www.g868.com/loadrunner-parameter-update-value.html" title="LoadRunner参数化属性">LoadRunner参数化属性</a></li><li><a href="http://www.g868.com/japanese-pronunciation-of-dial-tone.html" title="日语拨音的发音">日语拨音的发音</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/nagios-monitoring-system-deployment.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>文件服务器作用</title>
		<link>http://www.g868.com/file-server-role.html</link>
		<comments>http://www.g868.com/file-server-role.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 11:51:08 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[系统管理|System Management]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[文件服务器]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=991</guid>
		<description><![CDATA[近期某客户提到一个疑问，公司文件为什么要放置在服务器，其意义与作用是什么？我当时简单的回答了以下4点，可能不全但也记录一下。
１．分权限访问管控，特定的人访问特定的文件，做特定的工作。
２．数据做到自动月备份、周备份、日备份降低数据误删、丢失等风险。
３．节省用电；提取文件无需文件持有人在线，个人电脑随时可关闭；
４．统一安装杀毒软件，解决无病毒的问题；
如果大家有其他的想法，可以互相讨论一下！
文件服务器作用 is a post from: Towards Open Source
Windows小工具软件<p><a href="http://www.g868.com/file-server-role.html">文件服务器作用</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>近期某客户提到一个疑问，公司文件为什么要放置在服务器，其意义与作用是什么？我当时简单的回答了以下4点，可能不全但也记录一下。</p>
<p>１．分权限访问管控，特定的人访问特定的文件，做特定的工作。</p>
<p>２．数据做到自动月备份、周备份、日备份降低数据误删、丢失等风险。</p>
<p>３．节省用电；提取文件无需文件持有人在线，个人电脑随时可关闭；</p>
<p>４．统一安装杀毒软件，解决无病毒的问题；</p>
<p>如果大家有其他的想法，可以互相讨论一下！</p>
<p><a href="http://www.g868.com/file-server-role.html">文件服务器作用</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<ul class="related_post"><li><a href="http://www.g868.com/windows-small-tools.html" title="Windows小工具软件">Windows小工具软件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/file-server-role.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>win7清除垃圾文件脚本</title>
		<link>http://www.g868.com/win7-garbage-collection-script-file.html</link>
		<comments>http://www.g868.com/win7-garbage-collection-script-file.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 13:21:09 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[系统管理|System Management]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[清除垃圾]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=989</guid>
		<description><![CDATA[今天突然觉得自己的电脑视乎慢了许多，偶然留意了C盘空间剩余2GB左右......网上淘来以下脚本，运行后感觉速度快了些，C盘空间重回6GB！
@echo off
RD %windir%\$hf_mig$ /Q /S
dir %windir%\$NtUninstall* /a:d /b >%windir%\newwzp.txt
for /f %%i in (%windir%\newwzp.txt) do rd %windir%\%%i /s /q
del %windir%\newwzp.txt /f /q
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q [...]<p><a href="http://www.g868.com/win7-garbage-collection-script-file.html">win7清除垃圾文件脚本</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>今天突然觉得自己的电脑视乎慢了许多，偶然留意了C盘空间剩余2GB左右......网上淘来以下脚本，运行后感觉速度快了些，C盘空间重回6GB！</p>
<blockquote><p>@echo off<br />
RD %windir%\$hf_mig$ /Q /S<br />
dir %windir%\$NtUninstall* /a:d /b >%windir%\newwzp.txt<br />
for /f %%i in (%windir%\newwzp.txt) do rd %windir%\%%i /s /q<br />
del %windir%\newwzp.txt /f /q<br />
del /f /s /q %systemdrive%\*.tmp<br />
del /f /s /q %systemdrive%\*._mp<br />
del /f /s /q %systemdrive%\*.log<br />
del /f /s /q %systemdrive%\*.chk<br />
del /f /s /q %systemdrive%\*.old<br />
del /f /s /q %systemdrive%\recycled\*.*<br />
del /f /s /q %windir%\*.bak<br />
del /f /s /q %windir%\prefetch\*.*<br />
rd /s /q %windir%\temp md %windir%\temp<br />
del /f /s /q "%userprofile%\local settings\temporary internet files\*.*"<br />
del /f /s /q "%userprofile%\local settings\temp\*.*"<br />
echo.&#038; pause</p></blockquote>
<p><a href="http://www.g868.com/win7-garbage-collection-script-file.html">win7清除垃圾文件脚本</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<ul class="related_post"><li><a href="http://www.g868.com/windows-2003-can-not-edit-the-bat-file.html" title="windows 2003无法编辑bat文件">windows 2003无法编辑bat文件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/win7-garbage-collection-script-file.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh+sync+expect备份方法</title>
		<link>http://www.g868.com/ssh-sync-expect-backup-methods.html</link>
		<comments>http://www.g868.com/ssh-sync-expect-backup-methods.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 05:42:04 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=985</guid>
		<description><![CDATA[rsync 是一个快速增量文件传输工具，它可以用于在同一主机备份内部的备分，我们还可以把它作为不同主机网络备份工具之用。相对tar和wget来说，rsync 也有其自身的优点，比如速度快、安全、高效；

我们平常运用的rsync备份方法均是利用典型的rsync备份方法，服务器需要备份就需要配置rsync deamon服务，然后在Backup服务器上配置计划任务。该方式显得非常的复杂，如果架构或IP地址发生变化，那么就必须到各相关设备进行配置修改。该部分的配置我就不叙述，Google一下就知道。
ssh+sync+expect备份方法则可以集中的在一台服务器上进行配置与管理，即使增加节点也一样方便。方法如下：
1.创建备份脚本backup.sh

vi backup.sh

rsync -avz --rsh="ssh -l root" 192.168.50.21:/opt/wwwroot  /backup/hostname
2.创建密码录入脚本backup.exp

vi backup.exp

#!/usr/bin/expect -f
#
spawn date "+%Y-%m-%d %H:%M"
expect "#"
spawn backup.sh
expect "password:" { send "root密码\n" }
expect ".*\@.*#"
该expect命令需要安装expect包，具体可以在安装光盘内找到。
3.创建计划任务

crontab -e

10 * * * * backup.exp >> backup.log
如果需要增加新的节点，仅需重复以上步骤即可实现。
以上仅大致思路，严谨做法请大家再深入思考！
ssh+sync+expect备份方法 is a post from: Towards Open Source
备份环境规划之备份介质与备份方式选型备份环境规划之投资预算备份环境规划之前期准备BrightStor ARCserve Backup工具介绍BrightStor ARCserve Backup 配置工具介绍BrightStor ARCserve Backup 服务器核心组件介绍自动删除N天前的备份M$自带NTBackup故障一例<p><a href="http://www.g868.com/ssh-sync-expect-backup-methods.html">ssh+sync+expect备份方法</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>rsync 是一个快速增量文件传输工具，它可以用于在同一主机备份内部的备分，我们还可以把它作为不同主机网络备份工具之用。相对tar和wget来说，rsync 也有其自身的优点，比如速度快、安全、高效；</p>
<p><a href="http://www.g868.com/wp-content/uploads/2010/02/rsync.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/02/rsync-300x148.jpg" alt="rsync" title="rsync" width="300" height="148" class="alignnone size-medium wp-image-986" /></a></p>
<p>我们平常运用的rsync备份方法均是利用典型的rsync备份方法，服务器需要备份就需要配置rsync deamon服务，然后在Backup服务器上配置计划任务。该方式显得非常的复杂，如果架构或IP地址发生变化，那么就必须到各相关设备进行配置修改。该部分的配置我就不叙述，Google一下就知道。</p>
<p>ssh+sync+expect备份方法则可以集中的在一台服务器上进行配置与管理，即使增加节点也一样方便。方法如下：</p>
<p>1.创建备份脚本backup.sh</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> backup.sh</pre></div></div>

<blockquote><p>rsync -avz --rsh="ssh -l root" 192.168.50.21:/opt/wwwroot  /backup/hostname</p></blockquote>
<p>2.创建密码录入脚本backup.exp</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> backup.exp</pre></div></div>

<blockquote><p>#!/usr/bin/expect -f<br />
#<br />
spawn date "+%Y-%m-%d %H:%M"<br />
expect "#"<br />
spawn backup.sh<br />
expect "password:" { send "root密码\n" }<br />
expect ".*\@.*#"</p></blockquote>
<div class="information alertMessage">该expect命令需要安装expect包，具体可以在安装光盘内找到。</div>
<p>3.创建计划任务</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">crontab <span style="color: #660033;">-e</span></pre></div></div>

<blockquote><p>10 * * * * backup.exp >> backup.log</p></blockquote>
<p>如果需要增加新的节点，仅需重复以上步骤即可实现。</p>
<div class="exclamation alertMessage">以上仅大致思路，严谨做法请大家再深入思考！</div>
<p><a href="http://www.g868.com/ssh-sync-expect-backup-methods.html">ssh+sync+expect备份方法</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<ul class="related_post"><li><a href="http://www.g868.com/environmental-planning-of-the-backup-media-backup-selection.html" title="备份环境规划之备份介质与备份方式选型">备份环境规划之备份介质与备份方式选型</a></li><li><a href="http://www.g868.com/environmental-planning-of-the-investment-budget-backup.html" title="备份环境规划之投资预算">备份环境规划之投资预算</a></li><li><a href="http://www.g868.com/backup-environmental-planning.html" title="备份环境规划之前期准备">备份环境规划之前期准备</a></li><li><a href="http://www.g868.com/brightstor-arcserve-backup-to-restore-a-database-tool.html" title="BrightStor ARCserve Backup工具介绍">BrightStor ARCserve Backup工具介绍</a></li><li><a href="http://www.g868.com/brightstor-arcserve-backup-configuration-tool-introduction.html" title="BrightStor ARCserve Backup 配置工具介绍">BrightStor ARCserve Backup 配置工具介绍</a></li><li><a href="http://www.g868.com/brightstor-arcserve-backup-server-core-components-description.html" title="BrightStor ARCserve Backup 服务器核心组件介绍">BrightStor ARCserve Backup 服务器核心组件介绍</a></li><li><a href="http://www.g868.com/zi-dong-shan-chu-n-tian-qian-di-bei-fen.html" title="自动删除N天前的备份">自动删除N天前的备份</a></li><li><a href="http://www.g868.com/case-of-m-own-ntbackup-failure.html" title="M$自带NTBackup故障一例">M$自带NTBackup故障一例</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/ssh-sync-expect-backup-methods.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows死机手动生成dump文件</title>
		<link>http://www.g868.com/windows-crash-dump-file-is-generated-manually.html</link>
		<comments>http://www.g868.com/windows-crash-dump-file-is-generated-manually.html#comments</comments>
		<pubDate>Sun, 07 Feb 2010 14:47:25 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[系统管理|System Management]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[蓝屏]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=983</guid>
		<description><![CDATA[大家都知道，当服务器出现蓝屏问题时，我们需要获取系统所产生的DUMP文件进行分析，但系统往往不会自动生成dump文件。我们需要手动的将该dump文件生成并通过Debugging Tools进行分析。那么如何生成dump文件就是关键，步骤如下：
1)、打开注册表编辑器 regedit;
2)、定位如下键值：HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager
3)、设置GlobalFlag的值为00000400（16进制）
4)、定位如下键值：HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters
5)、新建一个DWORD的键，命名为“CrashOnCtrlScroll”
6)、设置其值为1
7)、重启电脑使设置生效。 
当系统问题发生时，我们使用PS/2的键盘触发蓝屏。当系统停在死机界面时，请按住右边的“Ctrl”键，然后连续按下”Scroll Lock”键2次。当我们看到蓝屏界面时，请等待至到系统收集dump文集的过程结束之后再重新启动服务器。
这个操作只能通过本地的终端直接进行，不能通过任何的远程服务进行操作。
windows死机手动生成dump文件 is a post from: Towards Open Source
随机日志管理Oracle数据库的工具中国各地名的日语读法[转]用gettext实现shell脚本国际化查看20条常用的命令VMware上的Linux虚拟机出现Read-only问题新建证书Oracle内存结构与相关参数云端软件出现服务错误问题LoadRunner参数化属性简单判断已装Oracle版本是否64bit方法<p><a href="http://www.g868.com/windows-crash-dump-file-is-generated-manually.html">windows死机手动生成dump文件</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>大家都知道，当服务器出现蓝屏问题时，我们需要获取系统所产生的DUMP文件进行分析，但系统往往不会自动生成dump文件。我们需要手动的将该dump文件生成并通过<a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx">Debugging Tools</a>进行分析。那么如何生成dump文件就是关键，步骤如下：</p>
<p>1)、打开注册表编辑器 regedit;<br />
2)、定位如下键值：HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager<br />
3)、设置GlobalFlag的值为00000400（16进制）<br />
4)、定位如下键值：HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters<br />
5)、新建一个DWORD的键，命名为“CrashOnCtrlScroll”<br />
6)、设置其值为1<br />
7)、重启电脑使设置生效。 </p>
<p>当系统问题发生时，我们使用<strong>PS/2的键盘</strong>触发蓝屏。当系统停在死机界面时，请按住右边的“Ctrl”键，然后连续按下”Scroll Lock”键2次。当我们看到蓝屏界面时，请等待至到系统收集dump文集的过程结束之后再重新启动服务器。</p>
<div class="exclamation alertMessage">这个操作只能通过本地的终端直接进行，不能通过任何的远程服务进行操作。</div>
<p><a href="http://www.g868.com/windows-crash-dump-file-is-generated-manually.html">windows死机手动生成dump文件</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.g868.com/nginx-application-practice-load-balancing.html" title="Nginx应用实践-负载均衡">Nginx应用实践-负载均衡</a></li><li><a href="http://www.g868.com/nginx-patches.html" title="Nginx漏洞补丁">Nginx漏洞补丁</a></li><li><a href="http://www.g868.com/lvs-of-eight-kinds-of-scheduling-algorithms.html" title="LVS的八种调度算法">LVS的八种调度算法</a></li><li><a href="http://www.g868.com/lvs-three-packet-forwarding-method.html" title="LVS的三种包转发方式">LVS的三种包转发方式</a></li><li><a href="http://www.g868.com/ssh-sync-expect-backup-methods.html" title="ssh+sync+expect备份方法">ssh+sync+expect备份方法</a></li><li><a href="http://www.g868.com/windows-small-tools.html" title="Windows小工具软件">Windows小工具软件</a></li><li><a href="http://www.g868.com/loadrunner-parameter-update-value.html" title="LoadRunner参数化属性">LoadRunner参数化属性</a></li><li><a href="http://www.g868.com/zimbra-multi-lingual-auto-switch-failure.html" title="Zimbra多语言自动切换失效？">Zimbra多语言自动切换失效？</a></li><li><a href="http://www.g868.com/mysql-stress-testing-tool-mysqlslap.html" title="mysql压力测试工具：mysqlslap">mysql压力测试工具：mysqlslap</a></li><li><a href="http://www.g868.com/windows-2008-basic-settings.html" title="Windows 2008基本设定">Windows 2008基本设定</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/windows-crash-dump-file-is-generated-manually.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ntbackup问题</title>
		<link>http://www.g868.com/ntbackup-problem.html</link>
		<comments>http://www.g868.com/ntbackup-problem.html#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:24:18 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[系统管理|System Management]]></category>
		<category><![CDATA[ntbackup]]></category>
		<category><![CDATA[vss]]></category>
		<category><![CDATA[修复]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=979</guid>
		<description><![CDATA[前段时间处理过一次关于Ntbackup的问题，这次又出问题。以下是上一次的处理过程，本地打算照搬该方法：
M$自带NTBackup故障一例
在实际操作后，我发现无效并且现象也不一样了。备份失败后，系统的server、workstation都会同时罢工。系统日志有以下这里错误：
事件类型： 错误
事件源: EventSystem
事件类别： (52)
事件 ID： 4616
日期： Date
时间: Time
用户： 暂缺
ComputerName 的计算机：
描述:
COM + 事件系统在方法的接口 {F2B41165-A791-4C1F-9820-8BE45C784E32} PostSnapshot 中的地址 0x77B74817 捕获到违规访问。 该方法试图访问地址 0x00000D54。
msvcrt! wscanf + 0x15e2
msvcrt! _vsnwprintf + 0x30
VSSAPI! 0x1c519 +
VSSAPI! VssFreeSnapshotProperties + 0x28c
VSSAPI! CVssJetWriter::Initialize(struct _GUID,unsigned short const *,bool,bool,unsigned short const *,unsigned short const *) + 0x2cdb2
VSSAPI! CVssJetWriter::Initialize(struct _GUID,unsigned short const *,bool,bool,unsigned short const *,unsigned short const *) + [...]<p><a href="http://www.g868.com/ntbackup-problem.html">Ntbackup问题</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>前段时间处理过一次关于Ntbackup的问题，这次又出问题。以下是上一次的处理过程，本地打算照搬该方法：</p>
<p><a href="http://www.g868.com/case-of-m-own-ntbackup-failure.html">M$自带NTBackup故障一例</a></p>
<p>在实际操作后，我发现无效并且现象也不一样了。备份失败后，系统的server、workstation都会同时罢工。系统日志有以下这里错误：</p>
<blockquote><p>事件类型： 错误<br />
事件源: EventSystem<br />
事件类别： (52)<br />
事件 ID： 4616<br />
日期： Date<br />
时间: Time<br />
用户： 暂缺<br />
ComputerName 的计算机：<br />
描述:<br />
COM + 事件系统在方法的接口 {F2B41165-A791-4C1F-9820-8BE45C784E32} PostSnapshot 中的地址 0x77B74817 捕获到违规访问。 该方法试图访问地址 0x00000D54。<br />
msvcrt! wscanf + 0x15e2<br />
msvcrt! _vsnwprintf + 0x30<br />
VSSAPI! 0x1c519 +<br />
VSSAPI! VssFreeSnapshotProperties + 0x28c<br />
VSSAPI! CVssJetWriter::Initialize(struct _GUID,unsigned short const *,bool,bool,unsigned short const *,unsigned short const *) + 0x2cdb2<br />
VSSAPI! CVssJetWriter::Initialize(struct _GUID,unsigned short const *,bool,bool,unsigned short const *,unsigned short const *) + 0x2d4c5<br />
VSSAPI! CVssJetWriter::Initialize(struct _GUID,unsigned short const *,bool,bool,unsigned short const *,unsigned short const *) + 0x2d882<br />
VSSAPI! CVssJetWriter::Initialize(struct _GUID,unsigned short const *,bool,bool,unsigned short const *,unsigned short const *) + 0x2f881<br />
ole32! ComPs_NdrDllGetClassObject + 0x6db<br />
es! 0xdf65 +<br />
es! 0xe5f1 +<br />
es! DllRegisterServer + 0x7b03<br />
es! DllRegisterServer + 0x7b28<br />
es! ServiceMain + 0x77ce<br />
es! ServiceMain + 0x795a<br />
msvcrt! _endthreadex + 0xa3<br />
kernel32! GetModuleFileNameA + 0xeb</p></blockquote>
<blockquote><p>Volume Shadow Copy Service error: An internal inconsistency was detected in trying to contact shadow copy service writers.  Please check to see that the Event Service and Volume Shadow Copy Service are operating properly.</p></blockquote>
<blockquote><p>Volume Shadow Copy Service initialization error: the control dispatcher cannot be started [0x80070427].</p></blockquote>
<blockquote><p>Volume Shadow Copy Service error: Error on creating/using the COM+ Writers publisher interface: BackupShutdown [0x8000ffff].</p></blockquote>
<p>由以上的日志可以看到问题点应该是在于 VSS 卷影副本方面。针对该问题我寻找了微软官方的许多KB，最终找到了以下解决方法：</p>
<p><a href="http://support.microsoft.com/kb/951568">如果有修补程序应用 940349 的基于 Windows Server 2003 的计算机上启用了 VSS 跟踪基于 VSS 备份操作可能会失败</a></p>
<p><a href="http://www.g868.com/ntbackup-problem.html">Ntbackup问题</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.g868.com/jquery-ajax-based-entry.html" title="基于Jquery的Ajax入门">基于Jquery的Ajax入门</a></li><li><a href="http://www.g868.com/linux-compression-commands.html" title="Linux压缩命令">Linux压缩命令</a></li><li><a href="http://www.g868.com/japanese-time-to-express-daquan.html" title="日语时间表达大全">日语时间表达大全</a></li><li><a href="http://www.g868.com/simple-to-determine-whether-the-64bit-version-has-been-installed-oracle-method.html" title="简单判断已装Oracle版本是否64bit方法">简单判断已装Oracle版本是否64bit方法</a></li><li><a href="http://www.g868.com/throughout-china-the-name-of-japanese-pronunciation.html" title="中国各地名的日语读法">中国各地名的日语读法</a></li><li><a href="http://www.g868.com/nginx-log-format-configuration.html" title="Nginx日志格式配置">Nginx日志格式配置</a></li><li><a href="http://www.g868.com/happy-squid-limitation-of-working-time-browsing-web.html" title="Squid限制工作时间浏览开心网">Squid限制工作时间浏览开心网</a></li><li><a href="http://www.g868.com/php-to-delete-a-specific-array-of-content-and-method-of-rebuilding-the-array-index.html" title="PHP删除特定数组内容并且重建数组索引的方法">PHP删除特定数组内容并且重建数组索引的方法</a></li><li><a href="http://www.g868.com/win-7-frequently-asked-questions-finishing.html" title="Win 7 常见问题整理">Win 7 常见问题整理</a></li><li><a href="http://www.g868.com/apache-tuning.html" title="Apache调优">Apache调优</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/ntbackup-problem.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra升级导致无法发送与接收邮件</title>
		<link>http://www.g868.com/zimbra-upgrade-cause-unable-to-send-and-receive-e-mail.html</link>
		<comments>http://www.g868.com/zimbra-upgrade-cause-unable-to-send-and-receive-e-mail.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 06:20:55 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[zimbra]]></category>
		<category><![CDATA[升级]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=977</guid>
		<description><![CDATA[今天客户突然来电告知周一发送给我们的邮件均无回复，而且也无人响应邮件中的事件。我在检查我自己邮件的时候没有发现有任何来自邮箱管理组的邮件，难道服务器出问题了？我通过telnet 25/110可以登录、Web也可以登录，一般均会认为服务器一切正常。不过这次却是一个例外，记录一下也给自己提个醒。
测试邮件发送与接收：





发件人
收件人
描述


test@domain.com
abc@139.com
可以正常发送，但无法正常接收


abc@139.com
test@domain.com
可以正常发送，但无法正常接收


test@domain.com
test@domain.com
可以正常发送，但无法正常接收





由此可见问题可能存在于系统处理邮件的过程中，Zimbra体制当中有两个关键的步骤就是邮件杀毒与垃圾邮件过滤。仔细研究邮件日志，发现以下情况：
Jan 20 11:02:04 ftp amavis[5918]: (02200-05) (!)run_command_consumer: child process [5918]: run_command_consumer: failed to exec /opt/zimbra/dspam/bin/dspam --stdout --classify --deliver=innocent,spam --mode=tum --tokenizer=chained,noise --user zimbra: Permission denied at /opt/zimbra/amavisd/sbin/amavisd line 3154.
Jan 20 11:02:04 ftp amavis[2200]: (02200-05) (!)checking with spam scanner DSPAM failed: DSPAM: error running program /opt/zimbra/dspam/bin/dspam: exit 6
Jan 20 11:02:04 ftp amavis[2200]: (02200-05) (!!)TROUBLE in check_mail: [...]<p><a href="http://www.g868.com/zimbra-upgrade-cause-unable-to-send-and-receive-e-mail.html">Zimbra升级导致无法发送与接收邮件</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>今天客户突然来电告知周一发送给我们的邮件均无回复，而且也无人响应邮件中的事件。我在检查我自己邮件的时候没有发现有任何来自邮箱管理组的邮件，难道服务器出问题了？我通过telnet 25/110可以登录、Web也可以登录，一般均会认为服务器一切正常。不过这次却是一个例外，记录一下也给自己提个醒。</p>
<p>测试邮件发送与接收：</p>
<div id="preview">
<div class="ie5">
<table class="style_table" cellspacing="1" border="0">
<tbody>
<tr>
<td class="style_td">发件人</td>
<td class="style_td">收件人</td>
<td class="style_td">描述</td>
</tr>
<tr>
<td class="style_td"><a href="mailto:test@domain.com" rel="nofollow">test@domain.com</a></td>
<td class="style_td"><a href="mailto:abc@139.com" rel="nofollow">abc@139.com</a></td>
<td class="style_td">可以正常发送，但无法正常接收</td>
</tr>
<tr>
<td class="style_td"><a href="mailto:abc@139.com" rel="nofollow">abc@139.com</a></td>
<td class="style_td"><a href="mailto:test@domain.com" rel="nofollow">test@domain.com</a></td>
<td class="style_td">可以正常发送，但无法正常接收</td>
</tr>
<tr>
<td class="style_td"><a href="mailto:test@domain.com" rel="nofollow">test@domain.com</a></td>
<td class="style_td"><a href="mailto:test@domain.com" rel="nofollow">test@domain.com</a></td>
<td class="style_td">可以正常发送，但无法正常接收</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>由此可见问题可能存在于系统处理邮件的过程中，Zimbra体制当中有两个关键的步骤就是邮件杀毒与垃圾邮件过滤。仔细研究邮件日志，发现以下情况：</p>
<blockquote><p>Jan 20 11:02:04 ftp amavis[5918]: (02200-05) (!)run_command_consumer: child process [5918]: run_command_consumer: failed to exec /opt/zimbra/dspam/bin/dspam --stdout --classify --deliver=innocent,spam --mode=tum --tokenizer=chained,noise --user zimbra: Permission denied at /opt/zimbra/amavisd/sbin/amavisd line 3154.<br />
Jan 20 11:02:04 ftp amavis[2200]: (02200-05) (!)checking with spam scanner DSPAM failed: DSPAM: error running program /opt/zimbra/dspam/bin/dspam: exit 6<br />
Jan 20 11:02:04 ftp amavis[2200]: (02200-05) (!!)TROUBLE in check_mail: spam_scan FAILED: DSPAM failed: DSPAM: error running program /opt/zimbra/dspam/bin/dspam: exit 6 at (eval 87) line 109, <GEN171> line 59.<br />
Jan 20 11:02:04 ftp amavis[2200]: (02200-05) (!)PRESERVING EVIDENCE in /opt/zimbra/data/amavisd/tmp/amavis-20100120T110149-02200<br />
Jan 20 11:02:04 ftp postfix/smtp[3360]: 42191424E3A: to=<zimbra@ftp.homs-cn.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=21119, delays=21104/0.02/0/15, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02200-05, spam_scan FAILED: DSPAM failed: DSPAM: error running program /opt/zimbra/dspam/bin/dspam: exit 6 at (eval 87) line 109, <GEN171> line 59. (in reply to end of DATA command))</p></blockquote>
<p>由日志可以发现该问题应该与权限有关，通过以下命令设定了权限，问题就解决：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> zimbra:zimbra <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>zimbra<span style="color: #000000; font-weight: bold;">/</span>dspam<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>Zimbra的升级已经不是第一次操作，应该说是每一个版本都的升级都会有一些的问题存在。该类的问题均无法通过界面上的选项解决，一切都要到底层操作。如果作为服务提供给客户，那么升级前必须要做好版本的此时。千万不能依赖经验！</p>
<p><a href="http://www.g868.com/zimbra-upgrade-cause-unable-to-send-and-receive-e-mail.html">Zimbra升级导致无法发送与接收邮件</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<ul class="related_post"><li><a href="http://www.g868.com/zimbra-ldap-db-status.html" title="ZIMBRA LDAP &#8211; DB Status">ZIMBRA LDAP &#8211; DB Status</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/zimbra-upgrade-cause-unable-to-send-and-receive-e-mail.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Net-Worm.Win32.Kido.ih病毒</title>
		<link>http://www.g868.com/net-worm-win32-kido-ih-virus.html</link>
		<comments>http://www.g868.com/net-worm-win32-kido-ih-virus.html#comments</comments>
		<pubDate>Tue, 19 Jan 2010 01:18:53 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[Windows XP]]></category>
		<category><![CDATA[卡巴斯基]]></category>
		<category><![CDATA[病毒]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=973</guid>
		<description><![CDATA[昨天，客户现场一台电脑杀毒软件报感染病毒。我查看了一下杀毒软件日志(卡巴斯基)，发现病毒名称是“Net-Worm.Win32.Kido.ih”。登陆到官网的病毒库搜索了一下，发现该病毒有一个详细的专题介绍可见非同小可。
http://www.viruslist.com/sch/search?VN=Net-Worm.Win32.Kido.ih&#038;referer=wks
我仔细研究了一下具体的情况，发现确实如官网所说的无法用卡巴斯基清除。因为病毒即使被删除了，也还是会再次出现。只能运用官网提供的“Net-Worm.Win32.Kido removing tool”解决。
Net-Worm.Win32.Kido.ih病毒 is a post from: Towards Open Source
随机日志Squid的ERROR MESSAGE时区问题调整ulimit打开文件数SYSVOL与NETLOGON作用与故障日语拨音的发音Apache调优Nginx自定义错误页面Sql*Plus应用之show命令ORA-04030报错M$自带NTBackup故障一例Esxi启动SSH功能<p><a href="http://www.g868.com/net-worm-win32-kido-ih-virus.html">Net-Worm.Win32.Kido.ih病毒</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>昨天，客户现场一台电脑杀毒软件报感染病毒。我查看了一下杀毒软件日志(卡巴斯基)，发现病毒名称是“Net-Worm.Win32.Kido.ih”。登陆到官网的病毒库搜索了一下，发现该病毒有一个详细的专题介绍可见非同小可。</p>
<p><a href="http://www.viruslist.com/sch/search?VN=Net-Worm.Win32.Kido.ih&#038;referer=wks">http://www.viruslist.com/sch/search?VN=Net-Worm.Win32.Kido.ih&#038;referer=wks</a></p>
<p>我仔细研究了一下具体的情况，发现确实如官网所说的无法用卡巴斯基清除。因为病毒即使被删除了，也还是会再次出现。只能运用官网提供的“<a href="http://support.kaspersky.com/faq/?qid=208279973">Net-Worm.Win32.Kido removing tool</a>”解决。</p>
<p><a href="http://www.g868.com/net-worm-win32-kido-ih-virus.html">Net-Worm.Win32.Kido.ih病毒</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.g868.com/completely-uninstall-oracle-10g.html" title="完全卸载Oracle 10g">完全卸载Oracle 10g</a></li><li><a href="http://www.g868.com/step-8-to-complete-windows-2008-r2-system-installation.html" title="8步完成windows 2008 R2系统安装">8步完成windows 2008 R2系统安装</a></li><li><a href="http://www.g868.com/uf-nc-install-garbled-redhat-5-4.html" title="用友NC安装乱码(Redhat 5.4)">用友NC安装乱码(Redhat 5.4)</a></li><li><a href="http://www.g868.com/nginx-log-format-configuration.html" title="Nginx日志格式配置">Nginx日志格式配置</a></li><li><a href="http://www.g868.com/jsf-learning-series-1-web-application-environment-deployment.html" title="JSF学习系列一：WEB应用环境部署">JSF学习系列一：WEB应用环境部署</a></li><li><a href="http://www.g868.com/mo-and-po-translation-of-documents-hu-zhuan.html" title="MO与PO翻译文件互转">MO与PO翻译文件互转</a></li><li><a href="http://www.g868.com/the-first-chapter-an-overview-of-computer-networks.html" title="第一章 计算机网络概述">第一章 计算机网络概述</a></li><li><a href="http://www.g868.com/loadrunner-structure.html" title="Loadrunner的结构">Loadrunner的结构</a></li><li><a href="http://www.g868.com/nginx-custom-error-page.html" title="Nginx自定义错误页面">Nginx自定义错误页面</a></li><li><a href="http://www.g868.com/guan-li-oracle-shu-ju-ku-di-gong-ju-2.html" title="管理Oracle数据库的工具">管理Oracle数据库的工具</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/net-worm-win32-kido-ih-virus.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Esxi 4默认虚拟机磁盘大小限制256GB</title>
		<link>http://www.g868.com/esxi-4-default-virtual-machine-disk-size-limit-256gb.html</link>
		<comments>http://www.g868.com/esxi-4-default-virtual-machine-disk-size-limit-256gb.html#comments</comments>
		<pubDate>Thu, 14 Jan 2010 06:11:31 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[256]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[vmfs]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=969</guid>
		<description><![CDATA[上周朋友公司豪爽的购买了2台IBM 3850 M2，每台机均配置16GB内存。由于他对虚拟化技术仍不是非常懂，以致出现了许多的一些问题。比如我现在谈到的关于Esx(i) 4默认虚拟机磁盘大小限制的问题。
Esx(i) 4默认是运用VMFS格式存储虚拟机文件，默认的Block Sizes是1MB；这样就限制了虚拟机vmdk文件的最大大小为256GB；我们如果要修改Block Sizes就必须要格式化现有的VMFS分区。以下是各Block Sizes对应的虚拟机磁盘大小限制：





Block Sizes
VMDK Sizes


1MB
256GB


2MB
512GB


4MB
1024GB


8MB
2048GB





Block Sizes修改方式
1、停止VMFS所属的Guest os；
2、把默认的storage1从virtual center或VMware vSphere Client中删除；
3、在命令行用vmkfstools格式化VMFS；
vmkfstools -C vmfs3 -b 8m -S VMFSNAME vmhba0:0:0:3
vmhba0:0:0:3是HBA卡识别号，vCenter上可以看到。
该操作会格式化现有VMFS内所有数据，请备份重要数据后操作！
4、重启系统后生效！
Esxi 4默认虚拟机磁盘大小限制256GB is a post from: Towards Open Source
Esxi 4 硬盘部署如何在Win7中使用vSphere Client<p><a href="http://www.g868.com/esxi-4-default-virtual-machine-disk-size-limit-256gb.html">Esxi 4默认虚拟机磁盘大小限制256GB</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>上周朋友公司豪爽的购买了2台IBM 3850 M2，每台机均配置16GB内存。由于他对虚拟化技术仍不是非常懂，以致出现了许多的一些问题。比如我现在谈到的关于Esx(i) 4默认虚拟机磁盘大小限制的问题。</p>
<p>Esx(i) 4默认是运用VMFS格式存储虚拟机文件，默认的Block Sizes是1MB；这样就限制了虚拟机vmdk文件的最大大小为256GB；我们如果要修改Block Sizes就必须要格式化现有的VMFS分区。以下是各Block Sizes对应的虚拟机磁盘大小限制：</p>
<div id="preview">
<div class="ie5">
<table class="style_table" cellspacing="1" border="0">
<tbody>
<tr>
<td class="style_td">Block Sizes</td>
<td class="style_td">VMDK Sizes</td>
</tr>
<tr>
<td class="style_td">1MB</td>
<td class="style_td">256GB</td>
</tr>
<tr>
<td class="style_td">2MB</td>
<td class="style_td">512GB</td>
</tr>
<tr>
<td class="style_td">4MB</td>
<td class="style_td">1024GB</td>
</tr>
<tr>
<td class="style_td">8MB</td>
<td class="style_td">2048GB</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3>Block Sizes修改方式</h3>
<p>1、停止VMFS所属的Guest os；<br />
2、把默认的storage1从virtual center或VMware vSphere Client中删除；<br />
3、在命令行用vmkfstools格式化VMFS；</p>
<blockquote><p>vmkfstools -C vmfs3 -b 8m -S VMFSNAME vmhba0:0:0:3</p></blockquote>
<div class="information alertMessage">vmhba0:0:0:3是HBA卡识别号，vCenter上可以看到。</div>
<div class="exclamation alertMessage">该操作会格式化现有VMFS内所有数据，请备份重要数据后操作！</div>
<p>4、重启系统后生效！</p>
<p><a href="http://www.g868.com/esxi-4-default-virtual-machine-disk-size-limit-256gb.html">Esxi 4默认虚拟机磁盘大小限制256GB</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<ul class="related_post"><li><a href="http://www.g868.com/esxi-4-ying-pan-bu-shu.html" title="Esxi 4 硬盘部署">Esxi 4 硬盘部署</a></li><li><a href="http://www.g868.com/how-to-win7-use-vsphere-client.html" title="如何在Win7中使用vSphere Client">如何在Win7中使用vSphere Client</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/esxi-4-default-virtual-machine-disk-size-limit-256gb.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Esxi 4 硬盘部署</title>
		<link>http://www.g868.com/esxi-4-ying-pan-bu-shu.html</link>
		<comments>http://www.g868.com/esxi-4-ying-pan-bu-shu.html#comments</comments>
		<pubDate>Thu, 14 Jan 2010 00:45:27 +0000</pubDate>
		<dc:creator>eric.zhyd</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[部署]]></category>

		<guid isPermaLink="false">http://www.g868.com/?p=953</guid>
		<description><![CDATA[在Esxi 4当中明显的不通是由原来的32位升级为只支持64位扩展的CPU，也就是将部署Esxi 4的最低配置要求向上提升了。不过由另外一个层次上看，Esxi给我们带来了更多的新技术与新体现，具体可以查看官网的介绍。详细的在各种兼容性列表或KB都可以查询官网。
由于Esxi 4的部署非常简单，基本上均是点下一步即可：





在选择完需要部署到的硬盘后，所选择的硬盘会被格式化！




Esxi 4 硬盘部署 is a post from: Towards Open Source
Esxi 4默认虚拟机磁盘大小限制256GB如何在Win7中使用vSphere Client<p><a href="http://www.g868.com/esxi-4-ying-pan-bu-shu.html">Esxi 4 硬盘部署</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
]]></description>
			<content:encoded><![CDATA[<p>在Esxi 4当中明显的不通是由原来的32位升级为只支持64位扩展的CPU，也就是将部署Esxi 4的最低配置要求向上提升了。不过由另外一个层次上看，Esxi给我们带来了更多的新技术与新体现，具体可以<a href="http://www.vmware.com/products/esxi/features.html">查看官网的介绍</a>。详细的在各种兼容性列表或KB都可以<a href="http://www.vmware.com/resources/compatibility/search.php">查询官网</a>。</p>
<p>由于Esxi 4的部署非常简单，基本上均是点下一步即可：<br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/1.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/1-300x194.jpg" alt="1" title="1" width="300" height="194" class="alignnone size-medium wp-image-954" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/2.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/2-300x167.jpg" alt="2" title="2" width="300" height="167" class="alignnone size-medium wp-image-955" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/3.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/3-300x197.jpg" alt="3" title="3" width="300" height="197" class="alignnone size-medium wp-image-956" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/4.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/4-300x204.jpg" alt="4" title="4" width="300" height="197" class="alignnone size-medium wp-image-956" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/5.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/5-300x201.jpg" alt="5" title="5" width="300" height="197" class="alignnone size-medium wp-image-956" /></a></p>
<div class="exclamation alertMessage">在选择完需要部署到的硬盘后，所选择的硬盘会被格式化！</div>
<p><a href="http://www.g868.com/wp-content/uploads/2010/01/6.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/6-300x184.jpg" alt="6" title="6" width="300" height="197" class="alignnone size-medium wp-image-956" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/7.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/7-300x189.jpg" alt="7" title="7" width="300" height="197" class="alignnone size-medium wp-image-956" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/8.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/8-300x202.jpg" alt="8" title="8" width="300" height="197" class="alignnone size-medium wp-image-956" /></a><br />
<a href="http://www.g868.com/wp-content/uploads/2010/01/9.jpg" class="highslide-image" onclick="return hs.expand(this);"><img src="http://www.g868.com/wp-content/uploads/2010/01/9-300x166.jpg" alt="9" title="9" width="300" height="197" class="alignnone size-medium wp-image-956" /></a></p>
<p><a href="http://www.g868.com/esxi-4-ying-pan-bu-shu.html">Esxi 4 硬盘部署</a> is a post from: <a href="http://www.g868.com">Towards Open Source</a></p>
<ul class="related_post"><li><a href="http://www.g868.com/esxi-4-default-virtual-machine-disk-size-limit-256gb.html" title="Esxi 4默认虚拟机磁盘大小限制256GB">Esxi 4默认虚拟机磁盘大小限制256GB</a></li><li><a href="http://www.g868.com/how-to-win7-use-vsphere-client.html" title="如何在Win7中使用vSphere Client">如何在Win7中使用vSphere Client</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g868.com/esxi-4-ying-pan-bu-shu.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
