<?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>嘟嘟鱼 &#187; linux</title>
	<atom:link href="http://www.duduyu.net/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.duduyu.net</link>
	<description>嘟嘟鱼的个人博客</description>
	<lastBuildDate>Thu, 15 Dec 2011 07:54:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>linux：/lib/libc.so.6: version `glibc_2.7′ not found</title>
		<link>http://www.duduyu.net/liblibc-so-6-version-glibc_2-7-not-found</link>
		<comments>http://www.duduyu.net/liblibc-so-6-version-glibc_2-7-not-found#comments</comments>
		<pubDate>Fri, 17 Jun 2011 02:13:29 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[rar]]></category>

		<guid isPermaLink="false">http://www.kuaixiang.net/?p=12033</guid>
		<description><![CDATA[刚用户反映服务器rar版本低,下了个4.0的运行提示 /lib/libc.so.6: version `GLIBC_2.7′ not found 升级了centos的glibc库 yum -y update glibc 问题依旧。用命令查看glibc库的信息 rpm -qi glibc 显示系统的glibc库版本为... ]]></description>
			<content:encoded><![CDATA[<p>刚用户反映服务器rar版本低,下了个4.0的运行提示</p>
<blockquote><p>/lib/libc.so.6: version `GLIBC_2.7′ not found</p></blockquote>
<p>升级了centos的glibc库<br />
<code>yum -y update glibc</code><br />
问题依旧。用命令查看glibc库的信息<br />
<code>rpm -qi glibc </code><br />
显示系统的glibc库版本为2.5</p>
<p>在CentOS中用更新命令到2.5已经是最新版本了，只好手动下载 glibc 2.7 的源码包编译安装更新：</p>
<p>地址：http://ftp.gnu.org/pub/gnu/glibc/glibc-2.7.tar.gz<br />
<code>cd /usr/local/src<br />
wget http://ftp.gnu.org/pub/gnu/glibc/glibc-2.7.tar.gz<br />
tar zxvf glibc-2.7.tar.gz<br />
glibc-2.7/configure #执行configure命令时不能进到glibc-2.7文件夹里面，否则无法执行<br />
cd glibc-2.7<br />
make &amp;&amp; make install</code></p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/linux-installation-and-use-of-rar" title="linux下RAR的安装和使用">linux下RAR的安装和使用</a></li><li><a href="http://www.duduyu.net/linux-batch-rename-files" title="Linux批量重命名文件">Linux批量重命名文件</a></li><li><a href="http://www.duduyu.net/php-load-linux-under-way-mbstring" title="linux下php加载mbstring的方法">linux下php加载mbstring的方法</a></li><li><a href="http://www.duduyu.net/statistics-document-the-number-of-linux" title="linux 统计文件个数">linux 统计文件个数</a></li><li><a href="http://www.duduyu.net/argument-list-too-long-solution" title="Argument list too long 的解决办法">Argument list too long 的解决办法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/liblibc-so-6-version-glibc_2-7-not-found/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux系统如何解压大于4G的文件</title>
		<link>http://www.duduyu.net/linux-system-how-to-extract-files-larger-than-4g</link>
		<comments>http://www.duduyu.net/linux-system-how-to-extract-files-larger-than-4g#comments</comments>
		<pubDate>Tue, 04 Jan 2011 08:00:29 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.kuaixiang.net/?p=12026</guid>
		<description><![CDATA[刚才同事分享的，这下方便多了。 http://sourceforge.net/projects/p7zip/ 这里下载7z make make install 7za x test.zip 您可能也对这些文章感兴趣秒杀Google浏览器用 Wubi 安装 Ubuntu 8.04 只需五步又是一个骗QQ号的... ]]></description>
			<content:encoded><![CDATA[<p> 刚才同事分享的，这下方便多了。</p>
<p>http://sourceforge.net/projects/p7zip/</p>
<p>这里下载7z<br />
make<br />
make install<br />
7za x test.zip</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/electronic-mosquito-green-version-of-the-fifth-generation-in-2007" title="电子蚊香2007 第五代 绿色版">电子蚊香2007 第五代 绿色版</a></li><li><a href="http://www.duduyu.net/gexing-wangzhi" title="网站的个性访问方式">网站的个性访问方式</a></li><li><a href="http://www.duduyu.net/207" title="今天体检去了">今天体检去了</a></li><li><a href="http://www.duduyu.net/sharing-the-title-tool-clip2net" title="共享截图的好工具-Clip2Net">共享截图的好工具-Clip2Net</a></li><li><a href="http://www.duduyu.net/sogou-pinyin-input-method-v3-1-released" title="搜狗拼音输入法v3.1发布">搜狗拼音输入法v3.1发布</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/linux-system-how-to-extract-files-larger-than-4g/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>pure-ftpd日志记录设置</title>
		<link>http://www.duduyu.net/pure-ftpd-logging-settings</link>
		<comments>http://www.duduyu.net/pure-ftpd-logging-settings#comments</comments>
		<pubDate>Wed, 31 Mar 2010 02:08:06 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[pure-ftpd]]></category>
		<category><![CDATA[日志]]></category>

		<guid isPermaLink="false">http://www.kuaixiang.net/?p=11911</guid>
		<description><![CDATA[刚帮一个用户查看ftp操作日志，发现没有记录，就帮他设置了下,他用的是pure-ftpd，保存下方法: 1)建立文件/var/log/pureftpd.log 2)修改/etc/syslog.conf 1&#62;在这行的cron.none后面添加 ;ftp.none 使ftp的日志... ]]></description>
			<content:encoded><![CDATA[<p>刚帮一个用户查看ftp操作日志，发现没有记录，就帮他设置了下,他用的是pure-ftpd，保存下方法:</p>
<p><strong>1)建立文件/var/log/pureftpd.log</strong></p>
<p><strong>2)修改/etc/syslog.conf</strong></p>
<p><strong>1&gt;</strong>在这行的cron.none后面添加 <strong>;ftp.none</strong> 使ftp的日志信息成私有<br />
*.info;mail.none;authpriv.none;cron.none              /var/log/messages<br />
为<br />
*.info;mail.none;authpriv.none;cron.none<strong>;ftp.none</strong>              /var/log/messages</p>
<p><strong>2&gt;</strong>在/etc/syslog.conf文件最后加上</p>
<p>#pureftp日志<br />
ftp.*        <span style="font-size: medium;"><strong>-</strong></span>/var/log/pureftpd.log</p>
<p>注意: 不要去掉/var前面的<span style="font-size: medium;"><strong>-</strong></span>号,否则日志会在/var/log/messages与/var/log/purefpd.log里各记录一份. 添加了<span style="font-size: medium;"><strong>-</strong></span>号,就只会记录在/var/log/purefptd.log内</p>
<p>3)<strong>使/etc/syslog.conf生效</strong><br />
[root@www log]# <strong>killall -HUP syslogd</strong></p>
<p>到现在设置完毕,重启下pure-ftpd,现在在客户端登陆ftp试下</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/linux-installation-and-use-of-rar" title="linux下RAR的安装和使用">linux下RAR的安装和使用</a></li><li><a href="http://www.duduyu.net/the-first-swimming" title="第一次游泳">第一次游泳</a></li><li><a href="http://www.duduyu.net/today-learned-several-useful-stuff" title="今天学会了几个有用的东东">今天学会了几个有用的东东</a></li><li><a href="http://www.duduyu.net/today-finally-get-a-second-generation-id-card-photos-certification" title="今天终于搞定了二代身份证相片认证">今天终于搞定了二代身份证相片认证</a></li><li><a href="http://www.duduyu.net/207" title="今天体检去了">今天体检去了</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/pure-ftpd-logging-settings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>socks5代理服务器的配置</title>
		<link>http://www.duduyu.net/socks5-proxy-serveru002639s-configuration</link>
		<comments>http://www.duduyu.net/socks5-proxy-serveru002639s-configuration#comments</comments>
		<pubDate>Mon, 08 Mar 2010 03:16:56 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[socks5]]></category>
		<category><![CDATA[代理服务器]]></category>

		<guid isPermaLink="false">http://www.kuaixiang.net/?p=11902</guid>
		<description><![CDATA[　　1。先在北大天网搜索一下socks5的安装包，发现一大堆，最新版本是socks5-v1.0r11.tar.gz，于是下载到我的RH9的服务器上。 　　2。解压缩软件包 　　#tar xvfz socks5-v1.0r11.tar.gz 　　3.开始编译 　... ]]></description>
			<content:encoded><![CDATA[<p>　　1。先在北大天网搜索一下socks5的安装包，发现一大堆，最新版本是socks5-v1.0r11.tar.gz，于是下载到我的RH9的服务器上。<br />
　　2。解压缩软件包<br />
　　#tar xvfz socks5-v1.0r11.tar.gz<br />
　　3.开始编译<br />
　　#cd socks5-v1.0r11<br />
　　#./configure --with-threads<br />
　　#make<br />
　　#make install<br />
　　4.建立/etc/socks5.conf,其实在软件包里已经有现成的examples<br />
　　#cd examples<br />
　　#cp socks5.conf.singlehomed /etc/socks5.conf (我们挑选一个最简单的配置文件)<br />
　　默认配置就是<br />
　　# A Socks5 Config file for a normal, single homed server<br />
　　permit - - - - - -<br />
　　这个配置文件是允许任何人都可以使用这个socks5代理，并不需要验证<span id="more-11902"></span><br />
　　如果想限制只是某个IP段(192.168.0.0/255.255.255.0)可以访问，可以改成<br />
　　permit - - 192.168.0. - - -<br />
　　或者只允许某个IP(192.168.0.10)可以访问使用，可以改成<br />
　　permit - - 192.168.0.10 - - -<br />
　　5.ok 运行一下socks5 -t 启动socks5服务，然后用QQ测试一下代理是否生效，记住默认端口是1080<br />
　　反正我是在FTP软件和QQ上试了 都没问题。<br />
　　6.如果要停止socks5，只要运行stopsocks -KILL就行，socks5就会停止！<br />
　　7.使用非默认端口：如果你想让socks5服务启动的时候不启动默认监听端口1080，比如为1234，我们可以运行如下命令<br />
　　socks5 -b 1234 -t 当然你关掉这个服务，就必须用下面的命令 stopsocks -p 1234 -KILL<br />
　　8.我们来深入配置一下socks5.conf,使socks5使用用户验证机制<br />
　　要使用用户验证，首先要建立/etc/socks5.pwsswd文件<br />
　　内容为：（userA代表用户名。passwdA代表用户userA的密码）<br />
　　#/etc/socks5.passwd<br />
　　userA passwdA<br />
　　userB passwdB<br />
　　userC passwdC<br />
　　然后修改/etc/socks5.conf<br />
　　添加下列语句<br />
　　auth - - u<br />
　　或者把：<br />
　　auth - - -改成auth - - u<br />
　　添加：<br />
　　把默认permit - - - - - - 改成permit u - 192.168.0. - - -<br />
　　即允许来自192.168.0.0/255.255.255.0网段的任何经过用户认证的连接<br />
　　如果你不想把密码文件存在默认的/etc/socks5.passwd里。想存在自定义的文件，比如/etc/<a href="http://www.quickshare.com.cn/tag/qq"  class="alinks_links" onclick="return alinks_click(this);" title="qq&#30456;&#20851;&#25991;&#31456;"  rel="external">qq</a>.passwd<br />
　　那就得修改/etc/socks5.conf.添加一项参数<br />
　　set SOCKS5_PWDFILE /etc/qq.passwd<br />
　　ok！重启一下服务，这时如果不输入正确的用户名和密码是使用不了socks5代理服务器的，输入正确的用户名和密码便可使用。<br />
　　以上说的参数，大家可以结合使用，比如限制某个IP段使用socks5服务，而且要使用用户名验证<br />
　　另外针对/etc/socks5.conf还有一些参数，大家就自己去研究吧<br />
　　set SOCKS5_BINDINFC 192.168.0.8:1080<br />
　　忽略ident请求。当客户机没有运行identd时，使用SOCKS5_NOIDENT将降低超时值<br />
　　set SOCKS5_NOIDENT<br />
　　指定连接停顿最长时间。超过最大值后，socks5断开连接<br />
　　set SOCKS5_TIMEOUT 15<br />
　　socks5将接受SOCKS V4 协议的请求,默认不接受<br />
　　set SOCKS5_V4SUPPORT<br />
　　指定同时存在的最大子进程数,Socks5预设为64<br />
　　set SOCKS5_MAXCHILD 4</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/detecting-proxy-settings" title="正在检测代理服务器设置">正在检测代理服务器设置</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/socks5-proxy-serveru002639s-configuration/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS 5.4 发布</title>
		<link>http://www.duduyu.net/centos-5-4-released</link>
		<comments>http://www.duduyu.net/centos-5-4-released#comments</comments>
		<pubDate>Wed, 21 Oct 2009 05:49:47 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://www.quickshare.com.cn/?p=11806</guid>
		<description><![CDATA[CentOS Linux 是一个依 GPL 规范,及利用 RedHat Enterprise Linux (RHEL) 的源代码 (source code) 来重新编译 (compile) 的 Linux 版本. CentOS 提供和 RHEL 的 Binary 档案几乎百分之百兼容性,相同的版本 (Release) 和维护 (M... ]]></description>
			<content:encoded><![CDATA[<p><strong>CentOS Linux 是一个依 GPL 规范,及利用 RedHat Enterprise Linux (RHEL) 的源代码 (source code) 来重新编译 (compile) 的 Linux 版本.</strong><br />
CentOS 提供和 RHEL 的 Binary 档案几乎百分之百兼容性,相同的版本 (Release) 和维护 (Maintainence) 更新时间.和 RedHat Enterprise Linux (RHEL) 不同的是,CentOS 依 GPL 的规范,移除了 RedHat 品牌及图片.</p>
<p><strong>下载:</strong><a href="http://mirror.centos.org/centos/5.4/isos/" target="_blank">CentOS 5.4</a></p>
<p>更新暂时未知</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/lamp-peizhi-for-centos5" title="L.A.M.P环境配置方法 for CentOS 5.0">L.A.M.P环境配置方法 for CentOS 5.0</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/centos-5-4-released/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux批量重命名文件</title>
		<link>http://www.duduyu.net/linux-batch-rename-files</link>
		<comments>http://www.duduyu.net/linux-batch-rename-files#comments</comments>
		<pubDate>Mon, 11 May 2009 02:14:11 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[批量重命名]]></category>

		<guid isPermaLink="false">http://www.quickshare.com.cn/?p=11625</guid>
		<description><![CDATA[今天一个用户装的论坛把表前缀写成别的了，要改回cdb开头，于是乎就需要批量修改文件名，上网搜索了下Linux批量重命名文件，发现小蜗牛的一篇文章很实用，就收藏了。 目的：批量重命名... ]]></description>
			<content:encoded><![CDATA[<p>今天一个用户装的论坛把表前缀写成别的了，要改回cdb开头，于是乎就需要批量修改文件名，上网搜索了下<a href="http://www.kuaixiang.net/linux-batch-rename-files">Linux批量重命名文件</a>，发现<a href="http://snailwarrior.blog.51cto.com/680306/139706" target="_blank">小蜗牛的一篇文章</a>很实用，就收藏了。</p>
<div><span style="color: #ff0000;">目的：</span><span style="color: #0000ff;">批量重命名一些文件，这些文件有共同特征，比如具有相同的字母，或者没有共同特征，想统一重命名，修改它们相同位置上的字符等等。</span></div>
<div></div>
<div><span style="color: #000000;">机器马大侠给了个新提示rename 就可以实现，一试用果然更爽，表示感谢。</span></div>
<div><span style="color: #000000;">以下命令实现的结果是把cdb替换成abc</span></div>
<div><span style="color: #000000;">rename cdb abc cdb*</span></div>
<div> </div>
<div><strong>1、我想把它们的名字的第一个1个字母变为"q"，其它的不变</strong></div>
<div><strong></strong> </div>
<div>[root@pps mailqueue]# for i in `ls`; do mv -f $i `echo $i | sed 's/^./q/'`; done</div>
<div> </div>
<div>----------------------------------------<br />
或者写个脚本，显得更加清晰：</div>
<div>for file in `ls`<br />
do<br />
  newfile =`echo $i | sed 's/^./q/'`<br />
　mv $file $newfile<br />
done<br />
----------------------------------------</div>
<div> </div>
<div><strong>2、修改前面5个字母为zhaozh</strong></div>
<div><strong></strong> </div>
<div>[root@pps mailqueue]# for i in `ls`; do mv -f $i `echo $i | sed 's/^...../zhaozh/'`; done</div>
<div> </div>
<div><strong>3、修改后面5个字母为snail</strong></div>
<div> </div>
<div>[root@pps mailqueue]# for i in `ls`; do mv -f $i `echo $i | sed 's/.....$/snail/'`; done</div>
<div> </div>
<div><strong>4、在前面添加 _hoho_</strong></div>
<div><strong></strong> </div>
<div>[root@pps mailqueue]# for i in `ls`; do mv -f $i `echo "_hoho_"$i`; done</div>
<div> </div>
<div><strong>5、所有的小写字母变大写字母</strong></div>
<div> </div>
<div>[root@pps mailqueue]# for i in `ls`; do mv -f $i `echo $i | tr a-z A-Z`; done</div>
<div><span style="color: #228b22;"><strong>唉，举了5个例子，说到底就是用“for 循环 + 组合命令处理”的思路来实现文件批量重命名滴。</strong></span></div>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/liblibc-so-6-version-glibc_2-7-not-found" title="linux：/lib/libc.so.6: version `glibc_2.7′ not found">linux：/lib/libc.so.6: version `glibc_2.7′ not found</a></li><li><a href="http://www.duduyu.net/php-load-linux-under-way-mbstring" title="linux下php加载mbstring的方法">linux下php加载mbstring的方法</a></li><li><a href="http://www.duduyu.net/statistics-document-the-number-of-linux" title="linux 统计文件个数">linux 统计文件个数</a></li><li><a href="http://www.duduyu.net/argument-list-too-long-solution" title="Argument list too long 的解决办法">Argument list too long 的解决办法</a></li><li><a href="http://www.duduyu.net/linux-compression-format-commonly-used-under-the-method-of-compression-and-decompression" title="Linux下常用压缩格式的压缩与解压方法">Linux下常用压缩格式的压缩与解压方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/linux-batch-rename-files/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>linux下php加载mbstring的方法</title>
		<link>http://www.duduyu.net/php-load-linux-under-way-mbstring</link>
		<comments>http://www.duduyu.net/php-load-linux-under-way-mbstring#comments</comments>
		<pubDate>Fri, 09 Jan 2009 06:31:03 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mbstring]]></category>
		<category><![CDATA[pdo_mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.quickshare.com.cn/?p=11468</guid>
		<description><![CDATA[最近服务器上有人需要用到mbstring，还有pdo_mysql，问的人越来越多了，总结下编译方法吧。 环境php5.2.4, 不支持mbstring扩展 假如php的源码包在/usr/local/src/php-5.2.4 php安装目录是/usr/local/php # cd /usr/lo... ]]></description>
			<content:encoded><![CDATA[<p>最近服务器上有人需要用到mbstring，还有pdo_mysql，问的人越来越多了，总结下编译方法吧。<br />
环境php5.2.4, 不支持mbstring扩展<br />
假如php的源码包在/usr/local/src/php-5.2.4<br />
php安装目录是/usr/local/php</p>
<p># cd /usr/local/src/php-5.2.4/ext/mbstring/<br />
# rpm -qa|egrep "autoconf|gcc"                        这个是检测这些组件是否安装，没有安装请执行下面这句，否则会报错<br />
# yum -y install autoconf gcc gcc-c++<br />
# phpize<br />
# ./configure --with-php-config=/usr/local/bin/php-config<br />
# make<br />
# make install</p>
<p>执行完毕后在php.ini里增加extension=mbstring.so</p>
<p>重启web服务器, 看一下phpinfo, 应该支持mbstring了, 完毕!</p>
<p>pdo_mysql 加载方法同上把mbstring替换成pdo_mysql即可</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/lamp-peizhi-for-centos5" title="L.A.M.P环境配置方法 for CentOS 5.0">L.A.M.P环境配置方法 for CentOS 5.0</a></li><li><a href="http://www.duduyu.net/liblibc-so-6-version-glibc_2-7-not-found" title="linux：/lib/libc.so.6: version `glibc_2.7′ not found">linux：/lib/libc.so.6: version `glibc_2.7′ not found</a></li><li><a href="http://www.duduyu.net/to-choose-u0026quotnextu0026quot-programming-language" title="选择学习“下一个”程序语言">选择学习“下一个”程序语言</a></li><li><a href="http://www.duduyu.net/linux-batch-rename-files" title="Linux批量重命名文件">Linux批量重命名文件</a></li><li><a href="http://www.duduyu.net/use-php-to-download-css-file-picture" title="利用PHP下载CSS文件中的图片">利用PHP下载CSS文件中的图片</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/php-load-linux-under-way-mbstring/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>crontab 格式</title>
		<link>http://www.duduyu.net/crontab-format</link>
		<comments>http://www.duduyu.net/crontab-format#comments</comments>
		<pubDate>Fri, 19 Dec 2008 07:39:58 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://www.quickshare.com.cn/?p=11444</guid>
		<description><![CDATA[第1列分钟1～59 第2列小时1～23（0表示子夜） 第3列日1～31 第4列月1～12 第5列星期0～6（0表示星期天） 第6列要运行的命令 下面是crontab的格式： 分 时 日 月 星期 要运行的命令 这里有crontab文件... ]]></description>
			<content:encoded><![CDATA[<div class="postentry">
<p>第1列分钟1～59<br />
第2列小时1～23（0表示子夜）<br />
第3列日1～31<br />
第4列月1～12<br />
第5列星期0～6（0表示星期天）<br />
第6列要运行的命令</p>
<p>下面是crontab的格式：<br />
分 时 日 月 星期 要运行的命令</p>
<p>这里有crontab文件条目的一些例子：</p>
<p>30 21 * * * /usr/local/apache/bin/apachectl restart<br />
上面的例子表示每晚的21:30重启apache。</p>
<p>45 4 1,10,22 * * /usr/local/apache/bin/apachectl restart<br />
上面的例子表示每月1、10、22日的4 : 45重启apache。</p>
<p>10 1 * * 6,0 /usr/local/apache/bin/apachectl restart<br />
上面的例子表示每周六、周日的1 : 10重启apache。</p>
<p>0,30 18-23 * * * /usr/local/apache/bin/apachectl restart<br />
上面的例子表示在每天18 : 00至23 : 00之间每隔30分钟重启apache。</p>
<p>0 23 * * 6 /usr/local/apache/bin/apachectl restart<br />
上面的例子表示每星期六的11 : 00 pm重启apache。</p>
<p>* */1 * * * /usr/local/apache/bin/apachectl restart<br />
每一小时重启apache</p>
<p>* 23-7/1 * * * /usr/local/apache/bin/apachectl restart<br />
晚上11点到早上7点之间，每隔一小时重启apache</p>
<p>0 11 4 * mon-wed /usr/local/apache/bin/apachectl restart<br />
每月的4号与每周一到周三的11点重启apache</p>
<p>0 4 1 jan * /usr/local/apache/bin/apachectl restart<br />
一月一号的4点重启apache</p></div>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/tencent-qq-for-shielding-cn-i-almost-lost-a-friend" title="因为腾讯QQ屏蔽.cn,我差点丢了一个朋友">因为腾讯QQ屏蔽.cn,我差点丢了一个朋友</a></li><li><a href="http://www.duduyu.net/midomi-chinese-version-of-the-humming-recognition-program" title="Midomi-中文版的哼歌识别程序">Midomi-中文版的哼歌识别程序</a></li><li><a href="http://www.duduyu.net/reserved-it-people-how-to-leave-the-it-to-do" title="[转载]IT人，离开IT怎么办？">[转载]IT人，离开IT怎么办？</a></li><li><a href="http://www.duduyu.net/301-redirect-implementation-of-the" title="301重定向的实现方法">301重定向的实现方法</a></li><li><a href="http://www.duduyu.net/kaspersky-free-key" title="“暴雪无情,卡巴有情”卡巴斯基反病毒软件KAV7.0免费送一年">“暴雪无情,卡巴有情”卡巴斯基反病毒软件KAV7.0免费送一年</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/crontab-format/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决mysql服务的两个基本问题</title>
		<link>http://www.duduyu.net/mysql-services-to-address-two-basic-issues</link>
		<comments>http://www.duduyu.net/mysql-services-to-address-two-basic-issues#comments</comments>
		<pubDate>Sun, 05 Oct 2008 12:06:10 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.quickshare.com.cn/?p=11098</guid>
		<description><![CDATA[使用mysql基本基本上会遇到主要的两个问题. 1.第一次起动mysql是没有问题的.对mysql做了一些操作,特别是删除mysql中一些不要的帐号后,重新起动mysql会遇到这样的问题 #/etc/init.d/mysqld restart stopping m... ]]></description>
			<content:encoded><![CDATA[<p>使用mysql基本基本上会遇到主要的两个问题.<br />
1.第一次起动mysql是没有问题的.对mysql做了一些操作,特别是删除mysql中一些不要的帐号后,重新起动mysql会遇到这样的问题<br />
#/etc/init.d/mysqld restart<br />
stopping mysql     [ok]<br />
Timeout error occurred trying to start MySQL Daemon.  [failure] </p>
<p> 但是这个时候mysql实际上已经起动了,因为用netstat -ln命令去看3306端口已经起动.使用mysql -u root -p password也能连接到数据库.<br />
这实际上是mysql-3.x的一个bug(具体可以去看mysql的bugzilla和redhat的bugzilla).<br />
是什么原因导致连接超时呢?<br />
我们不妨先看看/etc/init.d/mysqld起动脚本是如何工作的,注意下面的一段<br />
<span id="more-11098"></span><br />
# If you've removed anonymous users, this line must be changed to<br />
# use a user that is allowed to ping mysqld.<br />
ping="/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping"<br />
# Spin for a maximum of ten seconds waiting for the server to come up<br />
        if [ $ret -eq 0 ]; then<br />
            for x in 1 2 3 4 5 6 7 8 9 10; do<br />
            if [ -n "`$ping 2&gt; /dev/null`" ]; then<br />
                    break;<br />
            else<br />
                    sleep 1;<br />
            fi<br />
            done</p>
<p>            if !([ -n "`$ping 2&gt; /dev/null`" ]); then<br />
                    echo "Timeout error occurred trying to start MySQL<br />
Daemon."                    action $"Starting $prog: " /bin/false<br />
            else<br />
                    action $"Starting $prog: " /bin/true<br />
            fi<br />
        else<br />
            action $"Starting $prog: " /bin/false<br />
        fi<br />
        [ $ret -eq 0 ] &amp;&amp; touch /var/lock/subsys/mysqld<br />
        return $ret </p>
<p>我们看到,脚本判断mysql是否起动,使用的是mysqladmin ping命令.</p>
<p>而这个命令想要正确执行是需要能够登录mysql的.现在一些默认帐号已经删除,而且其它帐号已经设置了密码(默认没有设置密码).于是它没有办法连接到mysql.</p>
<p>不妨使用下面的命令测试一下<br />
#mysqladmin -u root -ppassword ping<br />
mysql alive </p>
<p>当你提供了帐号和密码时,它的ping命令就可以正确执行了.<br />
这个bug在mysql新出的mysql4.x可以解决.<br />
但是RH9到FC3一直使用的是mysql3.x(不过mysql官方好象才推出mysql4.1,FC需要考虑问题性).<br />
于是我用了下面的办法临时解决.<br />
a)建立一个帐号,不设置密码,不给任何权限.<br />
b)修改/etc/init.d/mysqld</p>
<p>下面我给出具体操作</p>
<p>#mysql -u root -p passwd<br />
mysql&gt;GRANT select ON test.* TO <a href="mailto:daemon@localhost">daemon@localhost</a></p>
<p>mysql&gt;revoke select on test.* from <a href="mailto:daemon@localhost">daemon@localhost</a> </p>
<p>打开/etc/init.d/mysqld<br />
把下面这行<br />
ping="/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping" <br />
修改为<br />
ping="/usr/bin/mysqladmin -udaemon ping" <br />
保存,退出.</p>
<p>重新起动mysql</p>
<p>#/etc/init.d/mysqld restart<br />
Stopping MySQL:                                            [  OK  ]<br />
Starting MySQL:                                            [  OK  ]</p>
<p>如果你的第二行仍然是failure的话.再执行下面的命令<br />
#/etc/init.d/mysqld start<br />
这时应该式ok了.<br />
如果这样可以ok的话.<br />
那么你需要修改/etc/init.d/mysqld,<br />
在restart函数的start后面再加一个start就可了.</p>
<p>2.即使刚安装的mysql再起动后,去看日志,给给出下面的这些信息<br />
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.<br />
If you do not want to use transactional InnoDB tables, add a line<br />
skip-innodb<br />
to the [mysqld] section of init parameters in your my.cnf<br />
or my.ini. If you want to use InnoDB tables, add to the [mysqld]<br />
section, for example,<br />
innodb_data_file_path = ibdata1:10M:autoextend<br />
But to get good performance you should adjust for your hardware<br />
the InnoDB startup options listed in section 2 at<br />
<a href="http://www.innodb.com/ibman.html">http://www.innodb.com/ibman.html</a> <br />
这是因为默认的数据库起动脚本需要加载innodb数据库,但是mysql在做初始话时并没有初始化时,并没有加载这样的数据库.</p>
<p>因此这里有两种解决办法:使用和不使用innodb.<br />
我们先看不使用innodb的办法.<br />
其实这个方法就是跳过innodb的方法.<br />
在/etc/my.cnf文件的mysqld区域增加一行<br />
skip-innodb就可以了.<br />
如果我们需要使用innodb呢?<br />
那么可在/etc/my.cnf文件的mysqld区域增加下面几行<br />
innodb_data_home_dir = /var/lib/mysql/<br />
innodb_data_file_path = ibdata1:10M:autoextend<br />
innodb_log_group_home_dir = /var/lib/mysql/<br />
innodb_log_arch_dir = /var/lib/mysql/<br />
set-variable = innodb_buffer_pool_size=16M<br />
set-variable = innodb_additional_mem_pool_size=2M<br />
set-variable = innodb_log_file_size=5M<br />
set-variable = innodb_log_buffer_size=8M<br />
innodb_flush_log_at_trx_commit=1<br />
set-variable = innodb_lock_wait_timeout=50<br />
 保存,退出.重启起动mysql,再去看日志.<br />
应该不会再提示有关innodb的问题了.</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/phpmyadmin-how-to-import-large-sql-file" title="phpmyadmin如何导入大的SQL文件">phpmyadmin如何导入大的SQL文件</a></li><li><a href="http://www.duduyu.net/mysql-how-to-solve-the-garbage-problem-of-chinese-data" title="如何解决MYSQL数据中文乱码问题">如何解决MYSQL数据中文乱码问题</a></li><li><a href="http://www.duduyu.net/mysql-beginners-guide" title="MYSQL初学者使用指南">MYSQL初学者使用指南</a></li><li><a href="http://www.duduyu.net/windows-xp-apache-2-2-4-php-5-2-0-mysql-5-0-27-zend-optimizer-3-2-0-environment-configuration" title="Windows XP + Apache 2.2.4 + PHP 5.2.0 + MySQL 5.0.27 + Zend Optimizer 3.2.0环境配置方法">Windows XP + Apache 2.2.4 + PHP 5.2.0 + MySQL 5.0.27 + Zend Optimizer 3.2.0环境配置方法</a></li><li><a href="http://www.duduyu.net/lamp-peizhi-for-centos5" title="L.A.M.P环境配置方法 for CentOS 5.0">L.A.M.P环境配置方法 for CentOS 5.0</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/mysql-services-to-address-two-basic-issues/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>linux 统计文件个数</title>
		<link>http://www.duduyu.net/statistics-document-the-number-of-linux</link>
		<comments>http://www.duduyu.net/statistics-document-the-number-of-linux#comments</comments>
		<pubDate>Sun, 28 Sep 2008 15:13:03 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[统计]]></category>

		<guid isPermaLink="false">http://www.quickshare.com.cn/?p=11082</guid>
		<description><![CDATA[查看某文件夹下文件的个数 ls -l &#124;grep "^-"&#124;wc -l 或 find ./company -type f &#124; wc -l 查看某文件夹下文件的个数，包括子文件夹里的。 ls -lR&#124;grep "^-"&#124;wc -l 查看某文件夹下文件夹的个数，... ]]></description>
			<content:encoded><![CDATA[<p>查看某文件夹下文件的个数<br />
ls -l |grep "^-"|wc -l<br />
或<br />
find ./company -type f | wc -l<br />
查看某文件夹下文件的个数，包括子文件夹里的。<br />
ls -lR|grep "^-"|wc -l<br />
查看某文件夹下文件夹的个数，包括子文件夹里的。<br />
ls -lR|grep "^d"|wc -l<br />
说明：<br />
ls -l<br />
长列表输出该目录下文件信息(注意这里的文件，不同于一般的文件，可能是目录、链接、设备文件等)<br />
grep "^-"<br />
这里将长列表输出信息过滤一部分，只保留一般文件，如果只保留目录就是 ^d<br />
wc -l<br />
统计输出信息的行数，因为已经过滤得只剩一般文件了，所以统计结果就是一般文件信息的行数，又由于<br />
一行信息对应一个文件，所以也就是文件的个数。</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/liblibc-so-6-version-glibc_2-7-not-found" title="linux：/lib/libc.so.6: version `glibc_2.7′ not found">linux：/lib/libc.so.6: version `glibc_2.7′ not found</a></li><li><a href="http://www.duduyu.net/linux-batch-rename-files" title="Linux批量重命名文件">Linux批量重命名文件</a></li><li><a href="http://www.duduyu.net/php-load-linux-under-way-mbstring" title="linux下php加载mbstring的方法">linux下php加载mbstring的方法</a></li><li><a href="http://www.duduyu.net/argument-list-too-long-solution" title="Argument list too long 的解决办法">Argument list too long 的解决办法</a></li><li><a href="http://www.duduyu.net/linux-compression-format-commonly-used-under-the-method-of-compression-and-decompression" title="Linux下常用压缩格式的压缩与解压方法">Linux下常用压缩格式的压缩与解压方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/statistics-document-the-number-of-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

