<?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>LiangXu Wang</title>
	<atom:link href="http://wlx.westgis.ac.cn/feed/" rel="self" type="application/rss+xml" />
	<link>http://wlx.westgis.ac.cn</link>
	<description>technology backup/share</description>
	<lastBuildDate>Sat, 19 May 2012 10:15:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>ubuntu牢骚之一：network manager无法管理单网卡的多个虚拟地址</title>
		<link>http://wlx.westgis.ac.cn/815/</link>
		<comments>http://wlx.westgis.ac.cn/815/#comments</comments>
		<pubDate>Sat, 19 May 2012 10:15:55 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network manager]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=815</guid>
		<description><![CDATA[在使用ubuntu 12.04 unity 作为主力系统进行使用（个人使用ubuntu linux已有5年以上），对当前版本的诸多问题发法牢骚，ubuntu牢骚之一：network manager无法管理单网卡的多个虚拟地址。 到目前为止，使用gnome里的网卡图形管理程序network manange管理网卡依然无法管理一个网卡的多个虚拟地址，如eth0，想要再配置一个内部ip地址eth0:1，在图形界面里就没有什么办法了。（但依稀记得很早gnome的网卡管理程序是没有这个问题的） 解决方案： 停止使用network manage管理网卡，使用/etc/network/interface进行直接管理。 sudo service network-manager stop sudo nano /etc/NetworkManager.conf 将其中的managed=true改为false。 sudo nano /etc/network/interface 直接修改其中的网卡设置即可，然后重新启动网络。 sudo service networking restart 当然，若eth0:1仅为临时使用，那就可以直接使用命令行启动对应的网络，但重启后配置是丢失的。 好消息就是开发人员已经听到了群众的呼声，正在修改对应的程序。]]></description>
			<content:encoded><![CDATA[<p>在使用ubuntu 12.04 unity 作为主力系统进行使用（个人使用ubuntu linux已有5年以上），对当前版本的诸多问题发法牢骚，ubuntu牢骚之一：network manager无法管理单网卡的多个虚拟地址。</p>
<p>到目前为止，使用gnome里的网卡图形管理程序network manange管理网卡依然无法管理一个网卡的多个虚拟地址，如eth0，想要再配置一个内部ip地址eth0:1，在图形界面里就没有什么办法了。（但依稀记得很早gnome的网卡管理程序是没有这个问题的）</p>
<p>解决方案：</p>
<p>停止使用network manage管理网卡，使用/etc/network/interface进行直接管理。</p>
<blockquote><p>
sudo service network-manager stop<br />
sudo nano /etc/NetworkManager.conf</p></blockquote>
<p>将其中的managed=true改为false。</p>
<blockquote><p>sudo nano /etc/network/interface</p></blockquote>
<p>直接修改其中的网卡设置即可，然后重新启动网络。</p>
<blockquote><p>sudo service networking restart</p></blockquote>
<p>当然，若eth0:1仅为临时使用，那就可以直接使用命令行启动对应的网络，但重启后配置是丢失的。</p>
<p>好消息就是<a href="http://brainstorm.ubuntu.com/idea/4/">开发人员已经听到了群众的呼声</a>，正在修改对应的程序。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/815/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用recode工具来转换html entity编码的文件</title>
		<link>http://wlx.westgis.ac.cn/812/</link>
		<comments>http://wlx.westgis.ac.cn/812/#comments</comments>
		<pubDate>Thu, 17 May 2012 13:48:25 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Program]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[recode]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=812</guid>
		<description><![CDATA[之前元数据自动导出的xml文件，里面的汉字内容都是采用html entity来编码的，在浏览器里可以直接看到，但有时需要在console直接查找文本内容，这时就需要将这写编码后的文本进行转译，恢复成为之前的UTF8汉字，发现recode工具就可以完成这个工作。 cat *.xml &#124; recode HTML_4.0 &#124; grep &#8216;地貌&#8217; 还可以用php cli来完成： alias decode=”php -r &#8216;echo html_entity_decode(fgets( STDIN ));&#8217;” $ echo &#8216;Hello, &#38; world! &#34;&#8217; &#124; decode Hello, &#038; world! “ reference： http://stackoverflow.com/questions/3322820/find-replace-htmlentities-using-the-standard-linux-toolchain]]></description>
			<content:encoded><![CDATA[<p>之前元数据自动导出的xml文件，里面的汉字内容都是采用html entity来编码的，在浏览器里可以直接看到，但有时需要在console直接查找文本内容，这时就需要将这写编码后的文本进行转译，恢复成为之前的UTF8汉字，发现recode工具就可以完成这个工作。</p>
<blockquote><p>cat *.xml | recode HTML_4.0 | grep &#8216;地貌&#8217;</p></blockquote>
<p>还可以用php cli来完成：</p>
<blockquote><p>alias decode=”php -r &#8216;echo html_entity_decode(fgets( STDIN ));&#8217;”</p>
<p>$ echo &#8216;Hello, &amp; world! &quot;&#8217; | decode<br />
Hello, &#038; world! “</p></blockquote>
<p>reference： <a href="http://stackoverflow.com/questions/3322820/find-replace-htmlentities-using-the-standard-linux-toolchain">http://stackoverflow.com/questions/3322820/find-replace-htmlentities-using-the-standard-linux-toolchain</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/812/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postgresql数组的使用</title>
		<link>http://wlx.westgis.ac.cn/808/</link>
		<comments>http://wlx.westgis.ac.cn/808/#comments</comments>
		<pubDate>Tue, 15 May 2012 11:00:22 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Program]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=808</guid>
		<description><![CDATA[postgresql可以支持数组，这点在有些时候很有用，但在查询搜索时要注意方法使用，因为数组和集合（行）不同，查询时一般不能直接使用子查询而要使用join。 1. any(array)的使用 select * from dataorder d left join datasource ds on d.uuid=ds.uuid left join source s on ds.sourceid=s.id where d.uuid=any(s.exclude_data) 2. all(array)的使用 要查询上述相反的数据，就可以使用： select * from dataorder d left join datasource ds on d.uuid=ds.uuid left join source s &#8230; <a href="http://wlx.westgis.ac.cn/808/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>postgresql可以支持数组，这点在有些时候很有用，但在查询搜索时要注意方法使用，因为数组和集合（行）不同，查询时一般不能直接使用子查询而要使用join。</p>
<p>1. any(array)的使用</p>
<blockquote><p>select * from dataorder d left join datasource ds on d.uuid=ds.uuid left join source s on ds.sourceid=s.id where d.uuid=any(s.exclude_data)</p></blockquote>
<p>2. all(array)的使用<br />
要查询上述相反的数据，就可以使用：</p>
<blockquote><p>select * from dataorder d left join datasource ds on d.uuid=ds.uuid left join source s on ds.sourceid=s.id where d.uuid<>all(s.exclude_data)</p></blockquote>
<p>reference<br />
1. <a href="http://www.postgresql.org/docs/current/static/arrays.html">http://www.postgresql.org/docs/current/static/arrays.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/808/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>从vmware server 2.0切换到virtualbox</title>
		<link>http://wlx.westgis.ac.cn/802/</link>
		<comments>http://wlx.westgis.ac.cn/802/#comments</comments>
		<pubDate>Sun, 13 May 2012 15:52:09 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=802</guid>
		<description><![CDATA[之前在ubuntu服务器上一直使用vmware server作为虚拟化方案来模拟几个windows服务器，主要是asp的web服务器。但ubuntu升级到12.04之后，发现vmware server彻底罢工了，网上搜索后，发现vmware server在2011年就已经停止支持了，因此需要转换到其他的虚拟方案。 我在ubuntu desktop上也一直有使用virtualbox方案，感觉也还是蛮稳定的，但在服务器上一直没有考虑过此方案，因为服务器上多数情况下都没有安装X Windows支持，但搜索后发现新版本有VBoxHeadLess方案，即其可以不需要对应的X支持。 安装： 除了安装virtualbox之外，还要安装它的extpack，否则vrdp等功能是不起作用的。 cd /tmp wget http://download.virtualbox.org/virtualbox/4.1.14/Oracle_VM_VirtualBox_Extension_Pack-4.1.14-77440.vbox-extpack sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.14-77440.vbox-extpack 因此先在台式机上进行测试： 1. 首先拷贝对应的vmdk文件，然后转换为virtualbox的vdi格式 注意在转换格式之前，应该首先在vmware server中移除vmware tools，否则转换后不能启动，只能作为硬盘读取。 VBoxManage clonehd xxx.vmdk xxx.vdi 2. 然后创建一个新的vm文件 使用图形界面创建也可，也可以使用命令 VBoxManage createvm &#8211;name “win2003&#8243; &#8211;register VBoxManage modifyvm “win2003&#8243; &#8211;memory &#8230; <a href="http://wlx.westgis.ac.cn/802/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>之前在ubuntu服务器上一直使用vmware server作为虚拟化方案来模拟几个windows服务器，主要是asp的web服务器。但ubuntu升级到12.04之后，发现vmware server彻底罢工了，网上搜索后，发现vmware server在2011年就已经停止支持了，因此需要转换到其他的虚拟方案。</p>
<p>我在ubuntu desktop上也一直有使用virtualbox方案，感觉也还是蛮稳定的，但在服务器上一直没有考虑过此方案，因为服务器上多数情况下都没有安装X Windows支持，但搜索后发现新版本有VBoxHeadLess方案，即其可以不需要对应的X支持。</p>
<p>安装： 除了安装virtualbox之外，还要安装它的extpack，否则vrdp等功能是不起作用的。</p>
<blockquote><p>cd /tmp<br />
wget http://download.virtualbox.org/virtualbox/4.1.14/Oracle_VM_VirtualBox_Extension_Pack-4.1.14-77440.vbox-extpack<br />
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.14-77440.vbox-extpack</p></blockquote>
<p>因此先在台式机上进行测试：</p>
<p>1. 首先拷贝对应的vmdk文件，然后转换为virtualbox的vdi格式<br />
注意在转换格式之前，应该首先在vmware server中移除vmware tools，否则转换后不能启动，只能作为硬盘读取。</p>
<blockquote><p>VBoxManage clonehd xxx.vmdk xxx.vdi</p></blockquote>
<p>2. 然后创建一个新的vm文件<br />
使用图形界面创建也可，也可以使用命令</p>
<blockquote><p>
VBoxManage createvm &#8211;name “win2003&#8243; &#8211;register<br />
VBoxManage modifyvm “win2003&#8243; &#8211;memory 512 &#8211;acpi on &#8211;nic1 bridged &#8211;bridgeadapter1 eth0<br />
VBoxManage storagectl “win2003&#8243; &#8211;name “IDE Controller” &#8211;add ide<br />
VBoxManage storageattach “win2003&#8243; &#8211;storagectl “IDE Controller” &#8211;port 0 &#8211;device 0 &#8211;type hdd &#8211;medium win2003.vdi
</p></blockquote>
<p>3. 启动对应的vm</p>
<blockquote><p>VBoxHeadless &#8211;startvm “vm_name” &#8211;vrde=off&#038;</p></blockquote>
<p>后面的vrde参数是强制关闭远程链接，我觉得不需要，不加此参数则默认开启主机的远程桌面链接3389端口。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/802/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>timemap中使用ditu.google.cn服务器后产生黑白地图</title>
		<link>http://wlx.westgis.ac.cn/797/</link>
		<comments>http://wlx.westgis.ac.cn/797/#comments</comments>
		<pubDate>Sun, 13 May 2012 15:31:03 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Program]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[ditu.google.cn]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[maps]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=797</guid>
		<description><![CDATA[好像有较长一段时间了（愚人节之后？），即在timemap浏览时，地图会变为奇怪的8bit颜色，而不是常见的地图形式。经检查，在timemap中，默认的地图类型为G_PHYSICAL_MAP，而在ditu.google.cn中直接浏览则没有问题，所以修改地图类型为mapType:G_NORMAL_MAP即可解决此问题。]]></description>
			<content:encoded><![CDATA[<p>好像有较长一段时间了（愚人节之后？），即在timemap浏览时，地图会变为奇怪的8bit颜色，而不是常见的地图形式。经检查，在timemap中，默认的地图类型为G_PHYSICAL_MAP，而在ditu.google.cn中直接浏览则没有问题，所以修改地图类型为mapType:G_NORMAL_MAP即可解决此问题。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/797/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用ssh tunnel来代理登陆远程postgresql数据库</title>
		<link>http://wlx.westgis.ac.cn/795/</link>
		<comments>http://wlx.westgis.ac.cn/795/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 09:33:26 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[代理]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=795</guid>
		<description><![CDATA[postgresql数据库通常都限定了远程用户访问时的IP地址，因此在出差的时候若想访问数据库服务器就可以使用ssh tunnel来代理登陆。 命令也很简单： ssh -L5432:dbmachine:5432 username@remote_ip 其中，dbmachine为远程数据库所在的服务器所在的IP地址，前面的端口号为本地所用的端口号，后面的端口号为远程数据库所使用的端口号，remote_ip为可以访问数据库服务器的机器。 然后就可以使用pgadmin或者psql来远程访问数据库了： psql -h localhost -p 5432 -d dbname -U username]]></description>
			<content:encoded><![CDATA[<p>postgresql数据库通常都限定了远程用户访问时的IP地址，因此在出差的时候若想访问数据库服务器就可以使用ssh tunnel来代理登陆。<br />
命令也很简单：</p>
<blockquote><p>ssh -L5432:dbmachine:5432 username@remote_ip</p></blockquote>
<p>其中，dbmachine为远程数据库所在的服务器所在的IP地址，前面的端口号为本地所用的端口号，后面的端口号为远程数据库所使用的端口号，remote_ip为可以访问数据库服务器的机器。</p>
<p>然后就可以使用pgadmin或者psql来远程访问数据库了：</p>
<blockquote><p>psql -h localhost -p 5432 -d dbname -U username</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/795/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 11.10 php5运行巨慢的问题</title>
		<link>http://wlx.westgis.ac.cn/792/</link>
		<comments>http://wlx.westgis.ac.cn/792/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 02:53:04 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[fuser]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=792</guid>
		<description><![CDATA[服务器升级到ubuntu 11.10后，经过一段时间的运行，突然发行服务器巨慢，很多软件的log里都提示内存不足，无法fork新进程。远程登录上发现其中有一个进程fuser，占据了大部分的CPU使用时间。 网上搜索后，发现了是PHP5中运行一段时间后会在CRON中执行一段代码而导致产生的问题，在12.04版本中应该已经修复。 具体可以参加以下几个链接： 1. Fuser high CPU usage 2. fuser forking uncontrollably in cron job 修复办法： 直接修改/etc/cron.d/php5文件，让其恢复为11.04的处理方法： 09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] &#038;&#038; [ -d /var/lib/php5 ] &#038;&#038; find /var/lib/php5/ -depth -mindepth 1 -maxdepth &#8230; <a href="http://wlx.westgis.ac.cn/792/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>服务器升级到ubuntu 11.10后，经过一段时间的运行，突然发行服务器巨慢，很多软件的log里都提示内存不足，无法fork新进程。远程登录上发现其中有一个进程fuser，占据了大部分的CPU使用时间。<br />
网上搜索后，发现了是PHP5中运行一段时间后会在CRON中执行一段代码而导致产生的问题，在12.04版本中应该已经修复。<br />
具体可以参加以下几个链接：<br />
1. <a href="http://ubuntuforums.org/showthread.php?p=11456671">Fuser high CPU usage</a><br />
2. <a href="https://bugs.launchpad.net/ubuntu/+source/php5/+bug/876387">fuser forking uncontrollably in cron job </a> </p>
<p>修复办法：<br />
直接修改/etc/cron.d/php5文件，让其恢复为11.04的处理方法：</p>
<blockquote><p>09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] &#038;&#038; [ -d /var/lib/php5 ] &#038;&#038; find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete</p></blockquote>
<p>当然，也可以等待12.04发布后升级psmisc包。</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/792/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用unison同步ipad上的goodreader的文档</title>
		<link>http://wlx.westgis.ac.cn/789/</link>
		<comments>http://wlx.westgis.ac.cn/789/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 11:36:16 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[mac osx]]></category>
		<category><![CDATA[goodreader]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[unison]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=789</guid>
		<description><![CDATA[ipad上的goodreader是一个很好的pdf阅读软件，也支持很好的注记功能，但ipad上修改完后的pdf文档也需要同步到mac、linux上，这时就可以用unison软件来进行双向同步了。 同步方法： 1. 在goodreader上打开wifi设置进行共享 2. 在mac上打开unison，新建一个同步文档，或者在终端直接编辑对应的文件： vi ~/Library/Application Support/Unison/goodreader.prf # Unison preferences file perms = 0 ignore = Name *~ ignore = Name *.o ignore = Name *.tmp ignore = Name .DS_Store root = /Users/wlx/Documents/paper root = /Volumes/wlx-ipad.local/My Documents/paper 3. &#8230; <a href="http://wlx.westgis.ac.cn/789/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ipad上的goodreader是一个很好的pdf阅读软件，也支持很好的注记功能，但ipad上修改完后的pdf文档也需要同步到mac、linux上，这时就可以用unison软件来进行双向同步了。</p>
<p>同步方法：<br />
1. 在goodreader上打开wifi设置进行共享<br />
2. 在mac上打开unison，新建一个同步文档，或者在终端直接编辑对应的文件：<br />
vi ~/Library/Application Support/Unison/goodreader.prf</p>
<blockquote><p># Unison preferences file<br />
perms = 0<br />
ignore = Name *~<br />
ignore = Name *.o<br />
ignore = Name *.tmp<br />
ignore = Name .DS_Store<br />
root = /Users/wlx/Documents/paper<br />
root = /Volumes/wlx-ipad.local/My Documents/paper
</p></blockquote>
<p>3. 运行unison，选择此文件进行同步</p>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/789/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postgresql 9.1和8.3系列共存产生的问题</title>
		<link>http://wlx.westgis.ac.cn/787/</link>
		<comments>http://wlx.westgis.ac.cn/787/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 01:59:45 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[8.3]]></category>
		<category><![CDATA[9.1]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[standard_conforming_strings]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=787</guid>
		<description><![CDATA[主力服务器升级到最新版本的ubuntu后，postgresql变为9.1版本，而另外还有一台服务器还没有升级，还是默认的8.3版本，同时9.1版本的postgresql中默认还有一个视图是通过dblink连接到8.3版本的postgresql上的，结果这几天发生了很奇怪的问题，即在这个视图上有个字符串字段，里面包括了一些Windows硬盘的目录信息，如：D:\ftphome等，而升级后发现这个目录信息会变为：D:\x0c之类的信息。 经检查，是postgresql在升级到9.1后，有一项特性发生了改变：即\不再作为默认转义符号了，除非你使用E前缀声明指定。而8.3版本和9.1版本二者的默认方法不同，导致了在9.1的视图中产生的正确结果到8.3版本的库里发生了变化，而导致信息不正确。 解决方法也很简单，修改8.3版本的postgresql.conf文件： standard_conforming_strings=on]]></description>
			<content:encoded><![CDATA[<p>主力服务器升级到最新版本的ubuntu后，<a href="http://wlx.westgis.ac.cn/781/">postgresql变为9.1版本</a>，而另外还有一台服务器还没有升级，还是默认的8.3版本，同时9.1版本的postgresql中默认还有一个视图是通过dblink连接到8.3版本的postgresql上的，结果这几天发生了很奇怪的问题，即在这个视图上有个字符串字段，里面包括了一些Windows硬盘的目录信息，如：D:\ftphome等，而升级后发现这个目录信息会变为：D:\x0c之类的信息。</p>
<p>经检查，是postgresql在升级到9.1后，有一项特性发生了改变：即\不再作为默认转义符号了，除非你使用E前缀声明指定。而8.3版本和9.1版本二者的默认方法不同，导致了在9.1的视图中产生的正确结果到8.3版本的库里发生了变化，而导致信息不正确。 </p>
<p>解决方法也很简单，修改8.3版本的postgresql.conf文件：</p>
<blockquote><p>standard_conforming_strings=on</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/787/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>geonetwork从tomcat6升级到tomcat7</title>
		<link>http://wlx.westgis.ac.cn/785/</link>
		<comments>http://wlx.westgis.ac.cn/785/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 01:39:12 +0000</pubDate>
		<dc:creator>wlx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[tomcat6]]></category>
		<category><![CDATA[tomcat7]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://wlx.westgis.ac.cn/?p=785</guid>
		<description><![CDATA[westdc服务器上运行的geonetwork，在服务器升级系统后，默认的tomcat6升级变成tomcat7了，按照通常的设置，修改了server.xml与启动脚本（把内存变为了512M）后，发现网站能服务，但用户不能登录！ 服务器升级之前是没有问题的，而且另外一台服务器上是新装的tomcat7，运行的同样系统也没有问题，找了半天，最后才发现是由于默认帐号的问题。 原来tomcat6下是的默认系统帐号为tomcat6，而到了tomcat7后默认帐号则变为了tomcat7，因此修改后就解决问题了： sudo chown -R tomcat7-www:data geonetwork]]></description>
			<content:encoded><![CDATA[<p>westdc服务器上运行的geonetwork，在服务器升级系统后，默认的tomcat6升级变成tomcat7了，按照通常的设置，修改了server.xml与启动脚本（把内存变为了512M）后，发现网站能服务，但用户不能登录！<br />
服务器升级之前是没有问题的，而且另外一台服务器上是新装的tomcat7，运行的同样系统也没有问题，找了半天，最后才发现是由于默认帐号的问题。</p>
<p>原来tomcat6下是的默认系统帐号为tomcat6，而到了tomcat7后默认帐号则变为了tomcat7，因此修改后就解决问题了：</p>
<blockquote><p>sudo chown -R tomcat7-www:data geonetwork</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wlx.westgis.ac.cn/785/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

