<?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>水车</title>
	<atom:link href="http://www.588k.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.588k.com</link>
	<description>sakia的日常点滴</description>
	<lastBuildDate>Wed, 01 Sep 2010 08:30:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ssh连接时清除终端shell乱码方法</title>
		<link>http://www.588k.com/?p=267</link>
		<comments>http://www.588k.com/?p=267#comments</comments>
		<pubDate>Wed, 01 Sep 2010 08:30:59 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[系统优化]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=267</guid>
		<description><![CDATA[



当用cat或tail命令显示一个二进制文件后终端可能会变成乱码
解决方法:
1.输入clean命令或按ctrl+L
2.输入reset命令
3.按ctrl+v再按ctrl+o 会出现个^O再按回车
ctrl+v 表示下一输入为特殊字符
ctrl+o 表示^O 切换为原来字符集
参考：
http://www.cyut.edu.tw/~ckhung/b/mi/textmode.php




]]></description>
			<content:encoded><![CDATA[<div>
<div>
<div>
<div>
<p>当用cat或tail命令显示一个二进制文件后终端可能会变成乱码</p>
<p>解决方法:</p>
<p>1.输入clean命令或按ctrl+L</p>
<p>2.输入reset命令</p>
<p>3.按ctrl+v再按ctrl+o 会出现个^O再按回车<br />
ctrl+v 表示下一输入为特殊字符<br />
ctrl+o 表示^O 切换为原来字符集</p>
<p>参考：</p>
<p>http://www.cyut.edu.tw/~ckhung/b/mi/textmode.php</p>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=267</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>免费的NTP时间同步服务器集群：ntp.api.bz</title>
		<link>http://www.588k.com/?p=134</link>
		<comments>http://www.588k.com/?p=134#comments</comments>
		<pubDate>Tue, 31 Aug 2010 05:19:12 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[系统优化]]></category>
		<category><![CDATA[ntp]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=134</guid>
		<description><![CDATA[RT
*/30 * * * * /usr/sbin/ntpdate ntp.api.bz &#62;/dev/null
crontab半小时同步一次时间
]]></description>
			<content:encoded><![CDATA[<p>RT</p>
<p>*/30 * * * * /usr/sbin/ntpdate ntp.api.bz &gt;/dev/null</p>
<p>crontab半小时同步一次时间</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=134</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>nagios It appears as though you do not have permission to view information you requested&#8230;的解决</title>
		<link>http://www.588k.com/?p=263</link>
		<comments>http://www.588k.com/?p=263#comments</comments>
		<pubDate>Sat, 07 Aug 2010 15:35:19 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[Nagios]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=263</guid>
		<description><![CDATA[访问nagios的时候，查看详细信息是提示“It appears as though you do not have permission to view information you requested&#8230;”
解决方法：
vi  /usr/local/nagios/etc/cgi.cfg
修改
use_authentication=1
为
use_authentication=0
/etc/init.d/nagios restart ﻿
为了保障系统的安全性，nagios设置了这个参数，默认为1,改为0即可
]]></description>
			<content:encoded><![CDATA[<p>访问nagios的时候，查看详细信息是提示“<strong>It appears as though you do not have permission to view information you requested&#8230;</strong>”</p>
<p>解决方法：</p>
<p>vi  /usr/local/nagios/etc/cgi.cfg</p>
<p>修改</p>
<p>use_authentication=1</p>
<p>为</p>
<p>use_authentication=0</p>
<p>/etc/init.d/nagios restart ﻿</p>
<p>为了保障系统的安全性，nagios设置了这个参数，默认为1,改为0即可</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=263</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>linux下apache支持中文名的解决方法</title>
		<link>http://www.588k.com/?p=244</link>
		<comments>http://www.588k.com/?p=244#comments</comments>
		<pubDate>Tue, 08 Jun 2010 09:07:37 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[系统优化]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache支持中文名]]></category>
		<category><![CDATA[mod_encoding]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=244</guid>
		<description><![CDATA[原日文网址：http://www.seya.org/mt/archives/2003/10/31_webdav2.html
1、下载相关文件并解压
WebDAV Resources JP有Apache2对应的mod_encoding的最新版本下载
# wget http://webdav.todo.gr.jp/download/mod_encoding-20021209.tar.gz
# wget http://webdav.todo.gr.jp/download/experimental/mod_encoding.c.apache2.20040616
# tar zxfv mod_encoding-20021209.tar.gz
# cp mod_encoding.c.apache2.20020616 mod_encoding-20021209/mod_encoding.c
2、iconv_hook编译和安装
安装mod_encoding前首先需要安装iconv_hook。
$ cd mod_encoding-20021209/lib
$ ./configure
$ make
# make install
完成上面操作后，iconv_hook相关so文件放到/usr/local/lib下面。
打开/etc/ld.so.conf文件，添加一行指向iconv_book的所在路径，即&#8221;/usr/local/lib&#8221;
# vi /etc/ld.so.conf
添加/usr/local/lib
# ldconfig
3、 mod_encoding模块的编译
进入mod_encoding-20021209.tar.gz的解压目录，即mod_encoding-20021209
&#8211;with-iconv-hook[=DIR]  use iconv.h from iconv_hook in DIR
(default is /usr/local/include/iconv_hook)
# ./configure &#8211;with-apxs=/usr/sbin/apxs &#8211;with-iconv-hook=/usr/local/include
# make
我在执行make命令编译时，会报如下错误：
/usr/local/apache2/bin/apxs -c -I/usr/local/include -liconv_hook mod_encoding.c
/usr/local/apache2/build/libtool &#8211;silent &#8211;mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I/usr/local/apache2/include   -I/usr/local/apache2/include -I/usr/local/include -c [...]]]></description>
			<content:encoded><![CDATA[<p>原日文网址：http://www.seya.org/mt/archives/2003/10/31_webdav2.html</p>
<p>1、下载相关文件并解压<br />
WebDAV Resources JP有Apache2对应的mod_encoding的最新版本下载</p>
<p># wget http://webdav.todo.gr.jp/download/mod_encoding-20021209.tar.gz<br />
# wget http://webdav.todo.gr.jp/download/experimental/mod_encoding.c.apache2.20040616<br />
# tar zxfv mod_encoding-20021209.tar.gz<br />
# cp mod_encoding.c.apache2.20020616 mod_encoding-20021209/mod_encoding.c</p>
<p>2、iconv_hook编译和安装<br />
安装mod_encoding前首先需要安装iconv_hook。</p>
<p>$ cd mod_encoding-20021209/lib<br />
$ ./configure<br />
$ make<br />
# make install<br />
完成上面操作后，iconv_hook相关so文件放到/usr/local/lib下面。<br />
打开/etc/ld.so.conf文件，添加一行指向iconv_book的所在路径，即&#8221;/usr/local/lib&#8221;</p>
<p># vi /etc/ld.so.conf<br />
添加/usr/local/lib</p>
<p># ldconfig</p>
<p>3、 mod_encoding模块的编译<br />
进入mod_encoding-20021209.tar.gz的解压目录，即mod_encoding-20021209<br />
&#8211;with-iconv-hook[=DIR]  use iconv.h from iconv_hook in DIR<br />
(default is /usr/local/include/iconv_hook)</p>
<p># ./configure &#8211;with-apxs=/usr/sbin/apxs &#8211;with-iconv-hook=/usr/local/include<br />
# make</p>
<p><span style="color: #ff0000;">我在执行make命令编译时，会报如下错误：<br />
/usr/local/apache2/bin/apxs -c -I/usr/local/include -liconv_hook mod_encoding.c<br />
/usr/local/apache2/build/libtool &#8211;silent &#8211;mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I/usr/local/apache2/include   -I/usr/local/apache2/include -I/usr/local/include -c -o mod_encoding.lo mod_encoding.c &amp;&amp; touch mod_encoding.slo<br />
mod_encoding.c: In function `get_client_encoding&#8217;:<br />
mod_encoding.c:174: warning: assignment makes pointer from integer without a cast<br />
mod_encoding.c:181: `regex_t&#8217; undeclared (first use in this function)<br />
mod_encoding.c:181: (Each undeclared identifier is reported only once<br />
mod_encoding.c:181: for each function it appears in.)<br />
mod_encoding.c:181: parse error before &#8216;)&#8217; token<br />
mod_encoding.c: At top level:<br />
mod_encoding.c:187: parse error before &#8220;return&#8221;<br />
mod_encoding.c: In function `set_server_encoding&#8217;:<br />
mod_encoding.c:213: warning: assignment makes pointer from integer without a cast<br />
mod_encoding.c: In function `add_client_encoding&#8217;:<br />
mod_encoding.c:239: `REG_EXTENDED&#8217; undeclared (first use in this function)<br />
mod_encoding.c:239: `REG_ICASE&#8217; undeclared (first use in this function)<br />
mod_encoding.c:239: `REG_NOSUB&#8217; undeclared (first use in this function)<br />
mod_encoding.c:244: warning: assignment makes pointer from integer without a cast<br />
mod_encoding.c: In function `default_client_encoding&#8217;:<br />
mod_encoding.c:270: warning: assignment makes pointer from integer without a cast<br />
mod_encoding.c: At top level:<br />
mod_encoding.c:301: warning: initialization from incompatible pointer type<br />
mod_encoding.c:305: warning: initialization from incompatible pointer type<br />
mod_encoding.c:309: warning: initialization from incompatible pointer type<br />
mod_encoding.c:313: warning: initialization from incompatible pointer type<br />
mod_encoding.c:317: warning: initialization from incompatible pointer type<br />
mod_encoding.c: In function `mod_enc_parse&#8217;:<br />
mod_encoding.c:499: warning: passing arg 2 of `ap_pbase64encode&#8217; makes pointer from integer without a cast<br />
mod_encoding.c:501: warning: passing arg 3 of `apr_table_set&#8217; makes pointer from integer without a cast<br />
apxs:Error: Command failed with rc=65536<br />
.<br />
make: *** [mod_encoding.so] Error 1</p>
<p>原因很明显，是regex.h未包含进来，解决办法也很简单，用vi打开mod_encoding.c，<br />
在#include &lt;httpd.h&gt;那一段的前面加上如下一行：<br />
#include &lt;regex.h&gt;</span></p>
<p>再编译应该就可以通过了</p>
<p>#ls -l mod_encoding.o  查看是否已经生成了mod_encoding.o文件，如果是，则make成功继续下边的操作。<br />
# gcc -shared -o mod_encoding.so mod_encoding.o -Wc,-Wall -L/usr/local/lib -Llib -liconv_hook</p>
<p>生成mod_encoding.so文件，将该文件拷贝到你的模块存放目录,一般为${APACHE_HOME}/modules/<br />
# cp mod_encoding.so /usr/local/apache/modules/mod_encoding.so</p>
<p>4、 httpd.confd的設定<br />
这个是我的设置文件</p>
<p>LoadModule headers_module modules/mod_headers.so<br />
LoadModule encoding_module modules/mod_encoding.so<br />
&lt;IfModule mod_headers.c&gt;<br />
Header add MS-Author-Via &#8220;DAV&#8221;<br />
&lt;/IfModule&gt;<br />
&lt;IfModule mod_encoding.c&gt;<br />
EncodingEngine    on<br />
NormalizeUsername on<br />
SetServerEncoding GBK<br />
DefaultClientEncoding UTF-8 GBK GB2312<br />
AddClientEncoding &#8220;(Microsoft .* DAV $)&#8221; UTF-8 GBK GB2312<br />
AddClientEncoding &#8220;Microsoft .* DAV&#8221; UTF-8 GBK GB2312<br />
AddClientEncoding &#8220;Microsoft-WebDAV*&#8221; UTF-8 GBK GB2312<br />
&lt;/IfModule&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=244</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>在shell中将unix时间戳转换为系统时间</title>
		<link>http://www.588k.com/?p=241</link>
		<comments>http://www.588k.com/?p=241#comments</comments>
		<pubDate>Mon, 10 May 2010 03:11:21 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[基本命令]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=241</guid>
		<description><![CDATA[用date +%s可以得到UNIX的时间戳,
如date +%s
1273460780
date转化为系统时间
date -d &#8217;1970-01-01 UTC 1273460780 seconds&#8217; +&#8221;%Y-%m-%d %T %z&#8221;
2010-05-10 11:06:20 +0800  （时间格式自行设计）
也可以用awk
awk &#8216;BEGIN{x=strftime(&#8220;%b %d %T CST %Y&#8221;, &#8220;1273460780&#8243;);print x}&#8217;
May 10 11:06:20 CST 2010
UNIX时间戳 就是1970-01-01到某个时间的总秒数。
可以自己编个程序算一算
]]></description>
			<content:encoded><![CDATA[<p>用date +%s可以得到UNIX的时间戳,</p>
<p>如date +%s<br />
1273460780</p>
<p>date转化为系统时间</p>
<p>date -d &#8217;1970-01-01 UTC 1273460780 seconds&#8217; +&#8221;%Y-%m-%d %T %z&#8221;</p>
<p>2010-05-10 11:06:20 +0800  （时间格式自行设计）</p>
<p>也可以用awk</p>
<p>awk &#8216;BEGIN{x=strftime(&#8220;%b %d %T CST %Y&#8221;, &#8220;1273460780&#8243;);print x}&#8217;</p>
<p>May 10 11:06:20 CST 2010</p>
<p>UNIX时间戳 就是1970-01-01到某个时间的总秒数。<br />
可以自己编个程序算一算</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=241</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>keepalived常见报错问题</title>
		<link>http://www.588k.com/?p=239</link>
		<comments>http://www.588k.com/?p=239#comments</comments>
		<pubDate>Fri, 23 Apr 2010 04:56:08 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[LVS]]></category>
		<category><![CDATA[keepalive]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=239</guid>
		<description><![CDATA[master、backup的/var/log/messagse显示
Nov 23 17:46:41 SN2008-06-070 Keepalived_vrrp: receive an invalid ip number count associated with VRID!
Nov 23 17:46:41 SN2008-06-070 Keepalived_vrrp: bogus VRRP packet received on eth0 !!!
Nov 23 17:46:41 SN2008-06-070 Keepalived_vrrp: VRRP_Instance(VI_1) Dropping received VRRP packet&#8230;
Nov 23 17:46:42 SN2008-06-070 Keepalived_vrrp: receive an invalid ip number count associated with VRID!
Nov 23 17:46:42 SN2008-06-070 Keepalived_vrrp: bogus VRRP packet received [...]]]></description>
			<content:encoded><![CDATA[<p>master、backup的/var/log/messagse显示<br />
Nov 23 17:46:41 SN2008-06-070 Keepalived_vrrp: receive an invalid ip number count associated with VRID!<br />
Nov 23 17:46:41 SN2008-06-070 Keepalived_vrrp: bogus VRRP packet received on eth0 !!!<br />
Nov 23 17:46:41 SN2008-06-070 Keepalived_vrrp: VRRP_Instance(VI_1) Dropping received VRRP packet&#8230;<br />
Nov 23 17:46:42 SN2008-06-070 Keepalived_vrrp: receive an invalid ip number count associated with VRID!<br />
Nov 23 17:46:42 SN2008-06-070 Keepalived_vrrp: bogus VRRP packet received on eth0 !!!<br />
Nov 23 17:46:42 SN2008-06-070 Keepalived_vrrp: VRRP_Instance(VI_1) Dropping received VRRP packet&#8230;<br />
解决方法：<br />
改变配置文件/etc/keepalived/keepalived.conf中virtual_router_id为另一个值即可。，与网络中不能重复。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=239</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kcore是什么</title>
		<link>http://www.588k.com/?p=236</link>
		<comments>http://www.588k.com/?p=236#comments</comments>
		<pubDate>Sat, 17 Apr 2010 02:44:06 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[系统优化]]></category>
		<category><![CDATA[share memory]]></category>
		<category><![CDATA[共享内存]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=236</guid>
		<description><![CDATA[What is the /proc/kcore?

Trick
/proc/kcore is the Server memory. You aren&#8217;t going to save any  disk space by trying to remove it.
It is the &#8216;image&#8217; file for all your memory; this actually contains the data and information that is currently in your physical RAM.
/proc/kcore is an image of the RAM of the Server. The entire [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is the /proc/kcore?</strong></p>
<div id="white">
<h3>Trick</h3>
<p>/proc/kcore is the Server memory. You aren&#8217;t going to save any  disk space by trying to remove it.<br />
It is the &#8216;image&#8217; file for all your memory; this actually contains the data and information that is currently in your physical RAM.</p>
<p>/proc/kcore is an image of the RAM of the Server. The entire /proc file system does not exist on the disk. Instead, it is a collection of files that the kernel generates on the fly to give information on different processes, and other information.</p>
<p>If the sight of it bothers you (or if you don&#8217;t want nosy people reading what&#8217;s in you RAM) you can disable /proc support in your kernel.</p>
</div>
<p>由此可以看出，它是反应你当前物理内存中数据的一个镜像文件，删除它不能过节省你磁盘的任空间</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=236</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows下rsync使用</title>
		<link>http://www.588k.com/?p=233</link>
		<comments>http://www.588k.com/?p=233#comments</comments>
		<pubDate>Wed, 14 Apr 2010 06:17:25 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=233</guid>
		<description><![CDATA[rsync 官方站点
http://rsync.samba.org/
http://samba.anu.edu.au/rsync/download.html
[ WINDOWS 2003 RSYNC 客户端 ]
rsync for windows download :
http://switch.dl.sourceforge.net/sourceforge/sereds/cwRsync_4.0.4_Installer.zip
下载后安装，安装目录比如C:\Program Files\cwRsync
安装后，启动Windows操作系统的命令窗口，直接运行rsync会报错。
此时要在Windows里加一下cwrsync的path，见此文
windows中添加PATH环境变量
正常运行rsync命令后就像在linux下使用rsync一样使用了
注意：rsync参数  -a等于-rlptgoD，
-o, &#8211;owner 保持文件属主信息
-g, &#8211;group 保持文件属组信息
由于在Windows下无法运行chown命令，所以会报错，但不影响同步，建议用 -rlptD来 代替 -a 参数
如：rsync -rlptDzv 192.168.0.5::www ./www
可以写批处理来运行备份或是同步等等应用，也可以加载计划任务里来定时运行
]]></description>
			<content:encoded><![CDATA[<p>rsync 官方站点</p>
<p>http://rsync.samba.org/</p>
<p>http://samba.anu.edu.au/rsync/download.html</p>
<p>[ WINDOWS 2003 RSYNC 客户端 ]<br />
rsync for windows download :</p>
<p>http://switch.dl.sourceforge.net/sourceforge/sereds/cwRsync_4.0.4_Installer.zip</p>
<p>下载后安装，安装目录比如C:\Program Files\cwRsync</p>
<p>安装后，启动Windows操作系统的命令窗口，直接运行rsync会报错。</p>
<p><a href="http://www.588k.com/wp-content/uploads/2010/04/rsync-1.gif"><img class="aligncenter size-full wp-image-229" title="rsync-1" src="http://www.588k.com/wp-content/uploads/2010/04/rsync-1.gif" alt="" width="620" height="139" /></a>此时要在Windows里加一下cwrsync的path，见此文</p>
<h2><a href="http://www.588k.com/?p=207" target="_blank">windows中添加PATH环境变量</a></h2>
<p>正常运行rsync命令后就像在linux下使用rsync一样使用了</p>
<p>注意：rsync参数  -a等于-rlptgoD，</p>
<p>-o, &#8211;owner 保持文件属主信息<br />
-g, &#8211;group 保持文件属组信息</p>
<p>由于在Windows下无法运行chown命令，所以会报错，但不影响同步，建议用 -rlptD来 代替 -a 参数</p>
<p>如：rsync -rlptDzv 192.168.0.5::www ./www</p>
<p>可以写批处理来运行备份或是同步等等应用，也可以加载计划任务里来定时运行</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=233</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows中添加PATH环境变量</title>
		<link>http://www.588k.com/?p=207</link>
		<comments>http://www.588k.com/?p=207#comments</comments>
		<pubDate>Tue, 13 Apr 2010 03:34:26 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[系统优化]]></category>
		<category><![CDATA[cwrsync]]></category>
		<category><![CDATA[path]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=207</guid>
		<description><![CDATA[以cwrsync为例，软件安装完毕后，启动Windows操作系统的命令窗口，在安装目录（比如C:\Program Files\cwRsync\bin）下运行rsync是ok的，但是在其他任意目录下运行rsync就会报错，如下图

这意味着我们还不能使用rsync命令，这是因为：虽然我们以经安装了cwrsync，而安装目录下也包含了rsync这个命令，但计算机不知道去哪里去找这两个命令。但是我们如果说进入到cwrsync的安装目录下的bin目录，再依次运行rsync命令，又是可以正常运行的。 计算机是如何查找命令的呢？Windows操作系统根据Path环境变量来查找命令。 Path环境变量的值是一系列路径，Windows操作系统会在这一系列的路径中查找命令。注意：在Windows操作系统里是不区分大小写的，而在Linux系统里，我们应该设置PATH环境变量。
在Windows平台上设置环境变量如果下图：
我的电脑-&#62;属性-&#62;高级-&#62;环境变量-&#62;系统变量中添加环境变量


对于Windows系统而言，名为Path的环境变量以经存，可以直修改该环境变量，在该环境变量值后面追加C:\Program Files\cwRsync\bin。然后新开一个命令窗口，运行path看看新加的环境变量是否存在了。
再在任何目录下运行rsync命令就都ok了
一般建议在用户变量里，去添加环境变量 。
用户变量与系统变量的区别：用户变量和系统变量并没有什么太大的区别，只是用户变量只对当前用户有效，而系统变量对所有用户有效。不过，系统变量会排在用户变量前面，如果说，两个地方都包含了rsync命令，则优先执行Path系统变量路径里包含的rsync命令。
]]></description>
			<content:encoded><![CDATA[<p>以cwrsync为例，软件安装完毕后，启动Windows操作系统的命令窗口，在安装目录（比如C:\Program Files\cwRsync\bin）下运行rsync是ok的，但是在其他任意目录下运行rsync就会报错，如下图</p>
<p><a href="http://www.588k.com/wp-content/uploads/2010/04/rsync-1.gif"><img class="aligncenter size-full wp-image-229" title="rsync-1" src="http://www.588k.com/wp-content/uploads/2010/04/rsync-1.gif" alt="" width="620" height="139" /></a></p>
<p>这意味着我们还不能使用rsync命令，这是因为：虽然我们以经安装了cwrsync，而安装目录下也包含了rsync这个命令，但计算机不知道去哪里去找这两个命令。<strong>但是我们如果说进入到cwrsync的安装目录下的bin目录，再依次运行rsync命令，又是可以正常运行的。</strong> 计算机是如何查找命令的呢？Windows操作系统根据Path环境变量来查找命令。 Path环境变量的值是一系列路径，Windows操作系统会在这一系列的路径中查找命令。<strong>注意：在Windows操作系统里是不区分大小写的，而在Linux系统里，我们应该设置PATH环境变量。</strong></p>
<p>在Windows平台上设置环境变量如果下图：</p>
<p>我的电脑-&gt;属性-&gt;高级-&gt;环境变量-&gt;系统变量中添加环境变量</p>
<p><a href="http://www.588k.com/wp-content/uploads/2010/04/rsync-2.gif"><img class="aligncenter size-full wp-image-227" title="rsync-2" src="http://www.588k.com/wp-content/uploads/2010/04/rsync-2.gif" alt="" width="620" height="482" /></a></p>
<p><a href="http://www.588k.com/wp-content/uploads/2010/04/rsync-3.gif"><img class="aligncenter size-full wp-image-231" title="rsync-3" src="http://www.588k.com/wp-content/uploads/2010/04/rsync-3.gif" alt="" width="620" height="420" /></a></p>
<p>对于Windows系统而言，名为Path的环境变量以经存，可以直修改该环境变量，在该环境变量值后面追加C:\Program Files\cwRsync\bin。然后新开一个命令窗口，运行path看看新加的环境变量是否存在了。</p>
<p>再在任何目录下运行rsync命令就都ok了</p>
<p><strong>一般建议在用户变量里，去添加环境变量</strong> 。</p>
<p><strong>用户变量与系统变量的区别：用户变量和系统变量并没有什么太大的区别，只是用户变量只对当前用户有效，而系统变量对所有用户有效。不过，系统变量会排在用户变量前面，如果说，两个地方都包含了rsync命令，则优先执行Path系统变量路径里包含的rsync命令。</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=207</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SecureCRT连接SSH超时后自动断开</title>
		<link>http://www.588k.com/?p=203</link>
		<comments>http://www.588k.com/?p=203#comments</comments>
		<pubDate>Wed, 07 Apr 2010 08:03:24 +0000</pubDate>
		<dc:creator>sakia</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[SecureCRT]]></category>

		<guid isPermaLink="false">http://www.588k.com/?p=203</guid>
		<description><![CDATA[为什么SecureCRT连接到sshd服务器后在一段时间内不操作就会自动断开呢？
SecureCRT 保持连接
原因：
这是因为客户端与服务器之间存在路由器，防火墙以及为了本身的安全性，在超过特定的时间后就会把空闲连接断开。或者是服务器端设置了断开空闲连接。
解决方法：
既然会断开超时的空闲连接，那么我们就应该让客户端与服务器之间的连接“忙”起来，方法有两个:
从服务器方面入手：
修改/etc/ssh/sshd_config配置文件 ClientAliveInterval 300（默认为0）
这个参数的是意思是每5分钟，服务器向客户端发一个消息，用于保持连接
service sshd reload 生效
从客户端入手：
上面是配置需要服务器权限，如果没有服务器权限则可以使用这个方法，其思想是：客户端向服务器发一个消息，用于保持连接
secureCRT在选项 终端 反空闲 中设置每隔多少秒发送一个字符串，或者是NO-OP协议包
putty：putty -&#62; Connection -&#62; Seconds between keepalives ( 0 to turn off ), 默认为0, 改为300.
]]></description>
			<content:encoded><![CDATA[<p>为什么<strong>SecureCRT</strong>连接到sshd服务器后在一段时间内不操作就会自动断开呢？</p>
<p><strong>SecureCRT <strong>保持连接</strong></strong></p>
<p>原因：<br />
这是因为客户端与服务器之间存在路由器，防火墙以及为了本身的安全性，在超过特定的时间后就会把空闲连接断开。或者是服务器端设置了断开空闲连接。</p>
<p>解决方法：<br />
既然会断开超时的空闲连接，那么我们就应该让客户端与服务器之间的连接“忙”起来，方法有两个:</p>
<p>从服务器方面入手：<br />
修改/etc/ssh/sshd_config配置文件 ClientAliveInterval 300（默认为0）<br />
这个参数的是意思是每5分钟，服务器向客户端发一个消息，用于<strong>保持连接</strong><br />
service sshd reload 生效</p>
<p>从客户端入手：<br />
上面是配置需要服务器权限，如果没有服务器权限则可以使用这个方法，其思想是：客户端向服务器发一个消息，用于<strong>保持连接</strong><br />
<strong>secureCRT</strong>在选项 终端 反空闲 中设置每隔多少秒发送一个字符串，或者是NO-OP协议包<br />
putty：putty -&gt; Connection -&gt; Seconds between keepalives ( 0 to turn off ), 默认为0, 改为300.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.588k.com/?feed=rss2&amp;p=203</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
