<?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; 无用的软件使用心得</title>
	<atom:link href="http://www.carelezz.com/blog/category/server-log/feed" rel="self" type="application/rss+xml" />
	<link>http://www.carelezz.com/blog</link>
	<description>粗心小道童的家</description>
	<lastBuildDate>Mon, 30 Nov 2009 11:14:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>在线字典后续</title>
		<link>http://www.carelezz.com/blog/114.html</link>
		<comments>http://www.carelezz.com/blog/114.html#comments</comments>
		<pubDate>Sat, 03 Feb 2007 14:04:02 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/114.html</guid>
		<description><![CDATA[	看了一中午的 mod_rewrite 手册，终于实现了用域名查询单词的功能。用域名查单词，就是使用 xxx.carelezz.com 的形式，将 xxx 换成要查询的单词，然后就可以得出结果来。

	静下心来做一件事，将它做成功，心里会很踏实。
 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/114.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在线字典</title>
		<link>http://www.carelezz.com/blog/113.html</link>
		<comments>http://www.carelezz.com/blog/113.html#comments</comments>
		<pubDate>Tue, 30 Jan 2007 11:17:18 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/113.html</guid>
		<description><![CDATA[	早想做个在线字典了，这样不用抱着厚厚的牛津高阶来翻，在单位电脑上也可以用。

	自从看了一点 python ，这个想法也很容易变成现实了。这个简陋的在线字典的脚本基于 python 和 freedictd，如果有人发现错误，请及时告知，谢谢。

	上次在外院培训时，老师说，尽可能地用用英英字典，可以锻炼英文思维，记单词也会更快。所以，用的词库是牛津高阶第六版英英，朗文2003英英，还有一个 xdict 英汉（以备万一看不懂英文注释）。XD

	在左边就可以看到这个查词框，忘了提醒了，不支持短语查询。
 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/113.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache 上使用 mod_rewrite 防盗链配置</title>
		<link>http://www.carelezz.com/blog/106.html</link>
		<comments>http://www.carelezz.com/blog/106.html#comments</comments>
		<pubDate>Wed, 22 Nov 2006 15:17:54 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/106.html</guid>
		<description><![CDATA[	看到车东的《Apache上的防图片/mp3盗链配置：mod_rewrite it》，很受启发。



	RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www.)?carelezz.com/.*$ [NC]
RewriteRule .(jpg&#124;gif)$ http://www.carelezz.com [R=301,L]


	这样配置要比我原来的配置更好。原来的只给出&#8220;403 Forbidden&#8221; 的错误，现在盗链的话，就会自动转向到我的主页。

	原来的配置：


	SetEnvIfNoCase Referer &#8220;^http://www.carelezz.com/&#8221; local_ref=1
〈filesmatch &#8220;.(txt&#124;doc&#124;jpg&#124;gif&#124;mp3&#124;zip&#124;rar&#124;png)&#8221;〉
Order Allow,Deny
Allow from env=local_ref
Allow from 127.0.0.1
〈/filesmatch〉



 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/106.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>rsync 和 ssh 备份笔记</title>
		<link>http://www.carelezz.com/blog/101.html</link>
		<comments>http://www.carelezz.com/blog/101.html#comments</comments>
		<pubDate>Sat, 28 Oct 2006 16:08:37 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/101.html</guid>
		<description><![CDATA[	Rsync 非常适合在两台机器之间快速同步大型、复杂的目录，例如论坛的附件目录。再配合 ssh ，则安全性也有保证，且可以利用 ssh public key 和 cron 来进行自动定时同步。

	说明：两台机器分别为 localhost 和 remotehost ；用户分别为 localuser 和 remoteuser。
环境：FreeBSD 4.9 和 FreeBSD 6.1

	设置 ssh public key 认证


	$ssh-keygen -t dsa -b 2048


	生成所需的密钥



	$scp /home/localuser/.ssh/id_dsa.pub remoteuser@remotehost:/home/remoteuser/.ssh/localuser_id_dsa.pub


	将公钥拷贝至 remotehost

	

	$ssh remoteuser@remotehost


	登录到遠端



	$cd .ssh/ ; cat localuser_id_dsa.pub >> authorized_keys


	至此，设置 ssh 认证完毕。

	设置 rsync 
确认两端机器都安装 rsync ， freeBSD 有 ports ，安装非常方便。

	写个脚本名为 backup.sh ，内容如下：


	#!/bin/sh

	RSYNC=/usr/local/bin/rsync
SSH=/usr/bin/ssh
KEY=/home/localuser/.ssh /id_rsa
RUSER=remoteuser
RHOST=remotehost
RPATH=/remote/dir
LPATH=/this/dir

	$RSYNC -az&#8212;delte -e &#8220;$SSH [...]]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/101.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Super-smack 简易指南</title>
		<link>http://www.carelezz.com/blog/93.html</link>
		<comments>http://www.carelezz.com/blog/93.html#comments</comments>
		<pubDate>Tue, 05 Sep 2006 08:00:29 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/93.html</guid>
		<description><![CDATA[	Super-smack 是一个强大的广受赞誉的压力测试工具，支持MySQL和PostgreSQL。这个工具程序现在由 Tony Bourke 维护。

	安装
Super-smack 现在是1.3版，源码下载地址如下：
http://vegan.net/tony/supersmack/super-smack-1.3.tar.gz

	./configure&#8212;with-mysql&#8212;with-pgsql
根据需要，可以只保留 MySQL 和 PostgreSQL 中的一个。如果你的 client library 安装在其他目录，你要指明它，例如：
./configure&#8212;with-mysql=/opt/mysql
然后
make
su
make install

	PS. FreeBSD 下面有 ports 的，安装起来更方便。

	使用
将程序提供的 smack 样本文件重新拷贝一份，然后编辑此文件，填入相应的连接信息，比如用户名、密码、端口和测试所用的数据库名。
cp /usr/share/smacks/select-key.smack select-key-mysql.smack

	开始运行
super-smack &#8212;d mysql select-key-mysql.smack 10 1000

	10 是连接客户的数目，每个客户有100次轮询。

	结果
Query Barrel Report for client smacker1
connect: max=66ms  min=0ms avg= 66ms from 10 clients
Query_type      num_queries     max_time    [...]]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/93.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 6.06 LTS (Dapper) 调整小结</title>
		<link>http://www.carelezz.com/blog/90.html</link>
		<comments>http://www.carelezz.com/blog/90.html#comments</comments>
		<pubDate>Fri, 01 Sep 2006 16:44:02 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/90.html</guid>
		<description><![CDATA[	Dapper 安装好之后，不能识别我的显示器 Dell P992，只能工作在60 Hz 下。还好在网上查到了水平和垂直刷新率，重新配置了 xwindows。

	$sudo dpkg-reconfigure xserver-xorg

	水平和垂直刷新率分别为：

	HorizSync       30-107
VertRefresh     48-120

	将源换为 cn99 的，因为 cn99 感觉速度快。


	deb http://ubuntu.cn99.com/ubuntu/ dapper main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-backports main restricted universe multiverse
＃deb http://ubuntu.cn99.com/ubuntu-cn/ dapper main restricted universe multiverse
＃deb [...]]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/90.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>加速 ubuntu 的引导进程</title>
		<link>http://www.carelezz.com/blog/61.html</link>
		<comments>http://www.carelezz.com/blog/61.html#comments</comments>
		<pubDate>Sat, 18 Mar 2006 13:21:18 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/61.html</guid>
		<description><![CDATA[	ubuntu 虽然替用户打点好了一切，却也安装了一些用户不需要的服务，而且导致系统引导时间比较长，所以要去掉那些服务进程。

	我查阅了相关资料，发现有两种办法：第一，直接修改 /etc/init.d 相应脚本的属性为不可执行；第二，使用相应的工具，类似 bum，sysv-rc-conf。

	第一种方法简单是简单，但有缺陷，导致了启动过程中无法避免的错误信息。我是一个完美主义者，所以我选用了第二种方法，选择了 bum 。Bum 安装相当简单，也有不错的文档支持。
http://www.marzocca.net/linux/bumdocs.html

	根据自己的情况，我关闭了以下服务。需要说明的是，出于安全考虑 /etc/rc.S 下的服务都没有改动。
anacron 类似 cron 的系统。
apmd 这个已经过时了，我的机器支持 acpi。
atd 类 cron 的工具。
bluez-utils 用来支持蓝牙设备的。
cupsys 用来控制打印任务的。
fetchmail 一个收取邮件的服务。
hotkey-setup 自动设置笔记本热键。
hplip 是惠普打印和图形子系统。
mdadm 类 raid 的管理工具。
pcmia 是用于处理笔记本扩展卡的程序。
postfix 高性能的邮件服务器。
rsync 快速的远程文件拷贝程序。
 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/61.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>qmail 系统 bounce 邮件浅谈</title>
		<link>http://www.carelezz.com/blog/48.html</link>
		<comments>http://www.carelezz.com/blog/48.html#comments</comments>
		<pubDate>Fri, 27 Jan 2006 03:13:55 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/?p=48</guid>
		<description><![CDATA[	首先说明一下 ; 和 < #@[]>; 都是系统 bouce 信件信封 (envelope) 上的寄信人地址。这两种信都是系统产生的，区别在于 ; 往往是系统 single bouce 的地址，而 < #@[]>; 则是系统 double bounces 或者 triple bouces 的地址。系统用这两种地址是为了避免邮件回路 (mail loops) 。

	来自 < #@[]>; 一般都是系统的 double bounces，要去掉这些 double bounces 可以有一种简单的办法，其原理是产生一个 nobody 的地址，发往这里的信件都会被丢弃，这样 double bouces 就不会烦你的 postmaster 了。

	具体步骤如下：


	#echo # >; /var/qmail/alias/.qmail-nobody
	#echo nobody >; /var/qmail/control/doublebounceto


	&#8212;
 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/48.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 下 Zend Studio 5.0 的中文支持</title>
		<link>http://www.carelezz.com/blog/43.html</link>
		<comments>http://www.carelezz.com/blog/43.html#comments</comments>
		<pubDate>Mon, 02 Jan 2006 04:52:48 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/?p=43</guid>
		<description><![CDATA[	Zend Studio 大概是目前最理想的 PHP 开发工具了，不过其编辑器对中文的支持却不是那么让人满意，尤其是 Linux 版本。

	在网上搜寻了一番，我发现了一个解决办法，记录下来：
1.把所需的中文字体，我用的是 simsun.ttc ，拷贝在 Zend Studio 安装目录 jre/lib/fonts 下。
2.在&#8220; Tools-> Preferences -> Colors and Fonts &#8221;中，将默认的 Scheme 另存，然后修改 font 令其指向中文字体。

	PS. 启动 Zend Studio Client，选择菜单&#8220; Edi t-> Show Snippets &#8221;，就可以打开代码片断仓库。
 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/43.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web 缓冲调整笔记</title>
		<link>http://www.carelezz.com/blog/41.html</link>
		<comments>http://www.carelezz.com/blog/41.html#comments</comments>
		<pubDate>Sat, 24 Dec 2005 13:21:40 +0000</pubDate>
		<dc:creator>cAreLeZz</dc:creator>
				<category><![CDATA[无用的软件使用心得]]></category>

		<guid isPermaLink="false">http://www.carelezz.com/blog/?p=41</guid>
		<description><![CDATA[	我最近在用一个 CMS 做网站玩，是生成静态网页的那种。使用当中，我发现一个问题：每次当我重新生成首页，看到的首页却不是最新的，必须要刷新一下才行。这个问题对用户相当不友好，我决心要解决它。粗粗研究了一下，这个问题和 Web 缓冲有关，那就从 Web 缓冲开始。

	通过搜索发现下面的两个链接对这个问题谈得很透彻了。
开发出高性能的网站，第二部分 &#8212; 最佳缓冲控制
Apache: How to use mod_expires with Apache 1.3 and 2.0

	我所要注意的是，对于缓冲控制的策略，不要纠缠在文件应该缓冲多长时间，重要的是文件是否应该缓冲。

	我的条件应该说较好，可以对服务器组件 Apache 进行调整，缓冲控制策略如下：

	ExpiresActive on
ExpiresByType image/jpg &#8220;access 1 month&#8221;
ExpiresByType image/gif &#8220;access 1 month&#8221;
ExpiresByType text/css &#8220;access 1 day&#8221;
ExpiresByType application/x-shockwave-flash &#8220;access 1 month&#8221;
ExpiresDefault &#8220;now plus 1 hour&#8221;


	如果不想某些文件缓冲，可以用下面这个语法：
now plus 0 seconds

	重新启动 Apache 后，此问题完美解决。
 ]]></description>
		<wfw:commentRss>http://www.carelezz.com/blog/41.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

