<?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.mrzeng.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mrzeng.com</link>
	<description>NO.1 or Nothing</description>
	<lastBuildDate>Wed, 07 Sep 2011 12:47:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>重拾</title>
		<link>http://www.mrzeng.com/post/chongshi.html</link>
		<comments>http://www.mrzeng.com/post/chongshi.html#comments</comments>
		<pubDate>Wed, 07 Sep 2011 12:46:24 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[心情碎语]]></category>
		<category><![CDATA[心情]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=297</guid>
		<description><![CDATA[重拾起博客，发现好久没写了，竟然孵化出了懒惰，还是像重新建起来，写写。 过去的几个月，自己做了好多决定，回想，一切都是不可思议，人生，就是这样，只有写在记忆里面的，才能明白，才能细细品味。享受人生要往前看，感悟人生只能往后看。 2011年9月7日于曾厝垵。 随机日志jsp中文验证码网上找到一个不错的中文验证码，稍微改了改，解决了输出时的报错。还不错。代码如下： < %@page contentType="image/jpeg" pageEncoding="GB2312" import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*,java.io.*"%> 　　 < %! //生成随...磁盘碎片整理提示要运行Chkdsk /f的处理方法硬盘处理要进行碎片整理时候，如果出现一个写“磁盘碎片整理提示要运行Chkdsk /f”的对话框，那么处理方面如下： 1、打开运行，输入Chkdsk /f ,在命令行中填写n，回车 2、重启电脑。...推荐使用WPS的几个原因近，微软的“黑屏”事件一直闹得沸沸扬扬。 对我来说，原来用的是OFFICE2003，后面换了2007. 特别是到了2007，打开的时候经常要出现崩溃。 我一直不怎么用微软的OFFICE。自己一直用的是金山的WPS。倒不是因为“爱国”。WPS软件的体积比较小。还有几个优点。 1、最令我喜欢的WPS的 *（自由访问）的权限* ，对与自己重要的文件，我一般都用这个设置访问权限。但2007...PHP获取客户端IP的几种方法PHP获取客户端IP有几个函数，下面介绍下三种常用的写法。 第一种： < ?php function GetIP() { //获取IP if ($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; else if ($_SERVER["HTTP_C...使用PHPRpc实现Java和PHP通信PHPRPC是一款不错的是轻型的、安全的、跨网际的、跨语言的、跨平台的、跨环境的、跨域的、支持复杂对象传输的、支持引用参数传递的、支持内容输出重定向的、支持分级错误处理的、支持会话的、面向服务的高性能远程过程调用协议。官方网址为http://www.phprpc.org/zh_CN/ 本文以Java作为服务器端，PHP作为客户端来作为演示。 1、先书写Java服务器端，书写一个接口。如...]]></description>
			<content:encoded><![CDATA[<p>重拾起博客，发现好久没写了，竟然孵化出了懒惰，还是像重新建起来，写写。</p>
<p>过去的几个月，自己做了好多决定，回想，一切都是不可思议，人生，就是这样，只有写在记忆里面的，才能明白，才能细细品味。享受人生要往前看，感悟人生只能往后看。</p>
<p style="text-align: right;">2011年9月7日于曾厝垵。</p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/struts2-1-annotations-interceptor-authentication.html" title="在struts2.1中使用注解和拦截器实现权限细粒度控制">在struts2.1中使用注解和拦截器实现权限细粒度控制</a><br /><small>正如上一篇文章说的，拦截器是struts2的核心，同时struts2引入了注解的方式。这里就来简单看看针对struts2.1中使用注解和拦截器的开发。
首先要引入struts2.1各包，特别要引入Convention Plugin插件。

本文只是一个简单模拟，因此我们新建两个jsp文件，分别为登录和退出。
login.jsp

< %@ page language="java"  p...</small></li><li><a href="http://www.mrzeng.com/post/nginx-rewrite-in-common-systems.html" title="常用的PHP系统在nginx下的伪静态规则">常用的PHP系统在nginx下的伪静态规则</a><br /><small>常用的系统在nginx下的伪静态规则。


CMS系统
 
PHPCMS： 
location / { 
###以下为PHPCMS 伪静态化rewrite规则 
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3; 
rewrite ^(.*)list-([0-9]+)-([0-9]+)...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-example-download.html" title="jqGrid例子文件下载">jqGrid例子文件下载</a><br /><small>最近慵懒了很多，很少来上面博一博，发下jqGrid的例子的全部文件。
jqGrid
由于文件太大，删掉了所有的jar包，jar是整合struts2.1+spring2.5+hibernate3.2...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-5.html" title="jqGrid基础学习：5jqGrid中事件的使用">jqGrid基础学习：5jqGrid中事件的使用</a><br /><small>jqGrid中提供了丰富的事件。主要如下，这些只要看看就好。部分用不到，部分要到再详解。





Event
Parameters
Description


afterInsertRow
rowid
rowdata
rowelem
This event fires after every inserted row.
rowid is the id of the ...</small></li><li><a href="http://www.mrzeng.com/post/json-utils.html" title="Json工具类">Json工具类</a><br /><small>jqGrid在处理多字段查询的时候要使用json数据，于是，参考了网上的一些写法，写了一个json工具类。其中那个时间格式化，是为了解决json在处理java的java.util.Date出现的问题。

代码如下：

@SuppressWarnings("unchecked")
public class JsonUtils {

	

	/**
	 * 从一个JSON 对象字符...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/chongshi.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>自己说过的一些话</title>
		<link>http://www.mrzeng.com/post/something-what-i-have-said.html</link>
		<comments>http://www.mrzeng.com/post/something-what-i-have-said.html#comments</comments>
		<pubDate>Wed, 22 Jun 2011 08:45:25 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[心情碎语]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=292</guid>
		<description><![CDATA[翻开以前的一些记录，发现自己说过以下话，有点意思，无聊一下，特此记录。 有关技术： 1、ERP的核心是“每个人都应该面向系统操作”； 2、协同工作的关键是实现“你能知道我所知道的，而我能知道你的需求” 3、中国移动是最大的SNS。 4、ERP的用处就是农民将锄头换成拖拉机。 5、什么是ERP，ERP就是用电脑记账。 6、学编程就是哥哥追美眉，生活就像美眉追哥哥 。 7、中国的电子商务必将向国外进军，特别是传统线下品牌。 8、传统线下企业的电子商务的核心不是淘宝是自有平台。 9、技术的核心不是技术，而是业务。 10、人之所以称之为人，因为我们犯错误的频度远高于电脑。 有关电视剧杂感 1、电影永远是人们抽取的生活的一部分并删掉的一部分的那部分，但仍然为那一部分努力着。 2、每个男人都应该学会珍惜，每个女人都应学会满足。 3、是什么力量能让两个人拿一生当承诺？ 4、男人以真心去守护爱情，以事业来守卫爱情！ 5、爱一个人不是爱他全部，而是知其所需。 有关生活 1、什么事情到最后都归根结底还是钱的问题。 2、真正的幸福是自己知道要什么并且得到。 3、总是到下雨才想到雨伞，总是到拿雨伞时才发现不见了。总是到下雨才想到雨伞，总是到拿雨伞时才发现不见了。 4、不怕做错，只是怕做错没人提醒；不怕有人提醒，就怕自己当时没有接受。 5、从一个过程到另一个过程之中，你会发现很多东西。你以为懂了，当到最后，你才会发现，这是一个低级错。 6、最大的梦想就是最简单的、最平凡的。 7、我发现QQ空间里面无非两种：一是秀幸福，一种诉痛苦。 8、赚一辈子的钱，还是一辈子赚钱? 9、学经济的人中我计算机最好，学计算机的人中我经济学最好。 10、其实坚持不是那么难，只要不要有那么多借口外加少一点健忘。 随机日志linux下的文件的压缩和解压缩SSH常用SecureCRT 5.5进行连接，使用sz和rz命令来上传下去。但这个命令只支持单文件传输，多文件就比较麻烦。但是如果使用压缩包的方式就省事很多。我们来看看在liux下压缩包的压缩和解压方法. tar -c: 建立压缩档案 -x：解压 -t：查看内容 -r：向压缩归档文件末尾追加文件 -u：更新原压缩包中的文件 这五个是独立的命令，压缩解压都要用到其中一个...Linux中修改ip的办法切换到root账户下 切换到/etc/sysconfig/network-scripts/目录下； 编辑网卡编码：vi ifcfg-ethX X为第X-1个网卡。 DEVICE=ethX 设备名称 ONBOOT=yes 计算...jqGrid基础学习：2第一个jqGrid上一节已经将jqGrid的框架架了起来。这一节将进行jqGrid的配置文件的编写。 接下来，我们先将属性写好，再来说明下个属性的意思。 jQuery(document).ready(function(){ jQuery("#list").jqGrid({ url:'admin/json/jsondata.action', datatype: 'jso...Json工具类jqGrid在处理多字段查询的时候要使用json数据，于是，参考了网上的一些写法，写了一个json工具类。其中那个时间格式化，是为了解决json在处理java的java.util.Date出现的问题。 代码如下： [...]]]></description>
			<content:encoded><![CDATA[<p>翻开以前的一些记录，发现自己说过以下话，有点意思，无聊一下，特此记录。</p>
<p><strong>有关技术：</strong></p>
<p>1、ERP的核心是“每个人都应该面向系统操作”；</p>
<p>2、协同工作的关键是实现“你能知道我所知道的，而我能知道你的需求”</p>
<p>3、中国移动是最大的SNS。</p>
<p>4、ERP的用处就是农民将锄头换成拖拉机。</p>
<p>5、什么是ERP，ERP就是用电脑记账。</p>
<p>6、学编程就是哥哥追美眉，生活就像美眉追哥哥 。</p>
<p>7、中国的电子商务必将向国外进军，特别是传统线下品牌。</p>
<p>8、传统线下企业的电子商务的核心不是淘宝是自有平台。</p>
<p>9、技术的核心不是技术，而是业务。</p>
<p>10、人之所以称之为人，因为我们犯错误的频度远高于电脑。</p>
<p><strong>有关电视剧杂感</strong></p>
<p>1、电影永远是人们抽取的生活的一部分并删掉的一部分的那部分，但仍然为那一部分努力着。</p>
<p>2、每个男人都应该学会珍惜，每个女人都应学会满足。</p>
<p>3、是什么力量能让两个人拿一生当承诺？</p>
<p>4、男人以真心去守护爱情，以事业来守卫爱情！<br />
5、爱一个人不是爱他全部，而是知其所需。</p>
<p><strong>有关生活</strong><br />
1、什么事情到最后都归根结底还是钱的问题。</p>
<p>2、真正的幸福是自己知道要什么并且得到。</p>
<p>3、总是到下雨才想到雨伞，总是到拿雨伞时才发现不见了。总是到下雨才想到雨伞，总是到拿雨伞时才发现不见了。</p>
<p>4、不怕做错，只是怕做错没人提醒；不怕有人提醒，就怕自己当时没有接受。 </p>
<p>5、从一个过程到另一个过程之中，你会发现很多东西。你以为懂了，当到最后，你才会发现，这是一个低级错。</p>
<p>6、最大的梦想就是最简单的、最平凡的。</p>
<p>7、我发现QQ空间里面无非两种：一是秀幸福，一种诉痛苦。</p>
<p>8、赚一辈子的钱，还是一辈子赚钱?</p>
<p>9、学经济的人中我计算机最好，学计算机的人中我经济学最好。</p>
<p>10、其实坚持不是那么难，只要不要有那么多借口外加少一点健忘。</p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-7.html" title="jqGrid基础学习：7jqGrid中使用分页">jqGrid基础学习：7jqGrid中使用分页</a><br /><small>jqGrid分页首先要在页面设置一个DIV的层。例如,在第一章就提到的





同时，要在jqGrid的配置中加入

jQuery("#grid_id").jqGrid({
...
   pager : '#pager',
...
});


参照第二章
效果如下
[caption id="attachment_327" align="alignnone" wi...</small></li><li><a href="http://www.mrzeng.com/post/phprpc-java-php.html" title="使用PHPRpc实现Java和PHP通信">使用PHPRpc实现Java和PHP通信</a><br /><small>PHPRPC是一款不错的是轻型的、安全的、跨网际的、跨语言的、跨平台的、跨环境的、跨域的、支持复杂对象传输的、支持引用参数传递的、支持内容输出重定向的、支持分级错误处理的、支持会话的、面向服务的高性能远程过程调用协议。官方网址为http://www.phprpc.org/zh_CN/

本文以Java作为服务器端，PHP作为客户端来作为演示。

1、先书写Java服务器端，书写一个接口。如...</small></li><li><a href="http://www.mrzeng.com/post/struts2-action-request-response-session.html" title="struts2的action中获得request response session 对象">struts2的action中获得request response session 对象</a><br /><small>在struts2中有两种方式可以得到这些对象,一般有两种方式，一种是利用Ioc实现拦截器接口，一种是使用静态类。分布如下

第一种方式，非IoC方式，使用ActionContext类和ServletActionContext类，例如

HttpServletResponse response(HttpServletResponse) =
ActionContext.getContext(...</small></li><li><a href="http://www.mrzeng.com/post/linux-tar-zip-gz.html" title="linux下的文件的压缩和解压缩">linux下的文件的压缩和解压缩</a><br /><small>SSH常用SecureCRT 5.5进行连接，使用sz和rz命令来上传下去。但这个命令只支持单文件传输，多文件就比较麻烦。但是如果使用压缩包的方式就省事很多。我们来看看在liux下压缩包的压缩和解压方法.


tar

-c: 建立压缩档案
-x：解压
-t：查看内容
-r：向压缩归档文件末尾追加文件
-u：更新原压缩包中的文件

这五个是独立的命令，压缩解压都要用到其中一个...</small></li><li><a href="http://www.mrzeng.com/post/vertrigoserv0717.html" title="Windows 下环境迅速搭建Php+Apache+mysql">Windows 下环境迅速搭建Php+Apache+mysql</a><br /><small>本文发表于计世网服务器论坛。http://serverbbs.ccw.com.cn/viewthread.php?tid=15141&amp;highlight=%2Byeying43

php在windows条件下要进行一系列配置，操作比较麻烦，而且容易出错。现在推荐一款软件，不仅可以轻松搭建php环境，而其可以对php环境进行很好配置和管理。
软件名字：VertrigoServ
最新版...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/something-what-i-have-said.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>amCharts入门教程1：什么是Amcharts？</title>
		<link>http://www.mrzeng.com/post/amcharts1-what-about-amcharts.html</link>
		<comments>http://www.mrzeng.com/post/amcharts1-what-about-amcharts.html#comments</comments>
		<pubDate>Fri, 10 Jun 2011 05:20:32 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[amCharts]]></category>
		<category><![CDATA[amcharts]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=284</guid>
		<description><![CDATA[Amcharts是一个非常优秀的FLASH图标组件，最新版本为可以接收CSV或XML文件数据，使用起来非常方便，支持HTML5，界面比JFreeChart华丽很多,而且可以与用户交互,动画效果非常漂亮。 它的官网:http://www.amcharts.com 下载地址：http://www.amcharts.com/download AmCharts可以免费使用，但免费使用的时候会在图表的左上角显示该网站的链接。网上有很多破解版本，其中有一种在flash的目录下加key文件的，经测试，这个方法已经失效。 随机日志推荐使用WPS的几个原因近，微软的“黑屏”事件一直闹得沸沸扬扬。 对我来说，原来用的是OFFICE2003，后面换了2007. 特别是到了2007，打开的时候经常要出现崩溃。 我一直不怎么用微软的OFFICE。自己一直用的是金山的WPS。倒不是因为“爱国”。WPS软件的体积比较小。还有几个优点。 1、最令我喜欢的WPS的 *（自由访问）的权限* ，对与自己重要的文件，我一般都用这个设置访问权限。但2007...jqGrid基础学习：8jqGrid中在导航条使用按钮jqGrid中可以再导航条上设置按钮，其中jqGrid已经默认设置了一些按钮，此外，用户也可以自定义自己的按钮。 使用默认的方法 系统中默认的按钮主要是对数据进行CRUD的操作的按钮。方法如下 jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true,view:true},{ //这里可以指定edi...PHP获取客户端IP的几种方法PHP获取客户端IP有几个函数，下面介绍下三种常用的写法。 第一种： < ?php function GetIP() { //获取IP if ($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; else if ($_SERVER["HTTP_C...linux下的文件的压缩和解压缩SSH常用SecureCRT 5.5进行连接，使用sz和rz命令来上传下去。但这个命令只支持单文件传输，多文件就比较麻烦。但是如果使用压缩包的方式就省事很多。我们来看看在liux下压缩包的压缩和解压方法. tar -c: 建立压缩档案 -x：解压 -t：查看内容 -r：向压缩归档文件末尾追加文件 -u：更新原压缩包中的文件 这五个是独立的命令，压缩解压都要用到其中一个...写在感恩节前夕这是个西方的节日，无论是什么节日，都是一种提醒。 每天要感谢父母，感谢给自己生命： 每天要感谢家人，感谢给自己快乐； 每天要感谢同事，感谢给自己帮助。 最近看了一部电影《love actually》，中文翻译真爱至上，里面的那段话说得很好： 每当我对世界的现状感到担忧，我就会想到希思罗机场的接机厅。很多人都开始觉得我们生活在仇恨与贪婪中，但我并不这么认为。在我看来，爱无处...]]></description>
			<content:encoded><![CDATA[<p>Amcharts是一个非常优秀的FLASH图标组件，最新版本为可以接收CSV或XML文件数据，使用起来非常方便，支持HTML5，界面比JFreeChart华丽很多,而且可以与用户交互,动画效果非常漂亮。<br />
它的官网:<a href="http://www.amcharts.com">http://www.amcharts.com </a><br />
下载地址：<a href="http://www.amcharts.com/download">http://www.amcharts.com/download</a></p>
<p>AmCharts可以免费使用，但免费使用的时候会在图表的左上角显示该网站的链接。网上有很多破解版本，其中有一种在flash的目录下加key文件的，经测试，这个方法已经失效。</p>
<p><a href="http://www.mrzeng.com/post/amcharts1-what-about-amcharts.html/08111426_yxbt" rel="attachment wp-att-285"><img src="http://www.mrzeng.com/wp-content/uploads/08111426_YxBT-300x169.jpg" alt="" title="08111426_YxBT" width="300" height="169" class="alignnone size-medium wp-image-285" /></a></p>
<h3  class="related_post_title">随机日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-2.html" title="jqGrid基础学习：2第一个jqGrid">jqGrid基础学习：2第一个jqGrid</a><br /><small>上一节已经将jqGrid的框架架了起来。这一节将进行jqGrid的配置文件的编写。
接下来，我们先将属性写好，再来说明下个属性的意思。



		
jQuery(document).ready(function(){ 
	
	jQuery("#list").jqGrid({
		url:'admin/json/jsondata.action',
		datatype: 'jso...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-11.html" title="jqGrid基础学习：11jqGrid的查询时和后台的交互">jqGrid基础学习：11jqGrid的查询时和后台的交互</a><br /><small>jqGrid查询时和后台交互是一个比较棘手的问题，因为发送过来的数据不规则。


单字段
我们通过Firefox的firebug来进行调试，我们发现提交搜索请求后，向后台发送的参数如下
[caption id="attachment_382" align="alignnone" width="300" caption="单字段同后台交互"][/caption]
由此，我们看出单字段查询...</small></li><li><a href="http://www.mrzeng.com/post/solution-for-fix-characters-irrecognizable.html" title="解决SecureCRT中文显示乱码">解决SecureCRT中文显示乱码</a><br /><small>具体解决方法是：
1，修改远程linux机器的配置

vim /etc/sysconfig/i18n

把LANG改成支持UTF-8的字符集
如：LANG=”zh_CN.UTF-8″
或者是 LANG=”en_US.UTF-8″

2，然后再改Secure CRT的设置,选项->会话选项->外观->字符编码->uft-8
 
3，退出，再重新登录。发现utf8的文件都能正确读...</small></li><li><a href="http://www.mrzeng.com/post/excel_id.html" title="身份证的编码安排规则">身份证的编码安排规则</a><br /><small>弄个Excel，可以自动生成，进行验证。

cardid

居民身份证编号识别

1、身份证编码规则如下：根据〖中华人民共和国国家标准GB11643-1999〗中有关公民身份号码的规定，公民身份号码是特征组合码，由十七位数字本体码和一位数字校验码组成。排列顺序从左至右依次为：六位数字地址码，八位数字出生日期码，三位数字顺序码和一位数字校验码。

地址码（身份证前六位）表示编码对象第...</small></li><li><a href="http://www.mrzeng.com/post/vertrigoserv0717.html" title="Windows 下环境迅速搭建Php+Apache+mysql">Windows 下环境迅速搭建Php+Apache+mysql</a><br /><small>本文发表于计世网服务器论坛。http://serverbbs.ccw.com.cn/viewthread.php?tid=15141&amp;highlight=%2Byeying43

php在windows条件下要进行一系列配置，操作比较麻烦，而且容易出错。现在推荐一款软件，不仅可以轻松搭建php环境，而其可以对php环境进行很好配置和管理。
软件名字：VertrigoServ
最新版...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/amcharts1-what-about-amcharts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Json下的Positioned Update not supported解决方法</title>
		<link>http://www.mrzeng.com/post/json-positioned-update-not-supported.html</link>
		<comments>http://www.mrzeng.com/post/json-positioned-update-not-supported.html#comments</comments>
		<pubDate>Fri, 10 Jun 2011 05:03:08 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=275</guid>
		<description><![CDATA[今天使用json输出的时候报了这个错误，原因找了一下，发现使用hibernate自动生成的一些类会出现这个情况，主要是因为hibernate使用了延迟加载所造成的缘故。 因为我的系统前台使用的jquery-easeyui的dataGrid表格，所以，只能重新建一个类来进行。代码如下 package com.mrzeng.action; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; import org.apache.struts2.convention.annotation.ParentPackage; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.huashui.authentication.AuthName; import org.huashui.dto.PageBean; import org.huashui.service.IPaginate; import org.huashui.util.StringUtils; import org.huashui.util.WebUtils; import com.mrzeng.hibernate.Category; import com.mrzeng.hibernate.Crawlrecord; import com.mrzeng.hibernate.Saleinfo; import com.mrzeng.hibernate.Shop; import com.mrzeng.hibernate.Shopdetail; import com.mrzeng.service.IAnalysisService; /** * @fileName ShopdetailAction.java * @author 曾华水 [...]]]></description>
			<content:encoded><![CDATA[<div>今天使用json输出的时候报了这个错误，原因找了一下，发现使用hibernate自动生成的一些类会出现这个情况，主要是因为hibernate使用了延迟加载所造成的缘故。<br />
因为我的系统前台使用的jquery-easeyui的dataGrid表格，所以，只能重新建一个类来进行。代码如下
</div>
<pre class=prettyprint>
package com.mrzeng.action;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.huashui.authentication.AuthName;
import org.huashui.dto.PageBean;
import org.huashui.service.IPaginate;
import org.huashui.util.StringUtils;
import org.huashui.util.WebUtils;

import com.mrzeng.hibernate.Category;
import com.mrzeng.hibernate.Crawlrecord;
import com.mrzeng.hibernate.Saleinfo;
import com.mrzeng.hibernate.Shop;
import com.mrzeng.hibernate.Shopdetail;
import com.mrzeng.service.IAnalysisService;

/**
 * @fileName ShopdetailAction.java
 * @author  曾华水
 * @email zenghuashui@gmail.com
 * @date Jun 10, 2011
 * @time 9:07:13 AM
 * 代码类代码编写规约：add-增加，edit修改，remove删除，list列出全部，排除用ex，tree代表树
 */
@ParentPackage("huashui-default")
@Namespace("/admin")
@Results( {
		@Result(name = "saleinfo", location = "/WEB-INF/data/saleinfo.jsp"),
		@Result(name = "json", location = "/WEB-INF/view/json.jsp"),
		@Result(name = "jsonfilter", location = "/WEB-INF/view/jsonfilter.jsp"),
		@Result(name = "jsonfiltertype", location = "/WEB-INF/view/jsonfiltertype.jsp") })
public class SaleinfoAction {

	@Resource
	private IPaginate paginate;
	@Resource
	private IAnalysisService analysisService;
	private Integer rows;
	private Integer page;
	private Integer total;
	private String sort;
	private String order;

	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public String getOrder() {
		return order;
	}
	public void setOrder(String order) {
		this.order = order;
	}
	public Integer getRows() {
		return rows;
	}
	public void setRows(Integer rows) {
		this.rows = rows;
	}
	public Integer getPage() {
		return page;
	}
	public void setPage(Integer page) {
		this.page = page;
	}
	public Integer getTotal() {
		return total;
	}
	public void setTotal(Integer total) {
		this.total = total;
	}
	@Action("data_saleinfo")
	@AuthName("DATA_SALEINFO")
	public String index(){
		List<shop> shops = analysisService.listShop();
		List<crawlrecord> crawls = analysisService.listCrawlrecord();
		StringBuilder sb = new StringBuilder();
		for (Shop shop : shops) {
			if (!StringUtils.isNull(sb.toString())) {
				sb.append(",\r\n");
			}
			sb.append("{").append("id:").append(shop.getId()).append(
					",name:\"").append(shop.getName()).append(
					"\"}\r\n");
		}
		WebUtils.getRequest().setAttribute("shops", sb.toString());

		StringBuilder sb2 = new StringBuilder();
		for (Crawlrecord crawlrecord : crawls) {
			if (!StringUtils.isNull(sb2.toString())) {
				sb2.append(",\r\n");
			}
			sb2.append("{").append("id:").append(crawlrecord.getId()).append(
					",name:\"").append(StringUtils.dateToString(crawlrecord.getCrawltime(), "yyyy-MM-dd hh:mm:ss")).append(
					"\"}\r\n");
		}
		WebUtils.getRequest().setAttribute("crawls", sb2.toString());
		return "saleinfo";
	}
	@Action("data_saleinfo_list")
	@AuthName("DATA_SALEINFO")
	public String list(){
		Map<string , Object> data = new HashMap</string><string , Object>();
		StringBuilder sql = new StringBuilder();
		sql.append("from ").append(Saleinfo.class.getSimpleName());
		sql.append(" where 1=1");

		if (!StringUtils.isNull(sort) &#038;&#038; !StringUtils.isNull(order)) {
			if (order.trim().equalsIgnoreCase("desc")
					|| order.trim().equalsIgnoreCase("asc"))
				sql.append(" order by ").append(sort).append(" ").append(order);
		}
		PageBean pageBean = new PageBean();
		pageBean.setPage(page);
		pageBean.setPageSize(rows);

		pageBean.setListSQL(sql.toString());
		try {
			pageBean.setCount(paginate.getTotalCount(pageBean).intValue());
		} catch (Exception e) {
			e.printStackTrace();
		}

		List<saleinfo> list = paginate.getList(pageBean);
		List<saleinfobean> rList = new ArrayList</saleinfobean><saleinfobean>();
		for (Saleinfo saleinfo : list) {
			SaleinfoBean bean = new SaleinfoBean();
			bean.setBuyer(saleinfo.getBuyer());
			bean.setBuyerCode(saleinfo.getBuyerCode());
			bean.setBuyerLevel(saleinfo.getBuyerLevel());
			bean.setBuyNum(saleinfo.getBuyNum());
			bean.setBuyTime(saleinfo.getBuyTime());
			bean.setCrawlId(saleinfo.getCrawlrecord().getId());
			bean.setGoodDesc(saleinfo.getGoodDesc());
			bean.setGoodPrice(saleinfo.getGoodPrice());
			bean.setGoodTitle(saleinfo.getGoodTitle());
			bean.setGoodUrl(saleinfo.getGoodUrl());
			bean.setId(saleinfo.getId());
			bean.setShopId(saleinfo.getShop().getId());
			rList.add(bean);
		}
		data.put("rows", rList);
		data.put("total", pageBean.getCount());

		WebUtils.getRequest().setAttribute("data", data);
		WebUtils.getRequest().setAttribute("type", "Set");
		return "jsonfiltertype";

	}

	public class SaleinfoBean{
		private Long id;
		private Integer shopId;
		private Long  crawlId;
		private Date buyTime;
		private Integer buyNum;
		private String buyer;
		private String buyerCode;
		private Integer buyerLevel;
		private String goodTitle;
		private String goodDesc;
		private Double goodPrice;
		private String goodUrl;
		public Long getId() {
			return id;
		}
		public void setId(Long id) {
			this.id = id;
		}
		public Integer getShopId() {
			return shopId;
		}
		public void setShopId(Integer shopId) {
			this.shopId = shopId;
		}
		public Long getCrawlId() {
			return crawlId;
		}
		public void setCrawlId(Long crawlId) {
			this.crawlId = crawlId;
		}
		public Date getBuyTime() {
			return buyTime;
		}
		public void setBuyTime(Date buyTime) {
			this.buyTime = buyTime;
		}
		public Integer getBuyNum() {
			return buyNum;
		}
		public void setBuyNum(Integer buyNum) {
			this.buyNum = buyNum;
		}
		public String getBuyer() {
			return buyer;
		}
		public void setBuyer(String buyer) {
			this.buyer = buyer;
		}
		public String getBuyerCode() {
			return buyerCode;
		}
		public void setBuyerCode(String buyerCode) {
			this.buyerCode = buyerCode;
		}
		public Integer getBuyerLevel() {
			return buyerLevel;
		}
		public void setBuyerLevel(Integer buyerLevel) {
			this.buyerLevel = buyerLevel;
		}
		public String getGoodTitle() {
			return goodTitle;
		}
		public void setGoodTitle(String goodTitle) {
			this.goodTitle = goodTitle;
		}
		public String getGoodDesc() {
			return goodDesc;
		}
		public void setGoodDesc(String goodDesc) {
			this.goodDesc = goodDesc;
		}
		public Double getGoodPrice() {
			return goodPrice;
		}
		public void setGoodPrice(Double goodPrice) {
			this.goodPrice = goodPrice;
		}
		public String getGoodUrl() {
			return goodUrl;
		}
		public void setGoodUrl(String goodUrl) {
			this.goodUrl = goodUrl;
		}

	}
}

</saleinfobean></saleinfo></string></crawlrecord></shop></pre>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/json-utils.html" title="Json工具类">Json工具类</a><br /><small>jqGrid在处理多字段查询的时候要使用json数据，于是，参考了网上的一些写法，写了一个json工具类。其中那个时间格式化，是为了解决json在处理java的java.util.Date出现的问题。

代码如下：

@SuppressWarnings("unchecked")
public class JsonUtils {

	

	/**
	 * 从一个JSON 对象字符...</small></li><li><a href="http://www.mrzeng.com/post/sql-server-jdbc.html" title="SQL Server的JDBC驱动问题">SQL Server的JDBC驱动问题</a><br /><small>最近公司换服务器把数据库从SQL Server 2005 升级到 SQL Server 2008。这样，以这个数据库对接的两个系统全部瘫痪，无法进行数据库对接。
首先立即判断是是数据库的驱动问题，好不容易从网上找到了了驱动，下载下来，发现里面有两个文件一个是sqljdbc.jar，另外一个是sqljdbc4.jar,于是将驱动换掉，两个全部导进去，加到CLASSPATH路径，发现，还是不行。两个...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/json-positioned-update-not-supported.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jqGrid进阶教程：3、jqGrid的数据格式化二</title>
		<link>http://www.mrzeng.com/post/jqgrid-formater-2.html</link>
		<comments>http://www.mrzeng.com/post/jqgrid-formater-2.html#comments</comments>
		<pubDate>Wed, 06 Oct 2010 07:48:03 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[jqGrid]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=229</guid>
		<description><![CDATA[jqGrid是非常强大的，除了上一讲提到的预置的格式化外，还提供自定义的格式化方法，这种方法也是我比较喜欢的方法。 我们接上面的例子 $("#grid_id").jqGrid({ ... colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}} ... ], ... }); 此时，我们增加格式化 $("#grid_id").jqGrid({ ... colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}},formatter:function(cellvalue, options, row){ if(cellvalue==1){ return "男"; }else{ return "女"; } } ... ], ... }); 这样操作起来就比较方便。我们也可以把这个方法独立出来，例如：我们在数据库设置的时候常用1来标示“是”，0标示“否”，这时候我们前台展示的时候肯定不能只显示1或者0，于是必须转换，如果比较多字段用到，我们就采用独立出来写一个。 function sexFmatter(cellvalue, options, rowObject){ if(cellvalue==1){ return "男"; }else{ return "女"; } } 在formatter属性后面填写方法名 $("#grid_id").jqGrid({ ... colModel : [...]]]></description>
			<content:encoded><![CDATA[<p>jqGrid是非常强大的，除了上一讲提到的预置的格式化外，还提供自定义的格式化方法，这种方法也是我比较喜欢的方法。<br />
我们接上面的例子</p>
<pre class=prettyprint>
$("#grid_id").jqGrid({
...
   colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}} ... ],
...
});
</pre>
<p> 此时，我们增加格式化</p>
<pre class=prettyprint>
$("#grid_id").jqGrid({
...
   colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}},formatter:function(cellvalue, options, row){
     if(cellvalue==1){
         return "男";
    }else{
        return "女";
   }
   } ... ],
...
});
</pre>
<p>这样操作起来就比较方便。我们也可以把这个方法独立出来，例如：我们在数据库设置的时候常用1来标示“是”，0标示“否”，这时候我们前台展示的时候肯定不能只显示1或者0，于是必须转换，如果比较多字段用到，我们就采用独立出来写一个。</p>
<pre class=prettyprint>
function sexFmatter(cellvalue, options, rowObject){
         if(cellvalue==1){
         return "男";
    }else{
        return "女";
   }
}
</pre>
<p>在formatter属性后面填写方法名</p>
<pre class=prettyprint>
$("#grid_id").jqGrid({
...
   colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}},formatter: sexFmatter... ],
...
});
</pre>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/jqgrid-example-download.html" title="jqGrid例子文件下载">jqGrid例子文件下载</a><br /><small>最近慵懒了很多，很少来上面博一博，发下jqGrid的例子的全部文件。
jqGrid
由于文件太大，删掉了所有的jar包，jar是整合struts2.1+spring2.5+hibernate3.2...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-css.html" title="jqGrid进阶教程：1、jqGrid的样式无法正确显示的原因和解决办法">jqGrid进阶教程：1、jqGrid的样式无法正确显示的原因和解决办法</a><br /><small>jqGrid引入后，执行，常常会碰到css无法像官方的demo一样正常显示，特别是字体还有一些弹出框，

例如
[caption id="attachment_407" align="alignnone" width="300" caption="CSS变样"][/caption]
这种问题的原因多半是因为html的标准问题，即其写法为




如果要让样式正常，要采用写法如下...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-11.html" title="jqGrid基础学习：11jqGrid的查询时和后台的交互">jqGrid基础学习：11jqGrid的查询时和后台的交互</a><br /><small>jqGrid查询时和后台交互是一个比较棘手的问题，因为发送过来的数据不规则。


单字段
我们通过Firefox的firebug来进行调试，我们发现提交搜索请求后，向后台发送的参数如下
[caption id="attachment_382" align="alignnone" width="300" caption="单字段同后台交互"][/caption]
由此，我们看出单字段查询...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-10.html" title="jqGrid基础学习：10jqGrid的多字段查询">jqGrid基础学习：10jqGrid的多字段查询</a><br /><small>多字段查询就是高级查询，在jqGrid中，高级查询的麻烦在于同后台的交互。

[caption id="attachment_379" align="alignnone" width="718" caption="jqGrid多字段查询"][/caption]

启用多条件查询的方法，是加上.searchGrid({multipleSearch:true});    即可。

    ...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid_base_study_8-2.html" title="jqGrid基础学习：8jqGrid中在导航条使用按钮">jqGrid基础学习：8jqGrid中在导航条使用按钮</a><br /><small>jqGrid中可以再导航条上设置按钮，其中jqGrid已经默认设置了一些按钮，此外，用户也可以自定义自己的按钮。

使用默认的方法
系统中默认的按钮主要是对数据进行CRUD的操作的按钮。方法如下

jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true,view:true},{
//这里可以指定edi...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/jqgrid-formater-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centos的vsftp搭建方法</title>
		<link>http://www.mrzeng.com/post/centos-vsftpd.html</link>
		<comments>http://www.mrzeng.com/post/centos-vsftpd.html#comments</comments>
		<pubDate>Mon, 27 Sep 2010 07:39:09 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Vsftp]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=224</guid>
		<description><![CDATA[公司要架一台新的图片服务器，对比了centos下的几款ftp，最后还是继续选择vsftp。 搭建的方法如下： 一、下载安装 1、安装Vsftpd yum -y install vsftpd* 2、安装PAM yum -y install pam* 3、安装db4 yum -y install db4* 二、配置vsftp 1、建立用户，这里的用户是指ftp的账号。不是系统。 cd /etc/vsftpd/ #切换到vsftpd目录下 vi logins.txt #开始写入logins.txt的用户和密码。单行为账号，双行为密码 logins.txt的用户和密码。单行为账号，双行为密码 例如 admin #账号 admin123#密码 demo #账号 demo321 #密码 2、生成加密密码 db_load -T -t hash –f logins.txt /etc/vsftpd/vsftpd_login.db 同时改变下vsftpd_login.db的权限 chmod 600 /etc/vsftpd/vsftpd_login.db 3、添加vsftpd.vu vi /etc/pamd./vsftpd.vu 输入以下内容 auth required pam_userdb.so db=/etc/vsftpd/vsftpd_login [...]]]></description>
			<content:encoded><![CDATA[<p>公司要架一台新的图片服务器，对比了centos下的几款ftp，最后还是继续选择vsftp。<br />
搭建的方法如下：<br />
一、下载安装<br />
   1、安装Vsftpd</p>
<pre class=prettyprint>
yum -y install vsftpd*
  </pre>
<p>   2、安装PAM</p>
<pre class=prettyprint>
yum -y install pam*
   </pre>
<p>   3、安装db4</p>
<pre class=prettyprint>
yum -y install db4*
</pre>
<p><span id="more-224"></span><br />
二、配置vsftp<br />
   1、建立用户，这里的用户是指ftp的账号。不是系统。</p>
<pre class=prettyprint>
cd /etc/vsftpd/ #切换到vsftpd目录下
vi logins.txt #开始写入logins.txt的用户和密码。单行为账号，双行为密码
 </pre>
<p>    logins.txt的用户和密码。单行为账号，双行为密码<br />
    例如</p>
<pre class=prettyprint>
admin #账号
admin123#密码
demo #账号
demo321 #密码
</pre>
<p>  2、生成加密密码</p>
<pre class=prettyprint>
db_load -T -t hash –f logins.txt /etc/vsftpd/vsftpd_login.db
</pre>
<p>    同时改变下vsftpd_login.db的权限</p>
<pre class=prettyprint>
chmod 600 /etc/vsftpd/vsftpd_login.db
</pre>
<p>     3、添加vsftpd.vu</p>
<pre class=prettyprint>
vi /etc/pamd./vsftpd.vu
</pre>
<p>   输入以下内容</p>
<pre lang="Text">
auth  required  pam_userdb.so  db=/etc/vsftpd/vsftpd_login
account  required pam_userdb.so  db=/etc/vsftpd/vsftpd_login
</pre>
<p> 输入：wq退出保存<br />
4、建立虚拟用户目录<br />
在/etc/vsftpd/  下建立user_config<br />
根据logins.txt里面所建的用户进行命名。比如admin用户就建立进行 vi admin，内容如下</p>
<pre class=prettyprint>
local_root=/opt/htdocs/
指定虚拟用户的具体主路径。
anonymous_enable=NO
设定不允许匿名用户访问。
write_enable=YES
设定允许写操作。
local_umask=022
设定上传文件权限掩码。
anon_upload_enable=NO
设定不允许匿名用户上传。
anon_mkdir_write_enable=NO
设定不允许匿名用户建立目录。
idle_session_timeout=600
设定空闲连接超时时间。
data_connection_timeout=120
设定单次连续传输最大时间。
max_clients=10
设定并发客户端访问个数。
max_per_ip=5
设定单个客户端的最大线程数，这个配置主要来照顾Flashget、迅雷等多线程下载软件。
local_max_rate=50000
设定该用户的最大传输速率，单位b/s。
</pre>
<p>5、修改vsftpd.conf<br />
要先备份一下。</p>
<pre class=prettyprint>
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.backup
vi /etc/vsftpd/vsftpd.conf
</pre>
<p>修改如下</p>
<pre class=prettyprint>
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=欢迎登陆匹克图片服务器
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

guest_enable=YES
guest_username=www #因为我htdocs的宿主是www。这样nginx和vsftpd使用同一个，比较方便做权限控制。例如上传的时候不会出现无法写入等情况。
pam_service_name=vsftpd.vu
user_sub_token=$USER
user_config_dir=/etc/vsftpd/user_config
</pre>
<p>最后重启下vsftpd就可以了</p>
<pre class=prettyprint>
/etc/init.d/vsftpd restart
</pre>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/centosredhat-gcc.html" title="Centos/RedHat下安装gcc的方法">Centos/RedHat下安装gcc的方法</a><br /><small>许多人安装centos和redhat的时候没有将开发工具包和开发库给打钩，从而在安装后要编译一些程序出现错误。
此时，安装方法有以下几种：fdc5f25c


1、直接执行（命令行执行这个方法最省事）

     yum -y install gcc
     yum -y install gcc-c++

 下载后安装
2、在光盘的centos目录下找到以下包
　　comp...</small></li><li><a href="http://www.mrzeng.com/post/linux-change-ip-solution.html" title="Linux中修改ip的办法">Linux中修改ip的办法</a><br /><small>切换到root账户下

切换到/etc/sysconfig/network-scripts/目录下；

编辑网卡编码：vi ifcfg-ethX X为第X-1个网卡。

DEVICE=ethX                                        设备名称
ONBOOT=yes                                        计算...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/centos-vsftpd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jqGrid例子文件下载</title>
		<link>http://www.mrzeng.com/post/jqgrid-example-download.html</link>
		<comments>http://www.mrzeng.com/post/jqgrid-example-download.html#comments</comments>
		<pubDate>Sat, 25 Sep 2010 07:36:52 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[jqGrid]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=223</guid>
		<description><![CDATA[最近慵懒了很多，很少来上面博一博，发下jqGrid的例子的全部文件。 jqGrid 由于文件太大，删掉了所有的jar包，jar是整合struts2.1+spring2.5+hibernate3.2 相关日志jqGrid进阶教程：3、jqGrid的数据格式化二jqGrid是非常强大的，除了上一讲提到的预置的格式化外，还提供自定义的格式化方法，这种方法也是我比较喜欢的方法。 我们接上面的例子 $("#grid_id").jqGrid({ ... colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}} ... ], ... }); ...jqGrid进阶教程：1、jqGrid的样式无法正确显示的原因和解决办法jqGrid引入后，执行，常常会碰到css无法像官方的demo一样正常显示，特别是字体还有一些弹出框， 例如 [caption id="attachment_407" align="alignnone" width="300" caption="CSS变样"][/caption] 这种问题的原因多半是因为html的标准问题，即其写法为 如果要让样式正常，要采用写法如下 ...jqGrid基础学习：11jqGrid的查询时和后台的交互jqGrid查询时和后台交互是一个比较棘手的问题，因为发送过来的数据不规则。 单字段 我们通过Firefox的firebug来进行调试，我们发现提交搜索请求后，向后台发送的参数如下 [caption id="attachment_382" align="alignnone" width="300" caption="单字段同后台交互"][/caption] 由此，我们看出单字段查询...jqGrid基础学习：10jqGrid的多字段查询多字段查询就是高级查询，在jqGrid中，高级查询的麻烦在于同后台的交互。 [caption id="attachment_379" align="alignnone" width="718" caption="jqGrid多字段查询"][/caption] 启用多条件查询的方法，是加上.searchGrid({multipleSearch:true}); 即可。 ...jqGrid基础学习：8jqGrid中在导航条使用按钮jqGrid中可以再导航条上设置按钮，其中jqGrid已经默认设置了一些按钮，此外，用户也可以自定义自己的按钮。 使用默认的方法 系统中默认的按钮主要是对数据进行CRUD的操作的按钮。方法如下 jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true,view:true},{ //这里可以指定edi...]]></description>
			<content:encoded><![CDATA[<p>最近慵懒了很多，很少来上面博一博，发下jqGrid的例子的全部文件。<br />
<a href='http://www.mrzeng.com/wp-content/uploads/2010/09/jqGrid.zip'>jqGrid</a><br />
由于文件太大，删掉了所有的jar包，jar是整合struts2.1+spring2.5+hibernate3.2</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/jqgrid-formater-2.html" title="jqGrid进阶教程：3、jqGrid的数据格式化二">jqGrid进阶教程：3、jqGrid的数据格式化二</a><br /><small>jqGrid是非常强大的，除了上一讲提到的预置的格式化外，还提供自定义的格式化方法，这种方法也是我比较喜欢的方法。
我们接上面的例子


$("#grid_id").jqGrid({
...
   colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}} ... ],
...
});
...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-css.html" title="jqGrid进阶教程：1、jqGrid的样式无法正确显示的原因和解决办法">jqGrid进阶教程：1、jqGrid的样式无法正确显示的原因和解决办法</a><br /><small>jqGrid引入后，执行，常常会碰到css无法像官方的demo一样正常显示，特别是字体还有一些弹出框，

例如
[caption id="attachment_407" align="alignnone" width="300" caption="CSS变样"][/caption]
这种问题的原因多半是因为html的标准问题，即其写法为




如果要让样式正常，要采用写法如下...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-11.html" title="jqGrid基础学习：11jqGrid的查询时和后台的交互">jqGrid基础学习：11jqGrid的查询时和后台的交互</a><br /><small>jqGrid查询时和后台交互是一个比较棘手的问题，因为发送过来的数据不规则。


单字段
我们通过Firefox的firebug来进行调试，我们发现提交搜索请求后，向后台发送的参数如下
[caption id="attachment_382" align="alignnone" width="300" caption="单字段同后台交互"][/caption]
由此，我们看出单字段查询...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-10.html" title="jqGrid基础学习：10jqGrid的多字段查询">jqGrid基础学习：10jqGrid的多字段查询</a><br /><small>多字段查询就是高级查询，在jqGrid中，高级查询的麻烦在于同后台的交互。

[caption id="attachment_379" align="alignnone" width="718" caption="jqGrid多字段查询"][/caption]

启用多条件查询的方法，是加上.searchGrid({multipleSearch:true});    即可。

    ...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid_base_study_8-2.html" title="jqGrid基础学习：8jqGrid中在导航条使用按钮">jqGrid基础学习：8jqGrid中在导航条使用按钮</a><br /><small>jqGrid中可以再导航条上设置按钮，其中jqGrid已经默认设置了一些按钮，此外，用户也可以自定义自己的按钮。

使用默认的方法
系统中默认的按钮主要是对数据进行CRUD的操作的按钮。方法如下

jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true,view:true},{
//这里可以指定edi...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/jqgrid-example-download.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jqGrid进阶教程：1、jqGrid的样式无法正确显示的原因和解决办法</title>
		<link>http://www.mrzeng.com/post/jqgrid-css.html</link>
		<comments>http://www.mrzeng.com/post/jqgrid-css.html#comments</comments>
		<pubDate>Sun, 01 Aug 2010 07:35:11 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[jqGrid]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=220</guid>
		<description><![CDATA[jqGrid引入后，执行，常常会碰到css无法像官方的demo一样正常显示，特别是字体还有一些弹出框， 例如 这种问题的原因多半是因为html的标准问题，即其写法为 &#60;html&#62; &#60;/html&#62;&#60;html&#62; &#60;/html&#62; 如果要让样式正常，要采用写法如下 &#60; !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&#62; &#60;html xmlns="http://www.w3.org/1999/xhtml"&#62; &#60;/html&#62;&#60;html&#62; &#60;/html&#62; 相关日志jqGrid进阶教程：3、jqGrid的数据格式化二jqGrid是非常强大的，除了上一讲提到的预置的格式化外，还提供自定义的格式化方法，这种方法也是我比较喜欢的方法。 我们接上面的例子 $("#grid_id").jqGrid({ ... colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}} ... ], ... }); ...jqGrid例子文件下载最近慵懒了很多，很少来上面博一博，发下jqGrid的例子的全部文件。 jqGrid 由于文件太大，删掉了所有的jar包，jar是整合struts2.1+spring2.5+hibernate3.2...jqGrid基础学习：11jqGrid的查询时和后台的交互jqGrid查询时和后台交互是一个比较棘手的问题，因为发送过来的数据不规则。 单字段 我们通过Firefox的firebug来进行调试，我们发现提交搜索请求后，向后台发送的参数如下 [caption id="attachment_382" align="alignnone" width="300" caption="单字段同后台交互"][/caption] 由此，我们看出单字段查询...jqGrid基础学习：10jqGrid的多字段查询多字段查询就是高级查询，在jqGrid中，高级查询的麻烦在于同后台的交互。 [caption id="attachment_379" align="alignnone" width="718" caption="jqGrid多字段查询"][/caption] 启用多条件查询的方法，是加上.searchGrid({multipleSearch:true}); 即可。 ...jqGrid基础学习：8jqGrid中在导航条使用按钮jqGrid中可以再导航条上设置按钮，其中jqGrid已经默认设置了一些按钮，此外，用户也可以自定义自己的按钮。 使用默认的方法 系统中默认的按钮主要是对数据进行CRUD的操作的按钮。方法如下 [...]]]></description>
			<content:encoded><![CDATA[<p>jqGrid引入后，执行，常常会碰到css无法像官方的demo一样正常显示，特别是字体还有一些弹出框，<br />
<span id="more-220"></span><br />
例如<br />
<div id="attachment_407" class="wp-caption alignnone" style="width: 310px"><a href="http://huashui.org/wp-content/uploads/2010/08/QQ截图未命名.jpg"><img src="http://huashui.org/wp-content/uploads/2010/08/QQ截图未命名-300x95.jpg" alt="CSS变样" title="CSS变样" width="300" height="95" class="size-medium wp-image-407" /></a><p class="wp-caption-text">CSS变样</p></div><br />
这种问题的原因多半是因为html的标准问题，即其写法为</p>
<pre class=prettyprint>
&lt;html&gt;
&lt;/html&gt;&lt;html&gt;
&lt;/html&gt;</pre>
<p>如果要让样式正常，要采用写法如下</p>
<pre class=prettyprint>
&lt; !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;/html&gt;&lt;html&gt;
&lt;/html&gt;</pre>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/jqgrid-formater-2.html" title="jqGrid进阶教程：3、jqGrid的数据格式化二">jqGrid进阶教程：3、jqGrid的数据格式化二</a><br /><small>jqGrid是非常强大的，除了上一讲提到的预置的格式化外，还提供自定义的格式化方法，这种方法也是我比较喜欢的方法。
我们接上面的例子


$("#grid_id").jqGrid({
...
   colModel : [ {name:'sex', edittype:'select', editoptions:{value:"1:男;2:女"}} ... ],
...
});
...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-example-download.html" title="jqGrid例子文件下载">jqGrid例子文件下载</a><br /><small>最近慵懒了很多，很少来上面博一博，发下jqGrid的例子的全部文件。
jqGrid
由于文件太大，删掉了所有的jar包，jar是整合struts2.1+spring2.5+hibernate3.2...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-11.html" title="jqGrid基础学习：11jqGrid的查询时和后台的交互">jqGrid基础学习：11jqGrid的查询时和后台的交互</a><br /><small>jqGrid查询时和后台交互是一个比较棘手的问题，因为发送过来的数据不规则。


单字段
我们通过Firefox的firebug来进行调试，我们发现提交搜索请求后，向后台发送的参数如下
[caption id="attachment_382" align="alignnone" width="300" caption="单字段同后台交互"][/caption]
由此，我们看出单字段查询...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid-base-study-10.html" title="jqGrid基础学习：10jqGrid的多字段查询">jqGrid基础学习：10jqGrid的多字段查询</a><br /><small>多字段查询就是高级查询，在jqGrid中，高级查询的麻烦在于同后台的交互。

[caption id="attachment_379" align="alignnone" width="718" caption="jqGrid多字段查询"][/caption]

启用多条件查询的方法，是加上.searchGrid({multipleSearch:true});    即可。

    ...</small></li><li><a href="http://www.mrzeng.com/post/jqgrid_base_study_8-2.html" title="jqGrid基础学习：8jqGrid中在导航条使用按钮">jqGrid基础学习：8jqGrid中在导航条使用按钮</a><br /><small>jqGrid中可以再导航条上设置按钮，其中jqGrid已经默认设置了一些按钮，此外，用户也可以自定义自己的按钮。

使用默认的方法
系统中默认的按钮主要是对数据进行CRUD的操作的按钮。方法如下

jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:true,del:true,view:true},{
//这里可以指定edi...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/jqgrid-css.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centos/RedHat下安装gcc的方法</title>
		<link>http://www.mrzeng.com/post/centosredhat-gcc.html</link>
		<comments>http://www.mrzeng.com/post/centosredhat-gcc.html#comments</comments>
		<pubDate>Sun, 01 Aug 2010 07:32:43 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Gcc]]></category>
		<category><![CDATA[RedHat]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=217</guid>
		<description><![CDATA[许多人安装centos和redhat的时候没有将开发工具包和开发库给打钩，从而在安装后要编译一些程序出现错误。 此时，安装方法有以下几种：fdc5f25c 1、直接执行（命令行执行这个方法最省事） yum -y install gcc yum -y install gcc-c++ 下载后安装 2、在光盘的centos目录下找到以下包 　　compat-gcc-32-3.2.3-47.3.i386.rpm 　　compat-gcc-32-c++-3.2.3-47.3.i386.rpm 　　cpp-3.4.6-3.i386.rpm 　　gcc-3.4.6-3.i386.rpm 　　gcc-c++-3.4.6-3.i386.rpm 　　gcc-g77-3.4.6-3.i386.rpm 　　gcc-gnat-3.4.6-3.i386.rpm 　　gcc-java-3.4.6-3.i386.rpm 　　gcc-objc-3.4.6-3.i386.rpm 　　glibc-devel-2.3.4-2.25.i386.rpm 　　glibc-headers-2.3.4-2.25.i386.rpm 　　glibc-kernheaders-2.4-9.1.98.EL.i386 进行安装 3、进入应用程序（限装了x-windows） 然后进行程序安装，输入root的密码后，把库打钩进行更新安装。 相关日志Centos的vsftp搭建方法公司要架一台新的图片服务器，对比了centos下的几款ftp，最后还是继续选择vsftp。 搭建的方法如下： 一、下载安装 1、安装Vsftpd yum -y install vsftpd* 2、安装PAM yum -y install pam* 3、安装db4 yum -y install db4* 二、配置vsf...Linux中修改ip的办法切换到root账户下 切换到/etc/sysconfig/network-scripts/目录下； 编辑网卡编码：vi ifcfg-ethX X为第X-1个网卡。 DEVICE=ethX 设备名称 ONBOOT=yes 计算...]]></description>
			<content:encoded><![CDATA[<p>许多人安装centos和redhat的时候没有将开发工具包和开发库给打钩，从而在安装后要编译一些程序出现错误。<br />
此时，安装方法有以下几种：fdc5f25c</p>
<p><span id="more-217"></span><br />
1、直接执行（命令行执行这个方法最省事）</p>
<pre class=prettyprint>
     yum -y install gcc
     yum -y install gcc-c++
</pre>
<p> 下载后安装<br />
2、在光盘的centos目录下找到以下包<br />
　　compat-gcc-32-3.2.3-47.3.i386.rpm</p>
<p>　　compat-gcc-32-c++-3.2.3-47.3.i386.rpm</p>
<p>　　cpp-3.4.6-3.i386.rpm</p>
<p>　　gcc-3.4.6-3.i386.rpm</p>
<p>　　gcc-c++-3.4.6-3.i386.rpm</p>
<p>　　gcc-g77-3.4.6-3.i386.rpm</p>
<p>　　gcc-gnat-3.4.6-3.i386.rpm</p>
<p>　　gcc-java-3.4.6-3.i386.rpm</p>
<p>　　gcc-objc-3.4.6-3.i386.rpm</p>
<p>　　glibc-devel-2.3.4-2.25.i386.rpm</p>
<p>　　glibc-headers-2.3.4-2.25.i386.rpm</p>
<p>　　glibc-kernheaders-2.4-9.1.98.EL.i386<br />
进行安装<br />
3、进入应用程序（限装了x-windows）<br />
然后进行程序安装，输入root的密码后，把库打钩进行更新安装。</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/centos-vsftpd.html" title="Centos的vsftp搭建方法">Centos的vsftp搭建方法</a><br /><small>公司要架一台新的图片服务器，对比了centos下的几款ftp，最后还是继续选择vsftp。
搭建的方法如下：
一、下载安装
   1、安装Vsftpd

yum -y install vsftpd*
  
   2、安装PAM

yum -y install pam*
   
   3、安装db4
 
yum -y install db4*
 


二、配置vsf...</small></li><li><a href="http://www.mrzeng.com/post/linux-change-ip-solution.html" title="Linux中修改ip的办法">Linux中修改ip的办法</a><br /><small>切换到root账户下

切换到/etc/sysconfig/network-scripts/目录下；

编辑网卡编码：vi ifcfg-ethX X为第X-1个网卡。

DEVICE=ethX                                        设备名称
ONBOOT=yes                                        计算...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/centosredhat-gcc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux中修改ip的办法</title>
		<link>http://www.mrzeng.com/post/linux-change-ip-solution.html</link>
		<comments>http://www.mrzeng.com/post/linux-change-ip-solution.html#comments</comments>
		<pubDate>Fri, 05 Mar 2010 07:30:27 +0000</pubDate>
		<dc:creator>zenghuashui</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[IP]]></category>

		<guid isPermaLink="false">http://www.mrzeng.com/?p=215</guid>
		<description><![CDATA[切换到root账户下 切换到/etc/sysconfig/network-scripts/目录下； 编辑网卡编码：vi ifcfg-ethX X为第X-1个网卡。 DEVICE=ethX 设备名称 ONBOOT=yes 计算机启动时是否激活网卡 BOOTPROTO=static 获取ip地址的方式， IPADDR=192.168.2.111 ip地址 NETMASK=255.255.255.0 子网掩码 GATEWAY=192.168.0.1 网关 重启网络 /etc/init.d/network restart 相关日志Centos的vsftp搭建方法公司要架一台新的图片服务器，对比了centos下的几款ftp，最后还是继续选择vsftp。 搭建的方法如下： 一、下载安装 1、安装Vsftpd yum -y install vsftpd* 2、安装PAM yum -y install pam* 3、安装db4 yum -y install db4* 二、配置vsf...Centos/RedHat下安装gcc的方法许多人安装centos和redhat的时候没有将开发工具包和开发库给打钩，从而在安装后要编译一些程序出现错误。 此时，安装方法有以下几种：fdc5f25c 1、直接执行（命令行执行这个方法最省事） yum -y install gcc yum -y install gcc-c++ 下载后安装 2、在光盘的centos目录下找到以下包 　　comp...linux下的文件的压缩和解压缩SSH常用SecureCRT 5.5进行连接，使用sz和rz命令来上传下去。但这个命令只支持单文件传输，多文件就比较麻烦。但是如果使用压缩包的方式就省事很多。我们来看看在liux下压缩包的压缩和解压方法. tar -c: [...]]]></description>
			<content:encoded><![CDATA[<p>切换到root账户下<br />
<span id="more-215"></span><br />
切换到/etc/sysconfig/network-scripts/目录下；</p>
<p>编辑网卡编码：vi ifcfg-eth<strong>X</strong> <strong>X</strong>为第<strong>X</strong>-1个网卡。</p>
<p>DEVICE=eth<strong>X</strong>                                        设备名称<br />
ONBOOT=yes                                        计算机启动时是否激活网卡<br />
BOOTPROTO=static                                获取ip地址的方式，<br />
IPADDR=192.168.2.111                         ip地址<br />
NETMASK=255.255.255.0                      子网掩码<br />
GATEWAY=192.168.0.1                   网关</p>
<p>重启网络<br />
/etc/init.d/network restart</p>
<h3  class="related_post_title">相关日志</h3><ul class="related_post"><li><a href="http://www.mrzeng.com/post/centos-vsftpd.html" title="Centos的vsftp搭建方法">Centos的vsftp搭建方法</a><br /><small>公司要架一台新的图片服务器，对比了centos下的几款ftp，最后还是继续选择vsftp。
搭建的方法如下：
一、下载安装
   1、安装Vsftpd

yum -y install vsftpd*
  
   2、安装PAM

yum -y install pam*
   
   3、安装db4
 
yum -y install db4*
 


二、配置vsf...</small></li><li><a href="http://www.mrzeng.com/post/centosredhat-gcc.html" title="Centos/RedHat下安装gcc的方法">Centos/RedHat下安装gcc的方法</a><br /><small>许多人安装centos和redhat的时候没有将开发工具包和开发库给打钩，从而在安装后要编译一些程序出现错误。
此时，安装方法有以下几种：fdc5f25c


1、直接执行（命令行执行这个方法最省事）

     yum -y install gcc
     yum -y install gcc-c++

 下载后安装
2、在光盘的centos目录下找到以下包
　　comp...</small></li><li><a href="http://www.mrzeng.com/post/linux-tar-zip-gz.html" title="linux下的文件的压缩和解压缩">linux下的文件的压缩和解压缩</a><br /><small>SSH常用SecureCRT 5.5进行连接，使用sz和rz命令来上传下去。但这个命令只支持单文件传输，多文件就比较麻烦。但是如果使用压缩包的方式就省事很多。我们来看看在liux下压缩包的压缩和解压方法.


tar

-c: 建立压缩档案
-x：解压
-t：查看内容
-r：向压缩归档文件末尾追加文件
-u：更新原压缩包中的文件

这五个是独立的命令，压缩解压都要用到其中一个...</small></li><li><a href="http://www.mrzeng.com/post/vista-localhost-ip.html" title="Vista中无法使用localhost访问本机的解决方法">Vista中无法使用localhost访问本机的解决方法</a><br /><small>最近，买了个笔记本，装的是vista，奇怪的是，装上服务器套件后，死活不能用localhost访问，但127.0.0.1可以。搜索了一下，解决办法如下：

找到WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS 文件。HOSTS是文件名，这个文件没有扩展名。

用记事本打开它，发现多了一个

::1             localhost

删了它，保存。问题...</small></li><li><a href="http://www.mrzeng.com/post/php-get-client-ip.html" title="PHP获取客户端IP的几种方法">PHP获取客户端IP的几种方法</a><br /><small>PHP获取客户端IP有几个函数，下面介绍下三种常用的写法。

第一种：

< ?php
function GetIP() { //获取IP 
    if ($_SERVER["HTTP_X_FORWARDED_FOR"]) 
        $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; 
    else if ($_SERVER["HTTP_C...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.mrzeng.com/post/linux-change-ip-solution.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

