<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>wolfg&#039;s Weblog &#187; Linux</title>
	<atom:link href="http://guoyong.me/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://guoyong.me</link>
	<description>wolfg&#039;s journey with open source, linux, programming, sysadm ...</description>
	<lastBuildDate>Wed, 04 Apr 2012 12:42:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/cn/</creativeCommons:license>		<item>
		<title>笔记本Gentoo系统升级</title>
		<link>http://guoyong.me/linux/upgrade-gentoo-on-my-notebook/</link>
		<comments>http://guoyong.me/linux/upgrade-gentoo-on-my-notebook/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 03:41:17 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Using Desktop]]></category>
		<category><![CDATA[fluxbox]]></category>
		<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://guoyong.me/?p=955</guid>
		<description><![CDATA[利用假期把笔记本上的Gentoo系统升级到了最新版，改动的地方记录如下： urxvt无法运行 urxvt: unable to load base fontset USE参数添加了xft，重新编译安装就好了。 # USE=&#34;truetype perl afterimage iso14755 256-color xft&#34; emerge -av rxvt-unicode Fluxbox菜单里的屏幕截图工具不工作，其实就是ImageMagick的import命令找不到动态库了，重新安装ImageMagick解决。 Slim登录界面，又提示输入用户名了。解决方法：修改/etc/slim.conf添加default&#92;_user = guoyong，并设置focus&#92;_password = yes sudo又要密码了，这个和上一条都是etc-update 运行的后果，配置文件都被覆盖了，下次升级得注意避免。重新visudo设置不需要密码 &#160;guoyong ALL=(ALL) NOPASSWD: ALL 进入Fluxbox后显示Wicd Network Manager窗口，修改.fluxbox/startup 给wicd-gtk添加-t选项 &#160;wicd-gtk -t &#38;amp; 弃用ibus，改用fcitx 弃用conky &#8230; <a href="http://guoyong.me/linux/upgrade-gentoo-on-my-notebook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>利用假期把笔记本上的Gentoo系统升级到了最新版，改动的地方记录如下：</p>
<ol>
<li>
<p>urxvt无法运行</p>
<pre>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">urxvt: unable to load base fontset</div></div>
</pre>
<p>USE参数添加了xft，重新编译安装就好了。</p>
<pre>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># USE=&quot;truetype perl afterimage iso14755 256-color xft&quot; emerge -av rxvt-unicode</div></div>
</pre>
</li>
<li>
<p>Fluxbox菜单里的屏幕截图工具不工作，其实就是ImageMagick的import命令找不到动态库了，重新安装ImageMagick解决。</p>
</li>
<li>
<p>Slim登录界面，又提示输入用户名了。解决方法：修改/etc/slim.conf添加default&#92;_user = guoyong，并设置focus&#92;_password = yes</p>
</li>
<li>
<p>sudo又要密码了，这个和上一条都是etc-update 运行的后果，配置文件都被覆盖了，下次升级得注意避免。重新visudo设置不需要密码</p>
<pre>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;guoyong ALL=(ALL) NOPASSWD: ALL</div></div>
</pre>
</li>
<li>
<p>进入Fluxbox后显示Wicd Network Manager窗口，修改.fluxbox/startup 给wicd-gtk添加-t选项</p>
<pre>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;wicd-gtk -t &amp;amp;</div></div>
</pre>
</li>
<li>
<p>弃用ibus，改用fcitx</p>
</li>
<li>
<p>弃用conky</p>
</li>
<li>
<p>添加idesk和dockapps （wmMoonclock, wmcpuload, wmnd, wmweather）</p>
</li>
<li>
<p>无线网卡驱动需要编译新内核 kernel-3.2.12 ，同时加上了对fbsplash的支持</p>
</li>
<li>
<p>fbsplash使用livedvd-12.0的主题，桌面壁纸找了一张Fluxbox的。</p>
</li>
</ol>
<p><a href="http://guoyong.me/blog/wp-content/uploads/2012/04/screenshot.png" rel="lightbox[955]"><img src="http://guoyong.me/blog/wp-content/uploads/2012/04/screenshot-1024x640.png" alt="" title="screenshot" width="584" height="365" class="alignnone size-large wp-image-957" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/upgrade-gentoo-on-my-notebook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>知道了关于Linux进程的一点事儿</title>
		<link>http://guoyong.me/linux/know-something-about-the-process/</link>
		<comments>http://guoyong.me/linux/know-something-about-the-process/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 03:05:37 +0000</pubDate>
		<dc:creator>guoyong</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[orphant process]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[zombie process]]></category>

		<guid isPermaLink="false">http://guoyong.me/?p=950</guid>
		<description><![CDATA[昨天在乐维参与这两个问题的回答： Unix-like OS是如何有效的查杀orphan process？ Linux对于一个process有最大运行时间限制么？ 搜索过程中也解答了自己对Linux系统进程号一直以来存在的疑问，也加深了对僵尸进程和孤儿进程的理解。帮助别人的同时自己也有收获，这就是知识交流的好处，也是这种社交问答网站的价值所在吧。 关于进程号： 32位系统的最大进程号是32,767，当到达32,768时系统会重新开始计数并从头寻找可用的值给新进程 64位系统的最大进程号是 222 &#8211; 1 = 4,194,303 /proc/sys/kernel/pid_max 保存了这个上限。32位和64位系统的默认值都是32,768。 搜索到的两篇文章： http://www.refining-linux.org/archives/7/Dr.-Frankenlinux-or-how-to-create-zombie-processes/ http://www.geekride.com/orphan-zombie-process/]]></description>
			<content:encoded><![CDATA[<p>昨天在<a href="http://leweiup.com">乐维</a>参与这两个问题的回答：</p>
<ul>
<li><a href="http://leweiup.com/questions/728">Unix-like OS是如何有效的查杀orphan process？</a></li>
<li><a href="http://leweiup.com/questions/729">Linux对于一个process有最大运行时间限制么？</a></li>
</ul>
<p>搜索过程中也解答了自己对Linux系统进程号一直以来存在的疑问，也加深了对僵尸进程和孤儿进程的理解。帮助别人的同时自己也有收获，这就是知识交流的好处，也是这种社交问答网站的价值所在吧。</p>
<p>关于进程号：</p>
<ul>
<li>32位系统的最大进程号是32,767，当到达32,768时系统会重新开始计数并从头寻找可用的值给新进程</li>
<li>64位系统的最大进程号是 2<sup>22</sup> &#8211; 1 = 4,194,303</li>
<li>/proc/sys/kernel/pid_max 保存了这个上限。32位和64位系统的默认值都是32,768。</li>
</ul>
<p>搜索到的两篇文章：</p>
<ul>
<li>http://www.refining-linux.org/archives/7/Dr.-Frankenlinux-or-how-to-create-zombie-processes/</li>
<li>http://www.geekride.com/orphan-zombie-process/</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/know-something-about-the-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用于修复旧的下载链接的Nginx Rewrite规则</title>
		<link>http://guoyong.me/linux/nginx-the-rewrite-url-based-on-get-parameter/</link>
		<comments>http://guoyong.me/linux/nginx-the-rewrite-url-based-on-get-parameter/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 14:18:12 +0000</pubDate>
		<dc:creator>guoyong</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://guoyong.me/?p=926</guid>
		<description><![CDATA[旧的下载链接是这样的： /?dl=file 由于原来处理下载请求的插件不工作了，所以就用Nginx的rewrite来修复。 &#160;if ($args ~* &#34;^dl=(.*)&#34;) { &#160; &#160; &#160;set $f $1; &#160; &#160; &#160;rewrite ^.*$ /downloads/$f last; &#160;}]]></description>
			<content:encoded><![CDATA[<p>旧的下载链接是这样的：</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/?dl=file</div></div>
<p>由于原来处理下载请求的插件不工作了，所以就用Nginx的rewrite来修复。</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;if ($args ~* &quot;^dl=(.*)&quot;) {<br />
&nbsp; &nbsp; &nbsp;set $f $1;<br />
&nbsp; &nbsp; &nbsp;rewrite ^.*$ /downloads/$f last;<br />
&nbsp;}</div></div>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/nginx-the-rewrite-url-based-on-get-parameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我的Fluxbox配置</title>
		<link>http://guoyong.me/oss/my-fluxbox-config/</link>
		<comments>http://guoyong.me/oss/my-fluxbox-config/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 06:43:51 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[Using Desktop]]></category>
		<category><![CDATA[bitbucket]]></category>
		<category><![CDATA[fluxbox]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=898</guid>
		<description><![CDATA[https://bitbucket.org/wolfg/myfluxbox]]></description>
			<content:encoded><![CDATA[<p><a href="https://bitbucket.org/wolfg/myfluxbox" title="my-fluxbox-config" target="_blank">https://bitbucket.org/wolfg/myfluxbox</a></p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/oss/my-fluxbox-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A screenshot of my desktop</title>
		<link>http://guoyong.me/linux/a-screenshot-of-my-desktop/</link>
		<comments>http://guoyong.me/linux/a-screenshot-of-my-desktop/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 05:24:00 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Using Desktop]]></category>
		<category><![CDATA[fluxbox]]></category>
		<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://guoyong.org/2012/03/04/a-screenshot-of-my-desktop/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a rel="lightbox" href="http://guoyong.org/blog/wp-content/uploads/2012/03/screenshot.png"><img src="http://guoyong.org/blog/wp-content/uploads/2012/03/screenshot-1024x640.png" alt="" title="screenshot" width="584" height="365" class="alignnone size-large wp-image-881" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/a-screenshot-of-my-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MongoDB日志回滚</title>
		<link>http://guoyong.me/linux/sysadm/mongodb%e6%97%a5%e5%bf%97%e5%9b%9e%e6%bb%9a/</link>
		<comments>http://guoyong.me/linux/sysadm/mongodb%e6%97%a5%e5%bf%97%e5%9b%9e%e6%bb%9a/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 00:51:02 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[运维]]></category>
		<category><![CDATA[mongodb]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=641</guid>
		<description><![CDATA[# kill -SIGUSR1 `cat /var/run/mongodb.pid` 用在shell脚本里时，命令要改成这样： kill -USR1 `cat /var/run/mongodb.pid` 参考：http://www.mongodb.org/display/DOCS/Logging#Logging-Rotatingthelogfiles]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># kill -SIGUSR1 `cat /var/run/mongodb.pid`</div></div>
<p>用在shell脚本里时，命令要改成这样： kill -USR1 `cat /var/run/mongodb.pid` </p>
<p>参考：http://www.mongodb.org/display/DOCS/Logging#Logging-Rotatingthelogfiles   </p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/mongodb%e6%97%a5%e5%bf%97%e5%9b%9e%e6%bb%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL5下编译MongoDB</title>
		<link>http://guoyong.me/linux/sysadm/rhel5%e4%b8%8b%e7%bc%96%e8%af%91mongodb/</link>
		<comments>http://guoyong.me/linux/sysadm/rhel5%e4%b8%8b%e7%bc%96%e8%af%91mongodb/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 06:21:29 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[运维]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mongodb]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=630</guid>
		<description><![CDATA[很多人都说自己编译的稳定好用，我也来试试： 1. 参考官方文档，手工编译Spider Monkey # curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz # tar zxvf js-1.7.0.tar.gz # cd js/src # export CFLAGS=&#34;-DJS_C_STRINGS_ARE_UTF8&#34; # make -f Makefile.ref # JS_DIST=/usr make -f Makefile.ref export 2. 安装scons，用官网的rpm包就行。 3. 重新编译pcre。自带的编译时没带&#8211;enable-unicode-properties参数，mongdb启动时会提示：warning: some regex utf8 things will not work. pcre &#8230; <a href="http://guoyong.me/linux/sysadm/rhel5%e4%b8%8b%e7%bc%96%e8%af%91mongodb/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>很多人都说自己编译的稳定好用，我也来试试：</p>
<p>1. 参考官方文档，手工编译Spider Monkey</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz<br />
# tar zxvf js-1.7.0.tar.gz<br />
# cd js/src<br />
# export CFLAGS=&quot;-DJS_C_STRINGS_ARE_UTF8&quot;<br />
# make -f Makefile.ref<br />
# JS_DIST=/usr make -f Makefile.ref export</div></div>
<p>2. 安装scons，用<a href="http://www.scons.org/download.php">官网</a>的rpm包就行。</p>
<p>3. 重新编译pcre。自带的编译时没带&#8211;enable-unicode-properties参数，mongdb启动时会提示：warning: some regex utf8 things will not work.  pcre build doesn&#8217;t have &#8211;enable-unicode-properties. RPMS包是在<a href="http://rpm.pbone.net/">这里</a>找到的。</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># rpm -ivh pcre-6.6-2.el5_1.7.src.rpm<br />
# vi /usr/src/redhat/SPECS/pcre.spec<br />
%configure --enable-utf8<br />
修改成<br />
%configure --enable-utf8 --enable-unicode-properties<br />
# rpmbuild -ba /usr/src/redhat/SPECS/pcre.spec<br />
# rpm -Uvh /usr/src/redhat/RPMS/x86_64/pcre*.rpm</div></div>
<p>4. 安装1.41版本的boost库。<a href="http://pkgs.org/centos-5-rhel-5/epel-x86_64/boost141-1.41.0-2.el5.x86_64.rpm.html">这里</a>可以找到编译好的boost库的RPM包。因为后面要编译成静态库，还需要安装boost141-static-1.41.0-2.el5.i386.rpm</p>
<p>5. 开始编译MongoDB</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># cd mongodb-src-r1.8.1<br />
# scons --libpath=/usr/lib64/boost141/ \<br />
&nbsp; &nbsp;--cpppath=/usr/include/boost141/ \<br />
&nbsp; &nbsp;--release --64 --static all</div></div>
<p>如果你没有&#8211;release和&#8211;static选项，可能会看见下面这样的消息<br />
 *** notice: no readline library, mongo shell will not have nice interactive line editing ***<br />
解决方法是加上&#8211;extralib=ncurses。</p>
<p>6. 安装</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># cd mongodb-src-r1.8.1<br />
# scons --libpath=/usr/lib64/boost141/ \<br />
&nbsp; &nbsp;--cpppath=/usr/include/boost141/ \<br />
&nbsp; &nbsp;--release --64 --static --prefix=/opt/mongo-1.8.1 install</div></div>
<p>参考：<br />
1. <a href="http://www.mongodb.org/display/DOCS/Building+for+Linux">http://www.mongodb.org/display/DOCS/Building+for+Linux</a><br />
2. <a href="http://hi.baidu.com/farmerluo/blog/item/37364623f35ba55e9922ed2f.html">http://hi.baidu.com/farmerluo/blog/item/37364623f35ba55e9922ed2f.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/rhel5%e4%b8%8b%e7%bc%96%e8%af%91mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Postgresql</title>
		<link>http://guoyong.me/linux/sysadm/using-postgresql/</link>
		<comments>http://guoyong.me/linux/sysadm/using-postgresql/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 05:56:45 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=595</guid>
		<description><![CDATA[1. create tablespace $ mkdir -p /home/postgresql/data $ sudo chown -R postres:postres /home/postgresql/data $ sudo chmod -R og-rx /home/postgresql/data $ sudo su &#8211; postgres $ psql postgres=# create tablespace newspace location &#8216;/home/postgresql/data&#8217;; 2. move a database to this new tablespace &#8230; <a href="http://guoyong.me/linux/sysadm/using-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1. create tablespace<br />
$ mkdir -p /home/postgresql/data<br />
$ sudo chown -R postres:postres /home/postgresql/data<br />
$ sudo chmod -R og-rx /home/postgresql/data<br />
$ sudo su &#8211; postgres<br />
$ psql<br />
postgres=# create tablespace newspace location &#8216;/home/postgresql/data&#8217;;</p>
<p>2. move a database to this new tablespace<br />
use a php script from <a href="http://blog.lodeblomme.be/2008/03/15/move-a-postgresql-database-to-a-different-tablespace/">here</a> to generate sql<br />
$ sudo yum install php-pgsql<br />
$ ./generate-mv-db.php<br />
$ sudo su &#8211; postgres<br />
$ psql -d mydb -f migrate_localhost_mydb_newspace.sql</p>
<p>3. install postgis<br />
a. install proj4.7<br />
$ sudo yum install proj<br />
b. install geos 3.2.2<br />
$ tar xvjf geos-3.2.2.tar.bz2<br />
$ cd geos-3.2.2<br />
$ ./configure &#8211;prefix=/usr<br />
$ make &#038;&#038; sudo make install<br />
$ sudo ldconfig </p>
<blockquote><p> must do this, otherwise postgis will fail to locate libgeos_c.so.1
</p></blockquote>
<p>c. install postgis-1.5.1.tar.gz<br />
$ tar xvzf postgis-1.5.1.tar.gz<br />
$ cd postgis-1.5.1<br />
$ ./configure<br />
$ make &#038;&#038; sudo make install<br />
d. create a spatially-enabled database<br />
$ sudo su &#8211; postgres<br />
$ createdb postgis_template -U postgres;<br />
$ cd /usr/share/pgsql/contrib/postgis-1.5<br />
$ createlang plpgsql postgis_template<br />
$ psql -d postgis_template -f postgis.sql<br />
$ psql -d postgis_template -f spatial_ref_sys.sql</p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/using-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>给虚拟机的虚拟硬盘增加容量(vmdk file)</title>
		<link>http://guoyong.me/linux/using-ubuntu-desktop/%e7%bb%99%e8%99%9a%e6%8b%9f%e6%9c%ba%e7%9a%84%e8%99%9a%e6%8b%9f%e7%a1%ac%e7%9b%98%e5%a2%9e%e5%8a%a0%e5%ae%b9%e9%87%8fvmdk-file/</link>
		<comments>http://guoyong.me/linux/using-ubuntu-desktop/%e7%bb%99%e8%99%9a%e6%8b%9f%e6%9c%ba%e7%9a%84%e8%99%9a%e6%8b%9f%e7%a1%ac%e7%9b%98%e5%a2%9e%e5%8a%a0%e5%ae%b9%e9%87%8fvmdk-file/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 09:56:03 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Using Desktop]]></category>
		<category><![CDATA[gparted]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmdk]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vmware-player]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=576</guid>
		<description><![CDATA[我使用虚拟机主要是为了使用Windows XP系统来访问网银、进行在线支付。当初安装时是用VMWare Player的，后来换成了VirtualBox 3。Windows XP越来越臃肿，虚拟机硬盘空间不够了。在网上搜索后找到了增加虚拟硬盘容量的方法：使用QEMN和GParted，不用安装“庞大”的VMWare软件。特别说明一下最初创建虚拟硬盘时也是使用的QEMU工具。 具体步骤如下： 1. VMDK格式转成RAW格式 $ qemu-img convert -f vmdk winxp.vmdk -O raw winxp.raw 2. 新建一个RAW格式的文件，后面会用到 $ qemu-img create -f raw temp.img 512M 3. 用cat命令把temp.img多次追加到winxp.raw文件后，达到扩容的目的。 $ cat winxp.raw temp.img temp.img temp.img temp.img temp.img temp.img temp.img temp.img &#62; &#8230; <a href="http://guoyong.me/linux/using-ubuntu-desktop/%e7%bb%99%e8%99%9a%e6%8b%9f%e6%9c%ba%e7%9a%84%e8%99%9a%e6%8b%9f%e7%a1%ac%e7%9b%98%e5%a2%9e%e5%8a%a0%e5%ae%b9%e9%87%8fvmdk-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>我使用虚拟机主要是为了使用Windows XP系统来访问网银、进行在线支付。当初安装时是用VMWare Player的，后来换成了VirtualBox 3。Windows XP越来越臃肿，虚拟机硬盘空间不够了。在网上搜索后找到了增加虚拟硬盘容量的方法：使用<a href="http://wiki.qemu.org/Main_Page">QEMN</a>和<a href="http://gparted.sourceforge.net/">GParted</a>，不用安装“庞大”的VMWare软件。特别说明一下最初创建虚拟硬盘时也是使用的QEMU工具。</p>
<p>具体步骤如下：<br />
1. VMDK格式转成RAW格式</p>
<div class="hl-surround"><div class="hl-main">$ qemu-img convert -f vmdk winxp.vmdk -O raw winxp.raw</div></div>
<p>2. 新建一个RAW格式的文件，后面会用到</p>
<div class="hl-surround"><div class="hl-main">$ qemu-img create -f raw temp.img 512M</div></div>
<p>3. 用cat命令把temp.img多次追加到winxp.raw文件后，达到扩容的目的。</p>
<div class="hl-surround"><div class="hl-main">$ cat winxp.raw temp.img temp.img temp.img temp.img temp.img temp.img temp.img temp.img &gt; winxp.img</div></div>
<p>4. 再转成原来的VMDK格式</p>
<div class="hl-surround"><div class="hl-main">$ qemu-img convert -f raw winxp.img -O vmdk winxp.vmdk</div></div>
<p>5. 用下载Gparted Live CD 的iso文件作为光盘启动虚拟机，可以看到硬盘物理空间已经变成了8G。修改硬盘上面的分区大小就行了，也可以创建新的分区。<br />
<a href="http://guoyong.org/blog/wp-content/uploads/gparted.png" rel="lightbox[576]"><img src="http://guoyong.org/blog/wp-content/uploads/gparted-300x197.png" alt="" title="进行中" width="300" height="197" class="alignnone size-medium wp-image-586" /></a><a href="http://guoyong.org/blog/wp-content/uploads/gparted2.png" rel="lightbox[576]"><img src="http://guoyong.org/blog/wp-content/uploads/gparted2-300x197.png" alt="" title="修改成功" width="300" height="197" class="alignnone size-medium wp-image-587" /></a></p>
<p>参考:</p>
<p>http://www.cyberciti.biz/tips/howto-resize-vmware-virtual-harddisk-size.html#comments</p>
<p>http://qemu-forum.ipi.fi/viewtopic.php?t=846&#038;highlight=</p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/using-ubuntu-desktop/%e7%bb%99%e8%99%9a%e6%8b%9f%e6%9c%ba%e7%9a%84%e8%99%9a%e6%8b%9f%e7%a1%ac%e7%9b%98%e5%a2%9e%e5%8a%a0%e5%ae%b9%e9%87%8fvmdk-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH:不用密码登录</title>
		<link>http://guoyong.me/linux/sysadm/%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e6%9d%a5ssh%e7%99%bb%e5%bd%95/</link>
		<comments>http://guoyong.me/linux/sysadm/%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e6%9d%a5ssh%e7%99%bb%e5%bd%95/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 08:31:22 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=569</guid>
		<description><![CDATA[用SSH登录远程主机，每次都输入密码挺麻烦的，其实可以用密钥文件来登录： 1. 用ssh-keygen命令生成private/public密钥对，提示问题都用默认回答即可。 $ ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/home/guoyong/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/guoyong/.ssh/id_rsa.Your public key has been saved in &#8230; <a href="http://guoyong.me/linux/sysadm/%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e6%9d%a5ssh%e7%99%bb%e5%bd%95/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>用SSH登录远程主机，每次都输入密码挺麻烦的，其实可以用密钥文件来登录：<br />
1. 用ssh-keygen命令生成private/public密钥对，提示问题都用默认回答即可。</p>
<div class="hl-surround"><div class="hl-main">$ ssh-keygen<br />Generating public/private rsa key pair.<br />Enter file in which to save the key (/home/guoyong/.ssh/id_rsa): <br />Enter passphrase (empty for no passphrase): <br />Enter same passphrase again: <br />Your identification has been saved in /home/guoyong/.ssh/id_rsa.<br />Your public key has been saved in /home/guoyong/.ssh/id_rsa.pub.</div></div>
<p>2. 用ssh-copy-id命令把公钥复制到远程主机上，user就是你登录用的用户名</p>
<div class="hl-surround"><div class="hl-main">$ ssh-cody-id user@remotehost</div></div>
<p>3. 验证一下吧</p>
<div class="hl-surround"><div class="hl-main">$ ssh user@remotehost echo &quot;it works&quot;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/%e4%b8%8d%e7%94%a8%e5%af%86%e7%a0%81%e6%9d%a5ssh%e7%99%bb%e5%bd%95/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>nrpe使用一例</title>
		<link>http://guoyong.me/linux/sysadm/nrpe%e4%bd%bf%e7%94%a8%e4%b8%80%e4%be%8b/</link>
		<comments>http://guoyong.me/linux/sysadm/nrpe%e4%bd%bf%e7%94%a8%e4%b8%80%e4%be%8b/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 07:22:25 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[监控]]></category>
		<category><![CDATA[运维]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[nrpe]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=548</guid>
		<description><![CDATA[NRPE的作用是在远程主机上运行Nagios插件，以便监控远程主机。 Ubuntu Server下安装NRPE很方便： $ sudo apt-get install nagios-nrpe-server nagios-plugins 默认的几个检查命令(check_users, check_load等)都已经在/etc/naigos/nrpe.cfg和/etc/nagios/nrpe_local.cfg配置好了。在Nagios里配置监控服务使用类似如下的监控命令就可以了： check_command&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;check_nrpe!check_load 如果需要自定义监控命令，只需在/etc/nagios/nrpe_local.cfg里设置，重启NRPE服务，再在Nagios里配置监控服务即可。比如，要添加一个监控TCP各种状态的命令，步骤如下： @remotehost$ cd /usr/lib/nagios/plugins$ sudo wget http://www.tuschy.com/nagios/plugins/check_tcp_count$ sudo chmod +x check_tcp_count$ cd /etc/nagios$ sudo vi nrpe_local.cfgcommand[check_tcp_count]=/usr/lib/nagios/plugins/check_tcp_count$ sudo service nagios-nrpe-server &#8230; <a href="http://guoyong.me/linux/sysadm/nrpe%e4%bd%bf%e7%94%a8%e4%b8%80%e4%be%8b/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>NRPE的作用是在远程主机上运行Nagios插件，以便监控远程主机。</p>
<p>Ubuntu Server下安装NRPE很方便：</p>
<div class="hl-surround"><div class="hl-main">$ sudo apt-get install nagios-nrpe-server nagios-plugins</div></div>
<p>默认的几个检查命令(check_users, check_load等)都已经在/etc/naigos/nrpe.cfg和/etc/nagios/nrpe_local.cfg配置好了。在Nagios里配置监控服务使用类似如下的监控命令就可以了：</p>
<div class="hl-surround"><div class="hl-main">check_command&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;check_nrpe!check_load</div></div>
<p>如果需要自定义监控命令，只需在/etc/nagios/nrpe_local.cfg里设置，重启NRPE服务，再在Nagios里配置监控服务即可。比如，要添加一个监控TCP各种状态的命令，步骤如下：</p>
<div class="hl-surround"><div class="hl-main">@remotehost<br />$ cd /usr/lib/nagios/plugins<br />$ sudo wget http://www.tuschy.com/nagios/plugins/check_tcp_count<br />$ sudo chmod +x check_tcp_count<br />$ cd /etc/nagios<br />$ sudo vi nrpe_local.cfg<br />command[check_tcp_count]=/usr/lib/nagios/plugins/check_tcp_count<br />$ sudo service nagios-nrpe-server restart<br /><br />@nagioshost<br />$ sudo vi remotehost.cfg<br />define service{<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;use&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; generic-service<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;host_name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remotehostname<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;service_description&nbsp; &nbsp; &nbsp; &nbsp; Tcp count<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;check_command&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; check_nrpe!check_tcp_count<br />}</div></div>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/nrpe%e4%bd%bf%e7%94%a8%e4%b8%80%e4%be%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用Cacti监控JVM</title>
		<link>http://guoyong.me/linux/sysadm/%e4%bd%bf%e7%94%a8cacti%e7%9b%91%e6%8e%a7jvm/</link>
		<comments>http://guoyong.me/linux/sysadm/%e4%bd%bf%e7%94%a8cacti%e7%9b%91%e6%8e%a7jvm/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 08:55:59 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[监控]]></category>
		<category><![CDATA[运维]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=512</guid>
		<description><![CDATA[Cacti官方论坛里有几个监控JVM的模板： http://forums.cacti.net/about19761.html http://forums.cacti.net/post-112268.html 导入到Cacti后，需要启用JVM的SNMP Agent，方法如下： 1. 启动JVM的参数里加入-Dcom.sun.management.snmp.port=9998 这个是指定SNMP Agent的监听端口。 2. 设置访问权限 $ sudo cp $JRE_HOME/lib/management/snmp.acl.template $JRE_HOME/lib/management/snmp.acl$ sudo vi $JRE_HOME/lib/management/snmp.aclacl = {&#160; {&#160;&#160; &#160;communities = public, private&#160;&#160; &#160;access = read-only&#160;&#160; &#160;managers = localhost&#160; }}trap = {&#160; {&#160;&#160; &#160;trap-community = public&#160;&#160; &#160;hosts &#8230; <a href="http://guoyong.me/linux/sysadm/%e4%bd%bf%e7%94%a8cacti%e7%9b%91%e6%8e%a7jvm/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Cacti官方论坛里有几个监控JVM的模板：</p>
<ul>
<li><a href="http://forums.cacti.net/about19761.html">http://forums.cacti.net/about19761.html</a></li>
<li>
<a href="http://forums.cacti.net/post-112268.html">http://forums.cacti.net/post-112268.html</a></li>
</ul>
<p>导入到Cacti后，需要启用JVM的SNMP Agent，方法如下：<br />
1. 启动JVM的参数里加入-Dcom.sun.management.snmp.port=9998 这个是指定SNMP Agent的监听端口。<br />
2. 设置访问权限</p>
<div class="hl-surround"><div class="hl-main">$ sudo cp $JRE_HOME/lib/management/snmp.acl.template $JRE_HOME/lib/management/snmp.acl<br />$ sudo vi $JRE_HOME/lib/management/snmp.acl<br /><br />acl = {<br />&nbsp; {<br />&nbsp;&nbsp; &nbsp;communities = public, private<br />&nbsp;&nbsp; &nbsp;access = read-only<br />&nbsp;&nbsp; &nbsp;managers = localhost<br />&nbsp; }<br />}<br /><br />trap = {<br />&nbsp; {<br />&nbsp;&nbsp; &nbsp;trap-community = public<br />&nbsp;&nbsp; &nbsp;hosts = localhost<br />&nbsp; }<br />}</div></div>
<p>3. 设置配置文件的权限，必须只能为启用JVM的用户只读，否则不能工作。(management.properties不用修改，使用默认配置即可)</p>
<div class="hl-surround"><div class="hl-main">$ sudo chmod 600 management.properties snmp.acl<br />$ sudo chown jetty management.properties snmp.acl</div></div>
<p>4. 重启JVM，用netstat命令检查9998端口是否已被监听或用snmpwalk命令检查。</p>
<div class="hl-surround"><div class="hl-main">$ sudo netstat -tlunp |grep 9998<br />$ snmpwalk -v 2c -c public localhost:9998 .1.3.6.1.4.1.42</div></div>
<p>5. 为了让远程的Cacti主机可以访问，可使用snmpd的proxy功能将请求转发到localhost的JVM SNMP Agent上。修改snmpd的配置文件，添加<br />
proxy -v 2c -c public localhost:9998 .1.3.6.1.4.1.42<br />
然后重启snmpd服务。在Cacti主机上以snmpwalk命令检查，应该能得到与上一步中snmpwalk命令一样的输出。snmpwalk -v 2c -c public remotehost .1.3.6.1.4.1.42<br />
6. 至此，可以在Cacti里为JVM主机添加监控图表了，注意Device的SNMP Options配置里SNMP Version要选择Version 2。</p>
<p>参考：</p>
<ul>
<li><a href="http://java.sun.com/javase/6/docs/technotes/guides/management/snmp.html">http://java.sun.com/javase/6/docs/technotes/guides/management/snmp.html</a></li>
<li>
<a href="http://www.fifi.org/cgi-bin/man2html/usr/share/man/man5/snmpd.conf.5snmp.gz">http://www.fifi.org/cgi-bin/man2html/usr/share/man/man5/snmpd.conf.5snmp.gz</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/%e4%bd%bf%e7%94%a8cacti%e7%9b%91%e6%8e%a7jvm/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>登录窗口有多个Xfce会话供选择，怎么回事？</title>
		<link>http://guoyong.me/linux/using-ubuntu-desktop/%e7%99%bb%e5%bd%95%e7%aa%97%e5%8f%a3%e6%9c%89%e5%a4%9a%e4%b8%aaxfce%e4%bc%9a%e8%af%9d%e4%be%9b%e9%80%89%e6%8b%a9%ef%bc%8c%e6%80%8e%e4%b9%88%e5%9b%9e%e4%ba%8b%ef%bc%9f/</link>
		<comments>http://guoyong.me/linux/using-ubuntu-desktop/%e7%99%bb%e5%bd%95%e7%aa%97%e5%8f%a3%e6%9c%89%e5%a4%9a%e4%b8%aaxfce%e4%bc%9a%e8%af%9d%e4%be%9b%e9%80%89%e6%8b%a9%ef%bc%8c%e6%80%8e%e4%b9%88%e5%9b%9e%e4%ba%8b%ef%bc%9f/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 12:44:40 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Using Desktop]]></category>
		<category><![CDATA[gdm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xfce]]></category>
		<category><![CDATA[xsessions]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=558</guid>
		<description><![CDATA[登录窗口里选择会话的地方，一直有两个Xfce Session，登录后似乎略有不同。其实是在/usr/share/xsessions目录有一个符号链接default.desktop指向了xfce.desktop，删掉它后就可以了，也不影响什么。]]></description>
			<content:encoded><![CDATA[<p>登录窗口里选择会话的地方，一直有两个Xfce Session，登录后似乎略有不同。其实是在/usr/share/xsessions目录有一个符号链接default.desktop指向了xfce.desktop，删掉它后就可以了，也不影响什么。</p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/using-ubuntu-desktop/%e7%99%bb%e5%bd%95%e7%aa%97%e5%8f%a3%e6%9c%89%e5%a4%9a%e4%b8%aaxfce%e4%bc%9a%e8%af%9d%e4%be%9b%e9%80%89%e6%8b%a9%ef%bc%8c%e6%80%8e%e4%b9%88%e5%9b%9e%e4%ba%8b%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>找回消失的Notification Area(Xubuntu)</title>
		<link>http://guoyong.me/linux/using-ubuntu-desktop/%e6%89%be%e5%9b%9e%e7%9c%8b%e4%b8%8d%e8%a7%81%e7%9a%84notification-areaxubuntu/</link>
		<comments>http://guoyong.me/linux/using-ubuntu-desktop/%e6%89%be%e5%9b%9e%e7%9c%8b%e4%b8%8d%e8%a7%81%e7%9a%84notification-areaxubuntu/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 11:48:43 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Using Desktop]]></category>
		<category><![CDATA[notification area]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xfce]]></category>
		<category><![CDATA[xfce-panel]]></category>
		<category><![CDATA[xubuntu]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=556</guid>
		<description><![CDATA[美化桌面的时候会遇到通知区域(Notification Area)Applet不见了的情况，试图再加一个到面板上也会报类似“通知区域已经存在”的错误。 解决办法是检查~/.config/xfce4/panel目录下有没有名字以systray开头的文件，删掉这些文件。 rm ~/.config/xfce4/panel/systray* 再编辑~/.config/xfce4/panel/panels.xml这个文件，如果有一行包含systray的，也删掉。 再次登入后，重新添加通知区域到面板就可以了。]]></description>
			<content:encoded><![CDATA[<p>美化桌面的时候会遇到通知区域(Notification Area)Applet不见了的情况，试图再加一个到面板上也会报类似“通知区域已经存在”的错误。</p>
<p>解决办法是检查~/.config/xfce4/panel目录下有没有名字以systray开头的文件，删掉这些文件。<br />
rm ~/.config/xfce4/panel/systray*<br />
再编辑~/.config/xfce4/panel/panels.xml这个文件，如果有一行包含systray的，也删掉。</p>
<p>再次登入后，重新添加通知区域到面板就可以了。</p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/using-ubuntu-desktop/%e6%89%be%e5%9b%9e%e7%9c%8b%e4%b8%8d%e8%a7%81%e7%9a%84notification-areaxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>再次遭遇大量CLOSE_WAIT</title>
		<link>http://guoyong.me/linux/sysadm/%e5%86%8d%e6%ac%a1%e9%81%ad%e9%81%87%e5%a4%a7%e9%87%8fclose_wait/</link>
		<comments>http://guoyong.me/linux/sysadm/%e5%86%8d%e6%ac%a1%e9%81%ad%e9%81%87%e5%a4%a7%e9%87%8fclose_wait/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 12:51:05 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[CLOSE_WAIT]]></category>
		<category><![CDATA[HttpClient]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tcp]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=543</guid>
		<description><![CDATA[今天下午线上的Jetty服务又停止响应了。不过与上次不同的是，日志里没有Too many open files的问题（看来ulimit设置管用了），看不出任何问题。于是用netstat检查网络连接，发现了大量CLOSE_WAIT状态的连接，而且都是连接到同一个IP地址。联想到程序里有调用外部网站服务的部分，检查这个IP，正是其中的一个服务。检查代码，发现开发人员使用Commons HttpClient时出了问题，居然忘记关闭连接了(method.releaseConnection();)！！后果就是对方关闭了连接，连接不断地变成CLOSE_WAIT状态，直到耗尽所有的网络资源，没法再建立连接了。 从这个教训看出，项目的研发管理真是没有到位啊！快速反复的需求、几乎可以忽略的设计、缺少代码走查、没有单元测试，怎能保证上线前发现这样的问题！]]></description>
			<content:encoded><![CDATA[<p>今天下午线上的Jetty服务又停止响应了。不过与上次不同的是，日志里没有Too many open files的问题（看来ulimit设置管用了），看不出任何问题。于是用netstat检查网络连接，发现了大量CLOSE_WAIT状态的连接，而且都是连接到同一个IP地址。联想到程序里有调用外部网站服务的部分，检查这个IP，正是其中的一个服务。检查代码，发现开发人员使用Commons HttpClient时出了问题，居然忘记关闭连接了(method.releaseConnection();)！！后果就是对方关闭了连接，连接不断地变成CLOSE_WAIT状态，直到耗尽所有的网络资源，没法再建立连接了。</p>
<p>从这个教训看出，项目的研发管理真是没有到位啊！快速反复的需求、几乎可以忽略的设计、缺少代码走查、没有单元测试，怎能保证上线前发现这样的问题！</p>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.me/linux/sysadm/%e5%86%8d%e6%ac%a1%e9%81%ad%e9%81%87%e5%a4%a7%e9%87%8fclose_wait/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.661 seconds -->

