<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>这里有水,没有鱼</title>
		<link>http://www.getroad.cn/blog/</link>
		<description>我去你大爷的机器人,看你丫现在怎么发! grd@getroad.cn</description>
		<copyright>Copyright (C) 2004 Security Angel Team [S4T] All Rights Reserved.</copyright>
		<generator>SaBlog-X Version 1.6 Build 20080806</generator>
		<lastBuildDate>Tue, 07 Feb 2012 08:41:12 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=867</guid>
			<title>查看apache已加载模块（zz）</title>
			<author>bizman</author>
			<description><![CDATA[<p>http://hi.baidu.com/youngky2008/blog/item/6fd07e9124fd9b1a7af48017.html</p>
<p>#httpd&nbsp;&nbsp;-M&nbsp;&nbsp;--已成功加载的模块</p>
<p><span>Loaded&nbsp;Modules:&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>core_module&nbsp;(</span><span>static</span><span>)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>mpm_prefork_module&nbsp;(</span><span>static</span><span>)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>http_module&nbsp;(</span><span>static</span><span>)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>so_module&nbsp;(</span><span>static</span><span>)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authn_file_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authn_dbm_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authn_anon_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authn_default_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authn_alias_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authz_host_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authz_groupfile_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authz_user_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authz_dbm_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authz_owner_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>authz_default_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>auth_basic_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>auth_digest_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>file_cache_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>cache_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span></p>
<p><span>&nbsp;disk_cache_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>dumpio_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>reqtimeout_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>include_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>filter_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>charset_lite_module&nbsp;(shared)&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></p>
<p><span>Syntax&nbsp;OK&nbsp;&nbsp;&nbsp;</span></p>
<p><span>LoadModule auth_basic_module modules/mod_auth_basic.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#基本认证模块<br />
LoadModule auth_digest_module modules/mod_auth_digest.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#使用MD5的用户验证模块<br />
LoadModule authn_file_module modules/mod_authn_file.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#使用文本文件的用户验证<br />
LoadModule authn_alias_module modules/mod_authn_alias.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#在原有的验证方法上提供拓展的验证<br />
LoadModule authn_anon_module modules/mod_authn_anon.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#允许匿名访问已验证的区域<br />
LoadModule authn_dbm_module modules/mod_authn_dbm.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#使用数据库文件验证<br />
LoadModule authn_default_module modules/mod_authn_default.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#认证的撤销模块<br />
LoadModule authz_host_module modules/mod_authz_host.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#基于主机名（或IP）的组授权<br />
LoadModule authz_user_module modules/mod_authz_user.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#用户授权<br />
LoadModule authz_owner_module modules/mod_authz_owner.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#依照文件拥有者的授权<br />
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so&nbsp;&nbsp; &nbsp;#使用明文文件的组授权<br />
LoadModule authz_dbm_module modules/mod_authz_dbm.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#使用数据库的组授权<br />
LoadModule authz_default_module modules/mod_authz_default.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#授权的撤销模块<br />
LoadModule ldap_module modules/mod_ldap.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#LDAP提供其它LADP的连接接和缓存服务模块<br />
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#允许使用一个LDAP的目录来存放HTTP基本授权文件<br />
LoadModule include_module modules/mod_include.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#服务器端解析HTML语法的模块<br />
LoadModule log_config_module modules/mod_log_config.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#记录服务器请求日志<br />
LoadModule logio_module modules/mod_logio.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#记录每个请求的I/O字节数<br />
LoadModule env_module modules/mod_env.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#设置传递给CGI脚本和SSI页面的环境？<br />
LoadModule ext_filter_module modules/mod_ext_filter.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#在递交给客户端以前通过外部程序发送相应本体<br />
LoadModule mime_magic_module modules/mod_mime_magic.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#通过查看一个文件的一些内容判断MIME类别&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
LoadModule expires_module modules/mod_expires.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#根据用户的特别设定来生成失效和隐藏控制的http头信息<br />
LoadModule deflate_module modules/mod_deflate.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#传送给客户端以前压缩数据<br />
LoadModule headers_module modules/mod_headers.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#定制响应和回复的HTTP头的内容&nbsp;&nbsp; &nbsp;<br />
LoadModule usertrack_module modules/mod_usertrack.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#在一个站点上跟踪用户的登录信息<br />
LoadModule setenvif_module modules/mod_setenvif.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#允许经过客户编码请求来设定环境变量&nbsp;&nbsp; &nbsp;<br />
LoadModule mime_module modules/mod_mime.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#通过文件的一些属性判读MIME类型<br />
LoadModule dav_module modules/mod_dav.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#基于WEB的创作和版本？<br />
LoadModule status_module modules/mod_status.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#提供服务器运行信息<br />
LoadModule autoindex_module modules/mod_autoindex.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#自动列出一个目录的索引表（类似于UNIX上的ls和DOS下的dir）<br />
LoadModule info_module modules/mod_info.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#提供服务配置的一个综合概况<br />
LoadModule dav_fs_module modules/mod_dav_fs.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#为mod_dav提供文件系统支持<br />
LoadModule vhost_alias_module modules/mod_vhost_alias.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#为虚拟主机提供动态配置<br />
LoadModule negotiation_module modules/mod_negotiation.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#为内容判断提供支持<br />
LoadModule dir_module modules/mod_dir.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#为&ldquo;／&rdquo;结尾的重定向和目录文件索引<br />
LoadModule actions_module modules/mod_actions.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#提供了基于请求和媒体类型的CGI脚本执行的支持<br />
LoadModule speling_module modules/mod_speling.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#尝试纠正用户输入错误的网址<br />
LoadModule userdir_module modules/mod_userdir.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#用户特定目录<br />
LoadModule alias_module modules/mod_alias.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#提供主机文件系统不同部分的文件树映射为URL<br />
LoadModule rewrite_module modules/mod_rewrite.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#提供在运行中基于规则的地址重写的支持<br />
LoadModule proxy_module modules/mod_proxy.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#基于HTTP1.1协议的网关或代理服务器<br />
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#负载均衡的mod_proxy拓展<br />
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;＃为mod_proxy提供的ftp支持模块<br />
LoadModule proxy_http_module modules/mod_proxy_http.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#为mod_proxy提供的http支持模块<br />
LoadModule proxy_connect_module modules/mod_proxy_connect.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#mod_proxy的连接处理拓展模块<br />
LoadModule cache_module modules/mod_cache.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#目录隐藏在URL外？<br />
LoadModule suexec_module modules/mod_suexec.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#允许CGI脚本使用特定的用户和组运行<br />
LoadModule disk_cache_module modules/mod_disk_cache.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#管理内容隐藏存放来适合URL的工具？<br />
LoadModule file_cache_module modules/mod_file_cache.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#在内存中缓存一个文件列表<br />
LoadModule mem_cache_module modules/mod_mem_cache.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#隐藏内容于URL<br />
LoadModule cgi_module modules/mod_cgi.so&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;#执行CGI脚本  </span></p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=867</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-06 04:41</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=866</guid>
			<title>linux下rar解压(rarlinux下载，安装 ，使用)</title>
			<author>bizman</author>
			<description><![CDATA[<div>
<h1><font size="2">linux下rar解压(rarlinux下载，安装 ，使用)</font></h1>
</div>
<p>（附件说明：两文件下载后，解压，把解压的都放到一个文件夹里。）<br />
linux下想解压rar文件 必须安装软件，我使用到是rarlinux&nbsp;&nbsp;<br />
下面是下载地址<br />
rarlinux官方网站下载地址<br />
<a target="_blank">http://www.rarsoft.com/download.htm</a><br />
<br />
华军软件园下载地址<br />
<a target="_blank">http://www.onlinedown.net/soft/3.htm</a><br />
<br />
天空软件站下载地址<br />
<a target="_blank">http://www.skycn.com/soft/3455.html</a><br />
<br />
安装 &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  //tar.gz文件详细解压步骤<br />
先解压tar.gz文件 &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;<br />
直接 cd 到相应到文件夹<br />
make &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  // 如果提示权限不够 su root 取得最高权限<br />
然后 make install<br />
恭喜你安装成功<br />
<br />
最后<br />
使用rarlinux解压rar文件<br />
使用命令&nbsp;&nbsp;<br />
<br />
unrar e filesname.rar<br />
<br />
解压rar文件<br />
ok！～<br />
<br />
============================================<br />
rarlinux 使用（更多功能）<br />
<br />
查看压缩包中的文档<br />
$rar l XXX.rar 或 $rar v XXX.rar<br />
<br />
查看压缩包中的文档(只看有什么文档)<br />
$rar lb XXX.rar 或 $rar vb XXX.rar<br />
<br />
查看压缩包中的文档(周详信息)<br />
$rar lt XXX.rar 或 $rar vt XXX.rar<br />
<br />
============================================<br />
把压缩包的内容解压到当前目录<br />
$rar e XXX.rar<br />
<br />
把压缩包的内容解压到指定目录，比如/home/yxd/tmp/下面<br />
$rar e XXX.rar /home/yxd/tmp/<br />
<br />
把压缩包解的内容压到指定目录，比如/home/yxd/tmp/下面，包含压缩包中的路径<br />
$rar x XXX.rar /home/yxd/tmp/<br />
<br />
============================================<br />
压缩指定的一个文档，比如aaa，以默认压缩率<br />
$rar a XXX.rar aaa<br />
<br />
压缩指定的一个文档，比如aaa，以最大压缩率<br />
$rar a -m5 XXX.rar aaa<br />
<br />
压缩指定的一个目录下的任何文档，比如ddd目录下的任何文档<br />
$rar a XXX.rar ddd/<br />
<br />
压缩指定的一个目录下的任何文档，比如ddd目录下的任何文档和任何子目录<br />
$rar a -r XXX.rar ddd/<br />
<br />
压缩指定的一个目录下的任何文档，比如ddd目录下的任何文档和任何子目录，但是不包含空目录<br />
$rar a -r -ed XXX.rar ddd/<br />
<br />
压缩指定的一个目录下的任何文档，比如ddd目录，连目录也一起压缩，包括子目录<br />
$rar a XXX.rar ddd<br />
<br />
http://bbs.tarena.com.cn/thread-176626-1-1.html</p>
<pre class="reply-text mb10" id="best-answer-content"><a target="_blank" href="http://www.rarlab.com/download.htm">http://www.rarlab.com/download.htm</a> 下载RAR 4.01 for Linux 	Command line only 解压后rar，unrar，rar_static丢到/home/XXXX/bin里就可以拉 （un）rar用法终端输入（un）rar就有<br /><br /><br />yum -y install rar</pre>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=866</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-06 03:54</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=865</guid>
			<title>Centos5.7系统yum安装Memcache</title>
			<author>bizman</author>
			<description><![CDATA[<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Centos5.7<font face="宋体">系统</font><font face="Times New Roman">yum</font><font face="宋体">安装</font><font face="Times New Roman">Memcache</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">标准的<font face="Times New Roman">Centos5.7</font><font face="宋体">的软件库里没有</font><font face="Times New Roman">Memcache</font><font face="宋体">相应的包，所以，要导入第三方软件库，这里推荐的是</font><font face="Times New Roman">Dag&nbsp;Wieers</font><font face="宋体">库，（现在叫</font><font face="Times New Roman">RPMForge</font><font face="宋体">了），安装方法如下：</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">wget&nbsp;</span><span><a href="http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm"><span class="15" style="font-family: ">http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</span></a></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">rpm&nbsp;-ivh&nbsp;rpmforge-release-0.3.6-1.el5.rf.i386.rpm</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">查看相关软件包</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Yum&nbsp;search&nbsp;memcached&nbsp;</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">有了，可以进行安装了</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Yum&nbsp;-y&nbsp;install&nbsp;memcached</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Memcache<font face="宋体">关联</font><font face="Times New Roman">php</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Yum&nbsp;-y&nbsp;install&nbsp;php-pecl-memcache</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">验证安装结果</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Memcached&nbsp;-h</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Php&nbsp;-m&nbsp;|&nbsp;grep&nbsp;memcache</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Memcache<font face="宋体">的基本设置</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">启动<font face="Times New Roman">memcache</font><font face="宋体">的服务端：</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Memcached&nbsp;-d&nbsp;-m&nbsp;100&nbsp;-u&nbsp;root&nbsp;-l&nbsp;222.186.xx.xxx&nbsp;-p&nbsp;11211&nbsp;-c&nbsp;512&nbsp;-P&nbsp;/tmp/memcached.pid</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">参数说明：</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-d<font face="宋体">选项是启动一个守护进程；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-m<font face="宋体">是分配给</font><font face="Times New Roman">Memcache</font><font face="宋体">使用的内存数量，单位是</font><font face="Times New Roman">MB</font><font face="宋体">，我这里是</font><font face="Times New Roman">100MB</font><font face="宋体">；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-u<font face="宋体">是运行</font><font face="Times New Roman">Memcache</font><font face="宋体">的用户，我这里是</font><font face="Times New Roman">root</font><font face="宋体">；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-l<font face="宋体">是监听的服务器</font><font face="Times New Roman">IP</font><font face="宋体">地址我这里指定了服务器的</font><font face="Times New Roman">IP</font><font face="宋体">地址</font><font face="Times New Roman">222.186.xx.xxx</font><font face="宋体">；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-p<font face="宋体">是设置</font><font face="Times New Roman">Memcache</font><font face="宋体">监听的端口，我这里设置了</font><font face="Times New Roman">11211</font><font face="宋体">，最好是</font><font face="Times New Roman">1024</font><font face="宋体">以上的端口；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-c<font face="宋体">选项是最大运行的并发连接数，默认是</font><font face="Times New Roman">1024</font><font face="宋体">，我这里设置了</font><font face="Times New Roman">512</font><font face="宋体">，按照你服务器的负载量来设定；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">-P<font face="宋体">是设置保存</font><font face="Times New Roman">Memcache</font><font face="宋体">的</font><font face="Times New Roman">pid</font><font face="宋体">文件，我这里是保存在&nbsp;</font><font face="Times New Roman">/tmp/memcached.pid</font><font face="宋体">；</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">检查<font face="Times New Roman">memcached</font><font face="宋体">是否启动</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Netstat&nbsp;-an&nbsp;|&nbsp;more</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;222.186.xx.xxx:11211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.0.0.0:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LIST</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">设置开机启动</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Chkconfig&nbsp;memcached&nbsp;on</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">启动和停止</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Service&nbsp;memcached&nbsp;start&nbsp;|&nbsp;stop</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Or&nbsp;/etc/init.d/memcached&nbsp;start&nbsp;|&nbsp;stop</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">重启<font face="Times New Roman">centos&nbsp;</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Shutdown&nbsp;-r&nbsp;now</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Or&nbsp;reboot</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt">&nbsp;</div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">Memcached<font face="宋体">环境测试</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">运行以下的<font face="Times New Roman">php</font><font face="宋体">文件，如果有输出</font><font face="Times New Roman">this&nbsp;is&nbsp;a&nbsp;test!,</font><font face="宋体">就表示环境搭建成功，开始你的</font><font face="Times New Roman">memcache</font><font face="宋体">之旅吧！</font></span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">&lt;?php&nbsp;</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">$mem&nbsp;=&nbsp;new&nbsp;Memcache;</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">$mem-&gt;connect(&quot;222.186.xx.xxx&quot;,&nbsp;11211);&nbsp;</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">$mem-&gt;set('key',&nbsp;'This&nbsp;is&nbsp;a&nbsp;test!',&nbsp;0,&nbsp;60);&nbsp;</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">$val&nbsp;=&nbsp;$mem-&gt;get('key');&nbsp;</span></div>
<div class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: ">echo&nbsp;$val;&nbsp;</span></div>
<p><span style="font-family: ">?&gt; <br />
<br />
from:http://mycnarms.blog.51cto.com/614646/746346<br />
</span></p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=865</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-02 14:28</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=864</guid>
			<title>Bash 使用技巧大补贴</title>
			<author>bizman</author>
			<description><![CDATA[<p>Bash 是我们经常与之打交道的 Shell 程序，本文针对其使用技巧进行了搜罗。相信在你看过这些内容之后，定会在 Bash 的世界里游刃有余。</p>
<ul>
    <li>从历史中执行命令  有时候，我们需要在 Bash 中重复执行先前的命令。你当然可以使用上方向键来查看之前曾经运行过的命令。但这里有一种更好的方式：你可以按 Ctrl + r 组合键进入历史搜索模式，一旦找到需要重复执行的命令，按回车键即可。</li>
    <li>重复命令参数  先来看一个例子： <code> mkdir /path/to/exampledir cd !$ </code>  本例中，第一行命令将创建一个目录，而第二行的命令则转到刚创建的目录。这里，&ldquo;!$&rdquo;的作用就是重复前一个命令的参数。事实上，不仅是命令的参数可以重复，命令的选项同样可以。另外，Esc + . 快捷键可以切换这些命令参数或选项。</li>
    <li>用于编辑的快捷键
    <ul>
        <li>Ctrl + a：将光标定位到命令的开头</li>
        <li>Ctrl + e：与上一个快捷键相反，将光标定位到命令的结尾</li>
        <li>Ctrl + u：剪切光标之前的内容</li>
        <li>Ctrl + k：与上一个快捷键相反，剪切光标之后的内容</li>
        <li>Ctrl + y：粘贴以上两个快捷键所剪切的内容</li>
        <li>Ctrl + t：交换光标之前两个字符的顺序</li>
        <li>Ctrl + w：删除光标左边的参数（选项）或内容</li>
        <li>Ctrl + l：清屏</li>
    </ul>
    </li>
    <li>处理作业  首先，使用 Ctrl + z 快捷键可以让正在执行的命令挂起。如果要让该进程在后台执行，那么可以执行 bg 命令。而 fg 命令则可以让该进程重新回到前台来。使用 jobs 命令能够查看到哪些进程在后台执行。  你也可以在 fg 或 bg 命令中使用作业 id，如： <code>fg %3</code>  又如： <code>bg %7</code></li>
    <li>使用置换
    <ul>
        <li>命令置换  先看例子： <code>du -h -a -c $(find . -name *.conf 2&gt;&amp;-)</code>  注意 $() 中的部分，这将告诉 Bash 运行 find 命令，然后把返回的结果作为 du 的参数。</li>
        <li>进程置换  仍然先看例子： <code>diff &lt;(ps axo comm) &lt;(ssh user@host ps axo comm)</code>  该命令将比较本地系统和远程系统中正在运行的进程。请注意 &lt;() 中的部分。</li>
        <li>xargs  看例： <code>find . -name *.conf -print0 | xargs -0 grep -l -Z mem_limit | xargs -0 -i cp {} {}.bak</code>  该命令将备份当前目录中的所有 .conf 文件。</li>
    </ul>
    </li>
    <li>使用管道  下面是一个简单的使用管道的例子： <code>ps aux | grep init</code>  这里，&ldquo;|&rdquo;操作符将 ps aux 的输出重定向给 grep init。  下面还有两个稍微复杂点的例子： <code>ps aux | tee filename | grep init</code>  及： <code>ps aux | tee -a filename | grep init</code></li>
    <li>将标准输出保存为文件  你可以将命令的标准输出内容保存到一个文件中，举例如下： <code>ps aux &gt; filename</code>  注意其中的&ldquo;&gt;&rdquo;符号。  你也可以将这些输出内容追加到一个已存在的文件中： <code>ps aux &gt;&gt; filename</code>  你还可以分割一个较长的行： <code>command1 | command2 | ... | commandN &gt; tempfile1</code> <code>cat tempfile1 | command1 | command2 | ... | commandN &gt; tempfile2</code></li>
    <li>标准流：重定向与组合  重定向流的例子： <code>ps aux 2&gt;&amp;1 | grep init</code>  这里的数字代表：
    <ul>
        <li>0：stdin</li>
        <li>1：stdout</li>
        <li>2：sterr</li>
    </ul>
    上面的命令中，&ldquo;grep init&rdquo;不仅搜索&ldquo;ps aux&rdquo;的标准输出，而且搜索 sterr 输出。</li>
</ul>
<p><a href="http://www.linuxtutorialblog.com/post/tutorial-the-best-tips-tricks-for-bash">The best tips &amp; tricks for bash, explained</a> [Linux Tutorials Blog]</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=864</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-02 14:24</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=863</guid>
			<title>wget 使用</title>
			<author>bizman</author>
			<description><![CDATA[<p>wget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repo</p>
<p>wget 是一个命令行的下载工具。对于我们这些 Linux 用户来说，几乎每天都在使用它。下面为大家介绍几个有用的 wget 小技巧，可以让你更加高效而灵活的使用 wget。</p>
<ul>
    <li><code>$ wget -r -np -nd http://example.com/packages/</code></li>
</ul>
<p>这条命令可以下载 http://example.com 网站上 packages 目录中的所有文件。其中，<code>-np</code> 的作用是不遍历父目录，<code>-nd</code> 表示不在本机重新创建目录结构。</p>
<ul>
    <li><code>$ wget -r -np -nd --accept=iso http://example.com/centos-5/i386/</code></li>
</ul>
<p>与上一条命令相似，但多加了一个 <code>--accept=iso</code> 选项，这指示 wget 仅下载 i386 目录中所有扩展名为 iso 的文件。你也可以指定多个扩展名，只需用逗号分隔即可。</p>
<ul>
    <li><code>$ wget -i filename.txt</code></li>
</ul>
<p>此命令常用于批量下载的情形，把所有需要下载文件的地址放到 filename.txt 中，然后 wget 就会自动为你下载所有文件了。</p>
<ul>
    <li><code>$ wget -c http://example.com/really-big-file.iso</code></li>
</ul>
<p>这里所指定的 <code>-c</code> 选项的作用为断点续传。</p>
<ul>
    <li><code>$ wget -m -k (-H) http://www.example.com/</code></li>
</ul>
<p>该命令可用来镜像一个网站，wget 将对链接进行转换。如果网站中的图像是放在另外的站点，那么可以使用 <code>-H</code> 选项。</p>
<p>&nbsp;</p>
<p>from:http://linuxtoy.org/archives/wget-tips.html</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=863</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-02 14:22</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=862</guid>
			<title>如何查看CentOS版本方法</title>
			<author>bizman</author>
			<description><![CDATA[<p>有以下命令可以查看：<br />
<br />
# lsb_release -a<br />
LSB Version:&nbsp;&nbsp;&nbsp;  :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch<br />
Distributor ID: CentOS<br />
Description:&nbsp;&nbsp;&nbsp;  CentOS release 5.4 (Final)<br />
Release:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  5.4<br />
Codename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Final<br />
<br />
这个命令适用于所有的linux，包括Redhat、SuSE、Debian等发行版。<br />
<br />
<br />
root@MyMail ~ # uname<br />
Linux<br />
root@MyMail ~ # uname -r<br />
2.6.18-164.el5<br />
<br />
以下二种方法适用于RedHat,CentOS<br />
<br />
root@MyMail ~ # cat  /etc/redhat-release<br />
CentOS release 5.4 (Final)<br />
<br />
<br />
<br />
登录到linux执行rpm -q redhat-release <br />
<br />
#rpm -q redhat-release<br />
或CentOS<br />
<br />
root@MyMail ~ # rpm -q centos-release<br />
centos-release-5-4.el5.centos.1</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=862</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-02 14:06</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=861</guid>
			<title>CentOS安装php扩展mcrypt</title>
			<author>bizman</author>
			<description><![CDATA[<div class="cnt" id="blog_text">
<div class="blog_content">
<p>本文实际上是在CentOS下进行的，原理和在Ubuntu下源码安装一样,下图首先示例mcrypt和<span class="hilite1"><font style="background-color: #ffff00">php</font></span>的依赖关系</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>基本原理是：首先使mcrypt软件能够运行，然后安装<span class="hilite1"><font style="background-color: #ffff00">php</font></span>扩展模块，并在<span class="hilite1"><font style="background-color: #ffff00">php</font></span>.ini配置。</p>
<p>这里注意的是mcrypt软件依赖libmcrypt和mhash两个库，所以安装配置顺序从右至左</p>
<p>&nbsp;</p>
<p><strong>I 下载安装mcrypt</strong></p>
<p>&nbsp;</p>
<p><span style="color: #ff6600">1.先去http://www.sourceforge.net下载Libmcrypt,mhash,mcrypt安装包</span> ,下面是我找到的链接</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;  Libmcrypt(<a href="http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?use_mirror=jaist" class="sfx_qalogger_element sfx_qalogger_clickable"><font color="#e9650e">libmcrypt-2.5.8.tar.gz</font></a> )：<a href="http://sourceforge.net/project/showfiles.php?group_id=87941&amp;package_id=91774&amp;release_id=487459"><font color="#e9650e">http://sourceforge.net/project/showfiles.<span class="hilite1"><font style="background-color: #ffff00">php</font></span>?group_id=87941&amp;package_id=91774&amp;release_id=487459</font></a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;  mcrypt(<a href="http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?use_mirror=jaist" class="sfx_qalogger_element sfx_qalogger_clickable"><font color="#e9650e">mcrypt-2.6.8.tar.gz</font></a> ):<a href="http://sourceforge.net/project/showfiles.php?group_id=87941&amp;package_id=91948&amp;release_id=642101"><font color="#e9650e">http://sourceforge.net/project/showfiles.<span class="hilite1"><font style="background-color: #ffff00">php</font></span>?group_id=87941&amp;package_id=91948&amp;release_id=642101</font></a></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;  mhash(<a href="http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?use_mirror=jaist" class="sfx_qalogger_element sfx_qalogger_clickable"><font color="#e9650e">mhash-0.9.9.9.tar.gz</font></a> ):<a href="http://sourceforge.net/project/showfiles.php?group_id=4286&amp;package_id=4300&amp;release_id=645636"><font color="#e9650e">http://sourceforge.net/project/showfiles.<span class="hilite1"><font style="background-color: #ffff00">php</font></span>?group_id=4286&amp;package_id=4300&amp;release_id=645636</font></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="color: #ff6600">2</span> <span style="color: #ff6600">.先安装Libmcrypt</span></p>
<p>&nbsp;&nbsp;  #tar -zxvf libmcrypt-2.5.8.tar.gz</p>
<p>&nbsp;&nbsp;  #cd libmcrypt-2.5.8</p>
<p>&nbsp;&nbsp;  #./configure</p>
<p>&nbsp;&nbsp;  #make</p>
<p>&nbsp;&nbsp;  #make install</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;  说明：libmcript默认安装在<span style="color: #ff0000">/usr/local</span></p>
<p>&nbsp;</p>
<p><span style="color: #ff6600">3.安装mhash</span></p>
<p>&nbsp;&nbsp;  #tar -zxvf mhash-0.9.9.9.tar.gz</p>
<p>&nbsp;&nbsp;  #cd mhash-0.9.9.9</p>
<p>&nbsp;&nbsp;  #./configure</p>
<p>&nbsp;&nbsp;  #make</p>
<p>&nbsp;&nbsp;  #make install</p>
<p>&nbsp;</p>
<p><span style="color: #ff6600">4.安装mcrypt</span></p>
<p>&nbsp;&nbsp;  #tar -zxvf mcrypt-2.6.8.tar.gz</p>
<p>&nbsp;&nbsp;  #cd mcrypt-2.6.8</p>
<p>&nbsp;&nbsp;  #<span style="color: #ff0000">LD_LIBRARY_PATH=/usr/local</span> ./configure</p>
<p>&nbsp;&nbsp;  #make</p>
<p>&nbsp;&nbsp;  #make install</p>
<p>&nbsp;&nbsp;  说明：由于在配置Mcrypt时，会找不到libmcrypt的链接库，导致无法编译，因为Libmcrypt的链接库在/usr/local/文件夹下。因些在配置mcrypt时要加入LD_LIBRARY_PATH=/usr/local导入键接库</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>II. 安装<span class="hilite1"><font style="background-color: #ffff00">PHP</font></span>扩展模块</strong></p>
<p>接着就要为<span class="hilite1"><font style="background-color: #ffff00">PHP</font></span>添加mcrypt模块了</p>
<p>&nbsp;</p>
<p><span style="color: #ff6600">1. 静态编译</span></p>
<p>在任意<span class="hilite1"><font style="background-color: #ffff00">PHP</font></span>文件中加入函数 phpinfo()，即可取得目前<span class="hilite1"><font style="background-color: #ffff00">PHP</font></span>的配置<br />
在这些配置后面新增需要加入的配置：&rsquo;&ndash;with-mcrypt=/usr/local/include&rsquo;<br />
然后进入<span class="hilite1"><font style="background-color: #ffff00">php</font></span>源代码目录，执行这条完整的configure命令</p>
<p>配置完成，下面进行源码包的制作和安装<br />
make clean （一定需要）<br />
make<br />
make install</p>
<p>&nbsp;</p>
<p><span style="color: #ff6600">2. 动态加载</span></p>
<p><br />
使用<span class="hilite1"><font style="background-color: #ffff00">php</font></span>的常见问题是：编译<span class="hilite1"><font style="background-color: #ffff00">php</font></span>时忘记添加某扩展，后来想添加扩展，但是因为安装<span class="hilite1"><font style="background-color: #ffff00">php</font></span>后又装了一些东西如PEAR等，不想删除目录重装，于是可以采用phpize。方法是：</p>
<p>&nbsp;</p>
<p><strong><span style="color: #ff0000">要有与现有<span class="hilite1"><font style="background-color: #ffff00">php</font></span>完全相同的<span class="hilite1"><font style="background-color: #ffff00">php</font></span>压缩包</span> </strong>。我用的是<span class="hilite1"><font style="background-color: #ffff00">php</font></span>-5.2.6.tar.gz。展开后进入里面的ext/mcrypt目录 (里面是mcrypt的<span class="hilite1"><font style="background-color: #ffff00">php</font></span>扩展)，然后执行/usr/local/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>/bin/phpize。phpize是安装<span class="hilite1"><font style="background-color: #ffff00">php</font></span>时安装好的一个工具，如果你的机器没有安装phpize工具，那么可能还是要make,make install <span class="hilite1"><font style="background-color: #ffff00">php</font></span>，仅仅为了得到phpize.</p>
<p>执行完后，会发现当前目录下多了一些configure文件，如果没报错，则根据提示运行</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;  <span><span>./configure --with-<span class="hilite1"><font style="background-color: #ffff00">php</font></span>-config=/usr/local/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>/bin/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>-config </span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;  注意要先确保/usr/local/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>/bin/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>-config存在。</p>
<p>&nbsp;&nbsp;&nbsp;  <span><span>make</span> </span></p>
<p>&nbsp;&nbsp;&nbsp;  <span><span>make install</span> </span></p>
<div class="dp-highlighter">
<div class="bar">
<div class="tools"><span class="hilite1"><font style="background-color: #ffff00">Php</font></span>代码 <a href="http://koda.javaeye.com/blog/420991#" title="复制代码"><img src="http://koda.javaeye.com/images/icon_copy.gif" alt="复制代码" /></a></div>
</div>
<ol class="dp-c">
    <li><span><span>./configure --with-<span class="hilite1"><font style="background-color: #ffff00">php</font></span>-config=/usr/local/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>/bin/<span class="hilite1"><font style="background-color: #ffff00">php</font></span>-config&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<p>&nbsp;</p>
<p>make install 之后系统会提示你mcrypt.so文件所在的目录。根据<span class="hilite1"><font style="background-color: #ffff00">php</font></span>.ini中指示的extension_dir指向的目录中， 将其复制过去。修改<span class="hilite1"><font style="background-color: #ffff00">php</font></span>.ini,在最后添加一句extension=bcmath.so</p>
<p>&nbsp;</p>
<p>最后重启APACHE服务，万事OK。</p>
</div>
</div>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=861</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-01 21:04</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=860</guid>
			<title>configure: error: *** libmcrypt was not found</title>
			<author>bizman</author>
			<description><![CDATA[<p>[root@localhost mcrypt-2.6.8]# ./configure --prefix=/usr/local/libmcrypt<br />
checking build system type... i686-pc-linux-gnu<br />
checking host system type... i686-pc-linux-gnu<br />
checking target system type... i686-pc-linux-gnu<br />
checking for a BSD-compatible install... /usr/bin/install -c<br />
checking whether build environment is sane... yes<br />
checking for a thread-safe mkdir -p... /bin/mkdir -p<br />
checking for gawk... gawk<br />
checking whether make sets $(MAKE)... yes<br />
checking for style of include used by make... GNU<br />
checking for gcc... gcc<br />
checking for C compiler default output file name... a.out<br />
checking whether the C compiler works... yes<br />
checking whether we are cross compiling... no<br />
checking for suffix of executables... <br />
checking for suffix of object files... o<br />
checking whether we are using the GNU C compiler... yes<br />
checking whether gcc accepts -g... yes<br />
checking for gcc option to accept ISO C89... none needed<br />
checking dependency style of gcc... gcc3<br />
checking for a sed that does not truncate output... /bin/sed<br />
checking for grep that handles long lines and -e... /bin/grep<br />
checking for egrep... /bin/grep -E<br />
checking for fgrep... /bin/grep -F<br />
checking for ld used by gcc... /usr/bin/ld<br />
checking if the linker (/usr/bin/ld) is GNU ld... yes<br />
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B<br />
checking the name lister (/usr/bin/nm -B) interface... BSD nm<br />
checking whether ln -s works... yes<br />
checking the maximum length of command line arguments... 98304<br />
checking whether the shell understands some XSI constructs... yes<br />
checking whether the shell understands &quot;+=&quot;... yes<br />
checking for /usr/bin/ld option to reload object files... -r<br />
checking how to recognize dependent libraries... pass_all<br />
checking for ar... ar<br />
checking for strip... strip<br />
checking for ranlib... ranlib<br />
checking command to parse /usr/bin/nm -B output from gcc object... ok<br />
checking how to run the C preprocessor... gcc -E<br />
checking for ANSI C header files... yes<br />
checking for sys/types.h... yes<br />
checking for sys/stat.h... yes<br />
checking for stdlib.h... yes<br />
checking for string.h... yes<br />
checking for memory.h... yes<br />
checking for strings.h... yes<br />
checking for inttypes.h... yes<br />
checking for stdint.h... yes<br />
checking for unistd.h... yes<br />
checking for dlfcn.h... yes<br />
checking for objdir... .libs<br />
checking if gcc supports -fno-rtti -fno-exceptions... no<br />
checking for gcc option to produce PIC... -fPIC -DPIC<br />
checking if gcc PIC flag -fPIC -DPIC works... yes<br />
checking if gcc static flag -static works... yes<br />
checking if gcc supports -c -o file.o... yes<br />
checking if gcc supports -c -o file.o... (cached) yes<br />
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes<br />
checking whether -lc should be explicitly linked in... no<br />
checking dynamic linker characteristics... GNU/Linux ld.so<br />
checking how to hardcode library paths into programs... immediate<br />
checking whether stripping libraries is possible... yes<br />
checking if libtool supports shared libraries... yes<br />
checking whether to build shared libraries... yes<br />
checking whether to build static libraries... yes<br />
checking for gcc... (cached) gcc<br />
checking whether we are using the GNU C compiler... (cached) yes<br />
checking whether gcc accepts -g... (cached) yes<br />
checking for gcc option to accept ISO C89... (cached) none needed<br />
checking dependency style of gcc... (cached) gcc3<br />
checking for libmcrypt-config... no<br />
checking for libmcrypt - version &gt;= 2.5.0... no<br />
*** Could not run libmcrypt test program, checking why...<br />
*** The test program failed to compile or link. See the file config.log for the<br />
*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed<br />
*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you<br />
*** may want to edit the libmcrypt-config script: no<br />
configure: error: *** libmcrypt was not found<br />
[root@localhost mcrypt-2.6.8]# <br />
<br />
以上是我安装mcrypt2.6.8遇到的问题，按照网上的办法解决不了阿，李老师帮帮忙阿<br />
<br />
<strong><br />
解决办法：出现该情况是由于c++编译器的相关package没有安装，以root用户登陆，在终端上执行：<br />
<br />
# yum install glibc-headers<br />
<br />
# yum install gcc-c++   </strong><br />
<br />
http://bbs.lampbrother.net/read-htm-tid-91385.html</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=860</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-02-01 20:42</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=859</guid>
			<title>HeidiSQL一款开源的MySQL图形管理软件</title>
			<author>bizman</author>
			<description><![CDATA[<h2>What's this?</h2>
<p><strong>HeidiSQL</strong> is an easy-to-use interface and a &quot;working-horse&quot; for web-developers using the popular <a href="http://www.mysql.com/">MySQL-Database</a>. It allows you to manage and browse your databases and tables from an intuitive Windows&reg; interface.</p>
<p>放一张官方截图</p>
<p><input align="middle" width="600" type="image" height="391" longdesc="undefined" src="http://xinlogs.com/attachment/image/database.png" /></p>
<p>&nbsp;</p>
<p>官方地址:http://www.heidisql.com/</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=859</link>
			<category domain="http://www.getroad.cn/blog/?cid=31">PHP+mysql</category>
			<pubDate>2012-01-16 03:02</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=858</guid>
			<title>rpm 安装指令全</title>
			<author>bizman</author>
			<description><![CDATA[<p>rpm -ivh package.rpm 安装一个rpm包 <br />
rpm -ivh --nodeeps package.rpm 安装一个rpm包而忽略依赖关系警告 <br />
rpm -U package.rpm 更新一个rpm包但不改变其配置文件 <br />
rpm -F package.rpm 更新一个确定已经安装的rpm包 <br />
rpm -e package_name.rpm 删除一个rpm包 <br />
rpm -qa 显示系统中所有已经安装的rpm包 <br />
rpm -qa | grep httpd 显示所有名称中包含 &quot;httpd&quot; 字样的rpm包 <br />
rpm -qi package_name 获取一个已安装包的特殊信息 <br />
rpm -qg &quot;System Environment/Daemons&quot; 显示一个组件的rpm包 <br />
rpm -ql package_name 显示一个已经安装的rpm包提供的文件列表 <br />
rpm -qc package_name 显示一个已经安装的rpm包提供的配置文件列表 <br />
rpm -q package_name --whatrequires 显示与一个rpm包存在依赖关系的列表 <br />
rpm -q package_name --whatprovides 显示一个rpm包所占的体积 <br />
rpm -q package_name --scripts 显示在安装/删除期间所执行的脚本l <br />
rpm -q package_name --changelog 显示一个rpm包的修改历史 <br />
rpm -qf /etc/httpd/conf/httpd.conf 确认所给的文件由哪个rpm包所提供 <br />
rpm -qp package.rpm&nbsp; -l 显示由一个尚未安装的rpm包提供的文件列表 <br />
rpm --import /media/cdrom/RPM-GPG-KEY 导入公钥数字证书 <br />
rpm --checksig package.rpm 确认一个rpm包的完整性 <br />
rpm -qa gpg-pubkey 确认已安装的所有rpm包的完整性&nbsp; <br />
rpm -V package_name 检查文件尺寸、 许可、类型、所有者、群组、MD5检查以及最后修改时间 <br />
rpm -Va 检查系统中所有已安装的rpm包- 小心使用 <br />
rpm -Vp package.rpm 确认一个rpm包还未安装 <br />
rpm2cpio package.rpm | cpio --extract --make-directories&nbsp; *bin* 从一个rpm包运行可执行文件 <br />
rpm -ivh /usr/src/redhat/RPMS/`arch`/package.rpm 从一个rpm源码安装一个构建好的包 <br />
rpmbuild --rebuild package_name.src.rpm 从一个rpm源码构建一个 rpm 包</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=858</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-01-10 17:22</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=857</guid>
			<title>centos下查看自己的系统是多少位的</title>
			<author>bizman</author>
			<description><![CDATA[<p>[root@localhost ~]# uname -a<br />
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux<br />
[root@localhost ~]# getconf WORD_BIT<br />
32<br />
[root@localhost ~]# echo $HOSTTYPE<br />
i686<br />
这个是我的机子，如果是64位的话,第一条跟第三条命令会显示: x86_64<br />
<br />
getconf LONG_BIT</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=857</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2012-01-10 14:21</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=856</guid>
			<title>mysql主从数据库配置</title>
			<author>bizman</author>
			<description><![CDATA[<p>#需要同步的数据库<br />
replicate-do-db=dojocn<br />
#忽略同步的数据库<br />
replicate-ignore-db=mysql<br />
<br />
<br />
192.168.128.128 #master 服务器<br />
192.168.128.129 #slave 服务器<br />
<br />
了解了上面这些，基本上就知道怎么设置了，下面说一下具体配置流程：<br />
<br />
1.配置主服务器端<br />
<br />
首先要确保数据库没有人在进行读写操作。然后修改mysql服务的配置文件，一般是/etc/my.cnf文件，<font color="#FF0000"><strong>在[mysqld]字段下面</strong></font>，添加下面字段即可：<br />
<br />
#master<br />
binlog-do-db=dojocn<br />
binlog-ignore-db=mysql<br />
server-id=1<br />
log-bin=mysql_log_bin<br />
<br />
前两个不做解释了，根据之前的描述进行修改即可，server-id只要保证各同步的数据库之间不重复即可。设置好后重启。<br />
<br />
在mysql中运行show master status;<br />
<br />
mysql&gt; show master status;<br />
<br />
+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+&mdash;&mdash;&mdash;&mdash;-+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&ndash;+<br />
| File&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Position&nbsp;&nbsp;&nbsp;&nbsp; | Binlog_Do_DB | Binlog_Ignore_DB |<br />
+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+&mdash;&mdash;&mdash;&mdash;-+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&ndash;+<br />
| mysql-bin.000048 |&nbsp; 5199773&nbsp; | dojocn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />
+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+&mdash;&mdash;&mdash; &mdash;+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;+<br />
<br />
结果应该是上面的样子。如果提示为空（为no ****，具体内容忘记了），尝试添加 log-bin=mysql_log_bin 到配置文件里面。<br />
<br />
<font color="#FF0000"><strong>这里要记录下file的&ldquo;mysql-bin.000048&rdquo;和Position的&ldquo;5199773&rdquo;，能否同步成功这是关键点，</strong></font><br />
<br />
2.添加备份用户<br />
<br />
grant replication slave on *.* to &lsquo;backuser&rsquo;@&rsquo;192.168.128.129&prime; identified by &lsquo;password&rsquo;;<br />
flush privileges;</p>
<p><font color="#FF0000"><strong>这个可以用phpmyadmin 去加</strong></font></p>
<p><br />
&nbsp; 第一句为添加用户同步用户backuser，并只允许来自192.168.128.129的访问，密码为password。可能网上的语句比我的这个复杂，那是因为他们可能授予了更多的权限，但是作为同步的用户，只赋予同步权限即可。<br />
<br />
第二句是立即刷新权限，使权限生效。<br />
<br />
3.配置从服务器<br />
<br />
如果需要同步的数据库在主服务器上早已存在，那么需要拷贝相应的数据库文件到从服务器上（在保证主服务器数据库在不写的情况下，直接copy相应的文件夹即可）。然后是修改mysql服务的配置文件的<strong>[mysqld]</strong>字段：<br />
<br />
#slave<br />
master-host=192.168.128.128<br />
master-user=backuser<br />
master-password=password<br />
master-port=3306<br />
<br />
server-id=2<br />
replicate-do-db=dojocn<br />
replicate-ignore-db=mysql<br />
relay-log=mysqld-relay-bin</p>
<p><br />
<br />
这是一般的配置，其实个人觉得server-id之前的完全没有必要配置，因为后面的语句还会进行相关的设置（不进行设置，测试成功）。此处的要点是保证server-id和主服务器不一样；replicate开头的两条按照需要进行设置；那么relay-log的作用是什么？其实就是用来保存从端操作日志的，添加的原因最后进行解释。设置好后记得重启数据库。<br />
<br />
4.启动从端服务<br />
<br />
在mysql中执行下面的命令，里面有5处需要按照你的情况修改，master_log_file和master_log_pos就是之前我们在主数据库上执行&ldquo;show master status;&rdquo;得到的，一定要保证这此处的值和copy数据库的时候的值一致。在sql中执行下面的语句：<br />
<br />
<strong>#这句可以省略掉 如果启用 start slave 不成功&nbsp; 就执行下面的这句 (对应修改参数和账户)</strong></p>
<p><strong>执行的顺序是 <br />
</strong></p>
<p><strong>进入mysql后 执行 start slave 如果没报错就应该成功了 然后 执行 </strong>show slave status; 就应该看到下面的成功提示了</p>
<p><br />
change master to&nbsp; master_host='192.168.128.128', master_user='backuser', master_password='123456', master_log_file='mysql-bin.000231', master_log_pos=2204;<br />
<br />
上面命令执行成功后，运行&ldquo;start slave&rdquo;提示成功，再运行&ldquo;show slave statusG;&rdquo;查看运行状态，看到<br />
<br />
Slave_IO_Running: Yes<br />
Slave_SQL_Running: Yes<br />
<br />
就是配置成功了！<br />
<br />
<br />
<br />
<font color="#FF0000"><strong>特别注意:&nbsp; <br />
1,尽量保持数据库版本一样&nbsp; 另外查一下防火墙<br />
我最开始配置的时候是 主是win 从是centos&nbsp; 而却主的版本比从的版本还低 没成功<br />
后来装虚拟机装了两个&nbsp; 都是centos&nbsp; 相同MYSQL版本 配置成功了<br />
<br />
2, 一定要放在 [mysqld]字段下面<br />
<br />
我最开始是放在[mysql safe] 后面的 没成功 改到 [mysqld] 保存后再执行就成功了&nbsp; <br />
</strong></font><br />
<br />
附件里有两个我参考的文档 可以参考一下 个人觉得没这个详细 有部分参数可以参考</p><br /><br /><b>附件: </b><a href="http://www.getroad.cn/blog/attachment.php?id=471" target="_blank">mysql.-主从参考.zip</a> (3.28 K, 下载次数:19)]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=856</link>
			<category domain="http://www.getroad.cn/blog/?cid=31">PHP+mysql</category>
			<pubDate>2011-12-25 00:44</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=855</guid>
			<title>解密js eval 的方法</title>
			<author>bizman</author>
			<description><![CDATA[<p>直接COPY整个EVAL的代码<br />
然后放在HTML里 <br />
然后 直接 document.write(加密后的代码)<br />
去掉EVAL替换成document.write<br />
<br />
或者 去掉<br />
实例:<br />
比如<br />
eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[ c]=k[ c]||c;k=[function(e){return d[&nbsp; e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[ c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[ c]);return p}('3(&quot;2 1.0&quot;);',4,4,'org|idoall|Welcome|alert'.split('|'),0,{}));<br />
改成 <br />
document.write(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[ c]=k[ c]||c;k=[function(e){return d[&nbsp; e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[ c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[ c]);return p}('3(&quot;2 1.0&quot;);',4,4,'org|idoall|Welcome|alert'.split('|'),0,{}));<br />
<br />
然后执行<br />
最后的结果是 alert(&quot;Welcome idoall.org&quot;);</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=855</link>
			<category domain="http://www.getroad.cn/blog/?cid=35">jquery+js</category>
			<pubDate>2011-11-10 13:03</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=854</guid>
			<title>Linux VPS/服务器 网站及数据库自动本地备份并FTP上传备份脚本</title>
			<author>bizman</author>
			<description><![CDATA[<p>从<a target="_blank" href="http://www.vpser.net/">VPS侦探</a>建站之初就一直在重申一定要备份好自己的数据，因为太多的不确定性可能会造成数据库丢失，而且大部分VPS服务商也不可能提供每天备份数据。</p>
<p>原来VPS侦探提供过一个<a target="_blank" href="http://www.vpser.net/security/vps-backup-web-mysql.html">VPS备份方法</a>，只是略微说了一下，可能部分新手会不太好入手。今天VPS侦探分享一个自己的备份脚本。</p>
<p>准备工作：</p>
<p>需要提前在VPS安装好lftp，lftp功能上比较强大，CentOS直接执行：<strong>yum install lftp</strong>，Debian执行：<strong>apt-get install lftp</strong> 。</p>
<p>需要在VPS上创建/home/backup/ 目录，在FTP上创建backup目录。</p>
<p>如果VPS上数据库不多的话使用<a target="_blank" href="http://www.vpser.net/go/godaddy" title="Godaddy.com">Godaddy</a>的免费空间就可以(10GB空间，300GB流量)，只要注册个域名就免费送。</p>
<p>下面将备份脚本进行部分注释：<br />
#!/bin/bash<br />
#Funciont: Backup website and mysql database<br />
#Author: licess<br />
#Website: <a target="_blank" href="http://lnmp.org/" title="lnmp一键安装包">http://lnmp.org</a><br />
#IMPORTANT!!!Please Setting the following Values!</p>
<p>######~Set Directory you want to  backup~######将下面的目录修改成自己要备份的目录，一般按我的都是在/home/wwwroot/下面所有直接写了需要备份的目录。可以继 续再加：Backup_Dir5=你的目录 ，Backup_Dir后面的数字依次递增。如果不足4个，直接删除不需要的就可以，同时修改下面tar  zcf 部分。</p>
<p>Backup_Dir1=vpser.net<br />
Backup_Dir2=lnmp.org<br />
Backup_Dir3=licess.org<br />
Backup_Dir4=jungehost.com</p>
<p>######~Set MySQL UserName and password~######设置MySQL的用户名和密码，最好是root，其他用户可能因为权限问题无法导出部分数据库。<br />
MYSQL_UserName=root<br />
MYSQL_PassWord=yourmysqlrootpassword</p>
<p>######~Set MySQL Database you want to backup~######设置要部分的数据库，可以继续再加：Backup_Database_Name5=数据库名，Backup_Database_Name后面的数字依次递增。<br />
Backup_Database_Name1=vpser<br />
Backup_Database_Name2=licess<br />
Backup_Database_Name3=junge<br />
Backup_Database_Name4=vpserorg</p>
<p>######~Set FTP Information~######设置用来存放备份数据的FTP信息<br />
FTP_HostName=184.168.192.43 &nbsp; //FTP服务器的IP或者域名<br />
FTP_UserName=vpsernet &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//FTP服务器用户名<br />
FTP_PassWord=yourftppassword&nbsp;&nbsp; //FTP服务器用户对应的密码<br />
FTP_BackupDir=backup &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//备份到FTP上的目录，需要提前创建好。</p>
<p>#Values Setting END!</p>
<p>TodayWWWBackup=www-*-$(date +&quot;%Y%m%d&quot;).tar.gz<br />
TodayDBBackup=db-*-$(date +&quot;%Y%m%d&quot;).sql<br />
OldWWWBackup=www-*-$(date -d -3day +&quot;%Y%m%d&quot;).tar.gz<br />
OldDBBackup=db-*-$(date -d -3day +&quot;%Y%m%d&quot;).sql</p>
<p>tar zcf /home/backup/www-$Backup_Dir1-$(date +&quot;%Y%m%d&quot;).tar.gz -C /home/wwwroot/ $Backup_Dir1 --exclude=soft<br />
tar zcf /home/backup/www-$Backup_Dir2-$(date +&quot;%Y%m%d&quot;).tar.gz -C /home/wwwroot/ $Backup_Dir2<br />
tar zcf /home/backup/www-$Backup_Dir3-$(date +&quot;%Y%m%d&quot;).tar.gz -C /home/wwwroot/ $Backup_Dir3 --exclude=test<br />
tar zcf /home/backup/www-$Backup_Dir4-$(date +&quot;%Y%m%d&quot;).tar.gz -C /home/wwwroot/ $Backup_Dir4</p>
<p>###上面为备份网站文件数据，因为我的网站比较零散，而且网站目录下面有些目录属于临时目录并不需要备份，所以可以在上面加上 --exclude=不备份的目录。如果在前面加了Backup_Dir5=yourdir，则再加tar zcf  /home/backup/www-$Backup_Dir5-$(date +&quot;%Y%m%d&quot;).tar.gz -C<br />
/home/wwwroot/ $Backup_Dir5 。如果多余则删除多余行。</p>
<p>/usr/local/mysql/bin/mysqldump -u$MYSQL_UserName -p$MYSQL_PassWord  $Backup_Database_Name1 &gt;  /home/backup/db-$Backup_Database_Name1-$(date +&quot;%Y%m%d&quot;).sql<br />
/usr/local/mysql/bin/mysqldump -u$MYSQL_UserName -p$MYSQL_PassWord  $Backup_Database_Name2 &gt;  /home/backup/db-$Backup_Database_Name2-$(date +&quot;%Y%m%d&quot;).sql<br />
/usr/local/mysql/bin/mysqldump -u$MYSQL_UserName -p$MYSQL_PassWord  $Backup_Database_Name3 &gt;  /home/backup/db-$Backup_Database_Name3-$(date +&quot;%Y%m%d&quot;).sql<br />
/usr/local/mysql/bin/mysqldump -u$MYSQL_UserName -p$MYSQL_PassWord  $Backup_Database_Name4 &gt;  /home/backup/db-$Backup_Database_Name4-$(date +&quot;%Y%m%d&quot;).sql</p>
<p>###上面为备份MySQL数据库，如果在前面加了Backup_Database_Name5=yourdatabasename，则再加 /usr/local/mysql/bin/mysqldump -u$MYSQL_UserName -p$MYSQL_PassWord  $Backup_Database_Name5 &gt;  /home/backup/db-$Backup_Database_Name5-$(date  +&quot;%Y%m%d&quot;).sql&nbsp;。如果多余则删除多余行。</p>
<p>rm $OldWWWBackup<br />
rm $OldDBBackup<br />
###删除3天前的备份###</p>
<p>cd /home/backup/</p>
<p>###下面为自动上传部分，不得不说lftp很强大，抛弃ftp吧####<br />
lftp $FTP_HostName -u $FTP_UserName,$FTP_PassWord &lt;&lt; EOF<br />
cd $FTP_BackupDir<br />
mrm $OldWWWBackup<br />
mrm $OldDBBackup<br />
mput $TodayWWWBackup<br />
mput $TodayDBBackup<br />
bye<br />
EOF</p>
<p>脚本下载地址：<a target="_blank" href="http://soft.vpser.net/lnmp/backup.sh">http://soft.vpser.net/lnmp/backup.sh</a></p>
<p><a target="_blank" href="http://soft.vpser.net/lnmp/backup.sh">下载脚本</a>，将脚本放到/root/ 下面，按上面的注释修改脚本中的参数，并保存，如果不熟悉<a target="_blank" href="http://www.vpser.net/build/linux-vps-ssh-command.html">vi</a>或者<a target="_blank" href="http://www.vpser.net/manage/nano.html">nano编辑器</a>，可以用<a target="_blank" href="http://www.vpser.net/manage/winscp.html">winscp</a>，执行：chmod +x /root/backup.sh 为脚本添加执行权限，执行：crontab -e 添加定时执行</p>
<p>在crontab中加入：0 3 * * * /root/backup.sh</p>
<p>凌晨3点自动执行/root/bakcup.sh 脚本，备份vps上的数据并上传到FTP上。</p>
<p>&nbsp;</p>
<p>from:http://www.vpser.net/security/linux-autobackup-ftp.html</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=854</link>
			<category domain="http://www.getroad.cn/blog/?cid=31">PHP+mysql</category>
			<pubDate>2011-11-10 10:39</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=853</guid>
			<title>nano编辑器使用教程</title>
			<author>bizman</author>
			<description><![CDATA[<p>使用Linux VPS会经常和编辑器打交道，一般常用的是vi和nano，虽然vi功能强大，但是相对新手来要稍微难上手，GNU nano是一个体积小巧而功能强大的文本编辑器。这里就简单说一下nano的使用方法。<br />
安装<br />
<br />
CentOS：执行yum -y install nano<br />
<br />
Debian：执行apt-get install -y nano<br />
新建／打开文件<br />
<br />
nano 路径+文件名<br />
<br />
如果改文件存在，上面的命令将打开这个文件；如果文件不存在则将会创建一个新文件并打开。<br />
<br />
&nbsp;&nbsp;&nbsp; Note：在Windows系统中，一个文件应当有后缀名，比如.txt，以供系统进行类型判断，不过Linux并不根据 后缀名来判断类型。当然，写上后缀名也无妨，比如example也可以用example.txt。<br />
<br />
光标控制<br />
<br />
移动光标：使用用方向键移动。<br />
<br />
选择文字：按住鼠标左键拖到。<br />
复制、剪贴和粘贴<br />
<br />
复制一整行：Alt+6<br />
<br />
剪贴一整行：Ctrl+K<br />
<br />
粘贴：Ctrl+U<br />
<br />
如果需要复制／剪贴多行或者一行中的一部分，先将光标移动到需要复制／剪贴的文本的开头，按Ctrl+6（或者Alt+A）做标记，然后移动光标到 待复制／剪贴的文本末尾。这时选定的文本会反白，用Alt+6来复制，Ctrl+K来剪贴。若在选择文本过程中要取消，只需要再按一次Ctrl+6。<br />
搜索<br />
<br />
按Ctrl+W，然后输入你要搜索的关键字，回车确定。这将会定位到第一个匹配的文本，接着可以用Alt+W来定位到下一个匹配的文本。<br />
翻页<br />
<br />
用Ctrl+Y到上一页，Ctrl+V到下一页<br />
保存<br />
<br />
使用Ctrl+O来保存所做的修改<br />
退出<br />
<br />
按Ctrl+X<br />
<br />
如果你修改了文件，下面会询问你是否需要保存修改。输入Y确认保存，输入N不保存，按Ctrl+C取消返回。<br />
<br />
如果输入了Y，下一步会让你输入想要保存的文件名。如果不需要修改文件名直接回车就行；若想要保存成别的名字（也就是另存为）则输入新名称然后确 定。这个时候也可用Ctrl+C来取消返回。<br />
获得帮助<br />
<br />
进入nano界面后，下面有两行菜单，例如，&ldquo;^G Get Help&rdquo;。其意义如下：<br />
<br />
^G意味着快捷键是Ctrl+G，&ldquo;Get Help&rdquo;当然是功能了。<br />
<br />
根据这些提示就可以立刻开始使用nano了，也可以Ctrl+G看看帮助。<br />
<br />
&nbsp;&nbsp;&nbsp; Note：nano中，黑底白字表示快捷键操作。其中&ldquo;^&rdquo;表示Ctrl键，则Ctrl+G就表示成&ldquo;^G&rdquo;。&ldquo;M&rdquo;表示 Alt键，则Alt+W表示为&ldquo;M-W&rdquo;。</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=853</link>
			<category domain="http://www.getroad.cn/blog/?cid=31">PHP+mysql</category>
			<pubDate>2011-11-10 10:33</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=852</guid>
			<title>Linux修改Mysql最大并发连接数</title>
			<author>bizman</author>
			<description><![CDATA[<p>Centos下测试通过</p>
<p>查看当前系统下mysql设置的最大连接数<br />
[root@localhost ~]# /usr/bin/mysqladmin -uroot -p variables |grep max_connections</p>
<p><br />
| max_connections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 100&nbsp;&nbsp; //默认是100</p>
<p>&nbsp;</p>
<p>[root@localhost ~]# nano /etc/my.cnf<br />
编辑my.cnf在[mysqld]中加入：<br />
set-variable=max_connections=1000</p>
<p>&nbsp;</p>
<p>ctrl+o保存</p>
<p>ctrl+x退出</p>
<p><br />
[root@localhost ~]# service mysqld restart //重启mysql</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=852</link>
			<category domain="http://www.getroad.cn/blog/?cid=24">Linux+System</category>
			<pubDate>2011-11-10 10:31</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=851</guid>
			<title>JQuery的强大筛选器</title>
			<author>bizman</author>
			<description><![CDATA[<p>在Web应用程序中，大部分的客户端操作都是基于对象的操作，要操作对象就必须先获取对象，jQuery提供了强大的选择器让我们获取对象。我人为地将jQuery选择器分为两大部分：选择对象和筛选条件。选择对象表示要获取什么对象，筛选条件是对获取的对象进行筛选，最终留下符合某些特征的对象。<br />
<br />
1.选择对象<br />
<br />
1).基本<br />
<br />
&middot;#id 根据给定的ID匹配一个元素。例如：$(&quot;#id&quot;)<br />
&middot;element 根据给定的元素名匹配所有元素。例如：$(&quot;div&quot;)<br />
&middot;.class 根据给定的类匹配元素。例如：$(&quot;.style1&quot;);<br />
&middot;* 匹配所有元素。例如：$(&quot;*&quot;)<br />
&middot;selector1,selector2,selectorN 将每一个选择器匹配到的元素合并后一起返回。例如：$(&quot;#id,div,.style1&quot;)<br />
<br />
2).表单<br />
<br />
&middot;:button 匹配所有按钮。例如：$(&quot;:button&quot;)<br />
&middot;:checkbox 匹配所有复选框。例如：$(&quot;:checkbox&quot;)<br />
&middot;:file 匹配所有文件域。例如：$(&quot;:file&quot;)<br />
&middot;:hidden 匹配所有不可见元素，或者type为hidden的元素。例如：$(&quot;input:hidden&quot;)<br />
&middot;:image 匹配所有图像域。例如：$(&quot;:image&quot;)<br />
&middot;:input 匹配所有 input, textarea, select 和 button 元素。例如：$(&quot;:input&quot;)<br />
&middot;:password 匹配所有密码框。例如：$(&quot;:password&quot;)<br />
&middot;:radio 匹配所有单选按钮。例如：$(&quot;:radio&quot;)<br />
&middot;:reset 匹配所有重置按钮。例如：$(&quot;:reset&quot;)<br />
&middot;:submit 匹配所有提交按钮。例如：$(&quot;:submit&quot;)<br />
&middot;:text 匹配所有的单行文本框。例如：$(&quot;:text&quot;)<br />
&middot;:header 匹配如 h1, h2, h3之类的标题元素。例如：$(&quot;:header&quot;).css(&quot;background&quot;, &quot;#EEE&quot;);<br />
<br />
2.筛选条件<br />
<br />
1).属性筛选<br />
<br />
&middot;[attribute*=value] 匹配给定的属性是以包含某些值的元素。例如：$(&quot;input[name*='man'&quot;)<br />
&middot;[attribute!=value] 匹配所有含有指定的属性，但属性不等于特定值的元素。例如：$(input[name!='man');<br />
&middot;[attribute$=value] 匹配给定的属性是以某些值结尾的元素。例如：$(&quot;input[name$='man']&quot;)<br />
&middot;[attribute=value] 匹配给定的属性是某个特定值的元素。例如：$(&quot;input[name='man']&quot;);<br />
&middot;[attribute] 匹配包含给定属性的元素。例如：$(&quot;div[id]&quot;)<br />
&middot;[attribute^=value] 匹配给定的属性是以某些值开始的元素。例如：$(&quot;input[name^='man']&quot;)<br />
&middot;[selector1][selector2][selectorN] 同时满足多个条件。例如：$(&quot;input[id][name$='man']&quot;)<br />
&middot;:hidden 匹配所有的不可见元素。例如：$(&quot;tr:hidden&quot;)<br />
&middot;:visible 匹配所有的可见元素。例如：$(&quot;tr:visible&quot;)<br />
&middot;:checked 匹配所有选中的被选中元素(复选框、单选框等，不包括select中的option)。例如：$(&quot;input:checked&quot;)<br />
&middot;:disabled 匹配所有不可用元素。例如：$(&quot;input:disabled&quot;)<br />
&middot;:enabled 匹配所有可用元素。例如：$(&quot;input:enabled&quot;)<br />
&middot;:selected 匹配所有选中的option元素。例如：$(&quot;select option:selected&quot;)<br />
<br />
2).内容筛选<br />
<br />
&middot;:contains(text) 匹配包含给定文本的元素。例如：$(&quot;div:contains('John')&quot;)<br />
&middot;:empty 匹配所有不包含子元素或者文本的空元素。例如：$(&quot;td:empty&quot;)<br />
&middot;:has(selector) 匹配含有选择器所匹配的元素的元素。例如：$(&quot;div:has(p)&quot;);<br />
&middot;:parent 匹配含有子元素或者文本的元素。例如：$(&quot;td:parent&quot;)<br />
<br />
3).层级筛选<br />
<br />
&middot;ancestor descendant 在给定的祖先元素下匹配所有的后代元素。例如：$(&quot;form input&quot;)<br />
&middot;parent &gt; child 在给定的父元素下匹配所有的子元素。例如：$(&quot;form &gt; input&quot;)<br />
&middot;prev + next 匹配所有紧接在 prev 元素后的 next 元素。例如：$(&quot;label + input&quot;)<br />
&middot;prev ~ siblings 匹配 prev 元素之后的所有 siblings 元素。例如：$(&quot;form ~ input&quot;)<br />
&middot;:first-child 匹配第一个子元素。例如：$(&quot;ul li:first-child&quot;)<br />
&middot;:last-child 匹配最后一个子元素。例如：$(&quot;ul li:last-child&quot;)<br />
&middot;:nth-child(index/even/odd/equation) 匹配其父元素下的第N个子或奇偶元素。例如：$(&quot;ul li:nth-child(2)&quot;)<br />
&middot;:only-child 如果某个元素是父元素中唯一的子元素，那将会被匹配。例如：$(&quot;ul li:only-child&quot;)<br />
<br />
4).方法筛选<br />
<br />
&middot;:animated 匹配所有正在执行动画效果的元素。例如：$(&quot;div:animated&quot;);<br />
&middot;:eq(index) 匹配一个给定索引值的元素。例如：$(&quot;tr:eq(1)&quot;)<br />
&middot;:even 匹配所有索引值为偶数的元素，从 0 开始计数。例如：$(&quot;tr:even&quot;)<br />
&middot;:first 匹配找到的第一个元素。例如：$(&quot;tr:first&quot;)<br />
&middot;:gt(index) 匹配所有大于给定索引值的元素，从 0 开始计数。例如：$(&quot;tr:gt(0)&quot;)<br />
&middot;:last 匹配找到的最后一个元素。例如：$(&quot;tr:last&quot;)<br />
&middot;:lt(index) 匹配所有小于给定索引值的元素。例如：$(&quot;tr:lt(2)&quot;)<br />
&middot;:not(selector) 去除所有与给定选择器匹配的元素。例如：$(&quot;input:not(:checked)&quot;)<br />
&middot;:odd 匹配所有索引值为奇数的元素，从 0 开始计数。例如：$(&quot;tr:odd&quot;)</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=851</link>
			<category domain="http://www.getroad.cn/blog/?cid=35">jquery+js</category>
			<pubDate>2011-11-02 12:08</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=850</guid>
			<title>完美解决IE6不支持position:fixed的bug</title>
			<author>bizman</author>
			<description><![CDATA[<p>&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;IE6 position:fixed bug&lt;/title&gt;<br />
&lt;style&gt;<br />
*{padding:0;margin:0}<br />
p{height:2000px}<br />
#gs{border:1px solid #000;position:fixed;right:30px;top:120px}<br />
&lt;/style&gt;<br />
&lt;!--[if IE 6]&gt;<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
html{overflow:hidden}<br />
body{height:100%;overflow:auto}<br />
#gs{position:absolute}<br />
&lt;/style&gt;<br />
&lt;![endif]--&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&quot;rightform&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;p&gt;11111111111111111&lt;/p&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;input id=&quot;gs&quot; name=&quot;gs&quot; type=&quot;text&quot; value=&quot;&quot;&nbsp; /&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
<br />
以上这段代码在网上很常见，通过设置html{overflow:hidden}和body{height:100%;overflow:auto}来实现ie6下position:fixed效果，但这种办法有个缺陷，那就是：这会使页面上原有的absolute、relation都变成fixed的效果，在这里我就不做demo了，如果有怀疑，可以自己去试验一下。<br />
<br />
于是我找了下资料，发现可以通过一条Internet Explorer的CSS表达式(expression)来完美的实现ie6下position:fixed效果，css代码如下：<br />
/* 除IE6浏览器的通用方法 */<br />
.ie6fixedTL{position:fixed;left:0;top:0}<br />
.ie6fixedBR{position:fixed;right:0;bottom:0}<br />
/* IE6浏览器的特有方法 */<br />
* html .ie6fixedTL{position:absolute;left:expression(eval(document.documentElement.scrollLeft));top:expression(eval(document.documentElement.scrollTop))}<br />
* html .ie6fixedBR{position:absolute;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}<br />
<br />
上面代码可以直接使用了，如果要设置元素悬浮边距，要分别为设置两次，比如我要让某个元素距顶部10个像素，距左部也是10个像素，那就要这样子写：<br />
/* 除IE6浏览器的通用方法 */<br />
.ie6fixedTL{position:fixed;left:10px;top:10px}<br />
/* IE6浏览器的特有方法 */<br />
* html .ie6fixedTL{position:absolute;left:expression(eval(document.documentElement.scrollLeft+10));top:expression(eval(document.documentElement.scrollTop+10))}<br />
<br />
这样一来，IE6下实现position:fixed的效果解决了，而且也不会影响到其他的absolute、relation，但还有一个问题，就是悬浮的元素会出现振动<br />
IE有一个多步的渲染进程。当你滚动或调整你的浏览器大小的时候，它将重置所有内容并重画页面，这个时候它就会重新处理css表达式。这会引起一个丑陋的&ldquo;振动&rdquo;bug，在此处固定位置的元素需要调整以跟上你的(页面的)滚动，于是就会&ldquo;跳动&rdquo;。<br />
解决此问题的技巧就是使用background-attachment:fixed为body或html元素添加一个background-image。这就会强制页面在重画之前先处理CSS。因为是在重画之前处理CSS，它也就会同样在重画之前首先处理你的CSS表达式。这将让你实现完美的平滑的固定位置元素！<br />
<br />
然后我发现background-image无需一张真实的图片，设置成about:blank就行了。<br />
<br />
下面附上完整代码<br />
/* 除IE6浏览器的通用方法 */<br />
.ie6fixedTL{position:fixed;left:0;top:0}<br />
.ie6fixedBR{position:fixed;right:0;bottom:0}<br />
/* IE6浏览器的特有方法 */<br />
/* 修正IE6振动bug */<br />
* html,* html body{background-image:url(about:blank);background-attachment:fixed}<br />
* html .ie6fixedTL{position:absolute;left:expression(eval(document.documentElement.scrollLeft));top:expression(eval(document.documentElement.scrollTop))}<br />
* html .ie6fixedBR{position:absolute;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}<br />
<br />
from:http://www.cnblogs.com/hooray/archive/2011/05/20/2052269.html</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=850</link>
			<category domain="http://www.getroad.cn/blog/?cid=34">css</category>
			<pubDate>2011-10-31 16:31</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=849</guid>
			<title>1153 - Got a packet bigger than 'max_allowe.txt</title>
			<author>bizman</author>
			<description><![CDATA[<p>用导入数据的时候发现有的地方有这个错误。后来才发现我用RPM包装的MYSQL配置文件里面有old_passwords=1去掉就可以了。<br />
<br />
Got a packet bigger than &lsquo;max_allowed_packet&rsquo; bytes or ERROR 1153 (08S01) at line 616: Got a packet bigger than &lsquo;max_allowed_packet&rsquo; by tes...<br />
<br />
昨天用导入数据的时候发现有的地方有这个错误。<br />
<br />
后来才发现我用RPM包装的MYSQL配置文件里面有old_passwords=1去掉就可以了。<br />
<br />
还有加了<br />
max_allowed_packet=500M<br />
这样就不会出错了。<br />
<br />
PS：建议在5.0后的版本中关掉old_passwords选项。<br />
<br />
如果你不知道你的OLD_PASSWORDS是不是开启了，可以用命令。<br />
<br />
show VARIABLES like '%old_passwords%';<br />
<br />
max_allowed_packet<br />
<br />
Mysql 5.1 遇到的信息包过大问题 用客户端导入数据的时候，遇到 错误代码: 1153 - Got a packet bigger than 'max_allowed_packet' bytes 终止了数据导入。<br />
<br />
当MySQL客户端或mysqld服务器收到大于max_allowed_packet字节的信息包时，将发出&ldquo;信息包过大&rdquo;错误，并关闭连接。对于某些客户端，如果通信信息包过大，在执行查询期间，可能会遇到&ldquo;丢失与MySQL服务器的连接&rdquo;错误。<br />
<br />
客户端和服务器均有自己的max_allowed_packet变量，因此，如你打算处理大的信息包，必须增加客户端和服务器上的该变量。一般情况下，服务器默认max-allowed-packet为1MB<br />
<br />
如果你正在使用mysql客户端程序，其max_allowed_packet变量的默认值为16MB。要想设置较大的值，可用下述方式启动mysql<br />
<br />
mysql&gt;mysql --max-allowed-packet=32M<br />
<br />
在my.ini也可以更改，需要重新启动mysql<br />
<br />
在my.ini加入[mysql]max_allowed_packet=16M</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=849</link>
			<category domain="http://www.getroad.cn/blog/?cid=31">PHP+mysql</category>
			<pubDate>2011-10-28 16:36</pubDate>
		</item>
		<item>
			<guid>http://www.getroad.cn/blog/?action=show&amp;id=848</guid>
			<title>mysql: Error message file ‘/usr/share/mysql/english/errms</title>
			<author>bizman</author>
			<description><![CDATA[<p>mysql: Error message file &lsquo;/usr/share/mysql/english/errms<br />
<br />
今天维护的服务器由于同事升级mysql数据库导致启动不了，启动后报如下错误：<br />
<br />
Error message file &lsquo;/usr/share/mysql/english/errmsg.sys&rsquo; had only 480<br />
<br />
but it should contain at least 641 error messages.<br />
<br />
Check that the above file is the right version for this program!<br />
<br />
根据错误提示，发现是errmsg.sys文件和升级后的软件版本不一致导致。<br />
<br />
解决：<br />
<br />
1) cp /usr/share/mysql/english/errmsg.sys /usr/share/mysql/english/errmsg.sys.backup<br />
<br />
2) wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.50.tar.gz<br />
<br />
3) tar -xzvf http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.50.tar.gz<br />
<br />
4) cp mysql-5.1.50/sql/share/english/errmsg.sys /usr/share/mysql/english/errmsg.sys<br />
<br />
5）service mysqld strart<br />
6) mysql_upgrade -uroot -p******</p>]]></description>
			<link>http://www.getroad.cn/blog/?action=show&amp;id=848</link>
			<category domain="http://www.getroad.cn/blog/?cid=31">PHP+mysql</category>
			<pubDate>2011-10-28 12:44</pubDate>
		</item>
	</channel>
</rss>

