<?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>Justin's Tech Blog &#187; FreeBSD</title>
	<atom:link href="http://www.sofee.cn/blog/category/technical/os/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sofee.cn/blog</link>
	<description>世界其实很简单，复杂的是人；生活其实很轻松，沉重的是感情！</description>
	<lastBuildDate>Sun, 17 Jan 2010 17:17:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL集群(NDB)安装脚本</title>
		<link>http://www.sofee.cn/blog/2007/08/08/97/</link>
		<comments>http://www.sofee.cn/blog/2007/08/08/97/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 01:00:57 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[distributed]]></category>
		<category><![CDATA[集群]]></category>
		<category><![CDATA[ndb]]></category>
		<category><![CDATA[ndbinstaller]]></category>
		<category><![CDATA[分布式]]></category>
		<category><![CDATA[数据库集群]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/08/08/97/</guid>
		<description><![CDATA[Jim Dowling为我们写了一个安装和管理MySQL集群(MySQL Cluster)的BASH脚本，支持安装本地集群和分布式集群，提问式的安装方式，非常方便，相信每个人都很容易上手。
http://www.jimdowling.info/ndbinstaller-trac/wiki/DetailedLocalhostInstall这里以图文的方式介绍了这个脚本的整个安装过程。
更多资料请访问：http://www.jimdowling.info/ndbinstaller-trac/
安装脚本下载(右键另存为)

wget http://www.jimdowling.info/ndbinstaller/ndbinstaller.sh
# or
svn co http://www.jimdowling.info/ndbinstaller/


  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2007%2F08%2F08%2F97%2F';
  addthis_title  = 'MySQL%E9%9B%86%E7%BE%A4%28NDB%29%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/08/08/97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find命令技巧</title>
		<link>http://www.sofee.cn/blog/2007/06/28/74/</link>
		<comments>http://www.sofee.cn/blog/2007/06/28/74/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 04:49:57 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/06/28/74/</guid>
		<description><![CDATA[ 
var alimama_pid="mm_10006029_103557_106167"; 
var alimama_titlecolor="8ab459"; 
var alimama_descolor ="888888"; 
var alimama_bgcolor="FFFFFF"; 
var alimama_bordercolor="ffffff"; 
var alimama_linkcolor="8ab459"; 
var alimama_sizecode="12"; 
var alimama_width=468; 
var alimama_height=60; 
var alimama_type=2; 
 
 
 find命令功能其实很强，针对某些特定条件的日志文件特别有效，下面列举几个技巧：
1.查找90天以前的文件，并用LS列出全名

# find /data/webdata -mtime +90 -type f -exec ls -l -h {} \;

2.查找修改时间超过90天的文件

# find /data/webdata -mtime +90

3.查找修改时间超过90天，并且不包含click_15和click_16目录的文件

# find /data/webdata -mtime +90 \( -path /data/webdata/click_15 -o -path /data/webdata/click_16 \) -prune -o [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/06/28/74/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade SQLite2 to SQLite3</title>
		<link>http://www.sofee.cn/blog/2007/06/25/73/</link>
		<comments>http://www.sofee.cn/blog/2007/06/25/73/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 05:09:50 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[sqlite2]]></category>
		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/06/25/73/</guid>
		<description><![CDATA[很简单的一条命令：

sqlite2 mydb.db .dump &#124; sqlite3 mydb-new.db

如果需要很多数据库，写个简单的脚本即可。

#!/bin/bash
#
# description: Upgrade SQLite2 to SQLite3
#
&#160;
DBPATH=&#34;/data/db&#34;
&#160;
for oldfile in $&#40;find ${DBPATH} -name &#34;*.db&#34;&#41;; do
        newfile=&#34;${oldfile}.bak&#34;
        sqlite2 $oldfile .dump &#124; sqlite3 $newfile
        mv -f $newfile $oldfile
      [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/06/25/73/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>自行编译安装PHP</title>
		<link>http://www.sofee.cn/blog/2007/06/25/71/</link>
		<comments>http://www.sofee.cn/blog/2007/06/25/71/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 04:45:48 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[lib64]]></category>
		<category><![CDATA[libmysqlclient.so]]></category>
		<category><![CDATA[mysqlclient]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/06/25/71/</guid>
		<description><![CDATA[实际上这种文章已经很多了，网上也到处都是，之所以写这篇文章，目的是为了解决其中一个问题。

# cd /usr/local/src
# wget http://cn.php.net/distributions/php-5.2.3.tar.gz
# tar -zxvf php-5.2.3.tar.gz
# cd php-5.2.3
# ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-exec-dir=/usr/bin --with-freetype-dir --with-png-dir=/usr/local --with-gd=shared --enable-gd-native-ttf --with-iconv --with-jpeg-dir=/usr/local --with-openssl --with-png --with-pcre-regex --with-zlib --with-layout=GNU --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-memory-limit [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/06/25/71/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fix too many FIN_WAIT_2 connections under freebsd</title>
		<link>http://www.sofee.cn/blog/2006/08/26/33/</link>
		<comments>http://www.sofee.cn/blog/2006/08/26/33/#comments</comments>
		<pubDate>Sat, 26 Aug 2006 06:54:57 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Lighttpd]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/?p=33</guid>
		<description><![CDATA[查看FIN_WAIT_2连接数：

bsd#netstat -an &#124; grep FIN_WAIT_2 &#124; wc -l
2523

修改Lighttpd配置文件，加入下面这条语句：

server.max-keep-alive-requests = 0


bsd#netstat -an &#124; grep FIN_WAIT_2 &#124; wc -l
91

如果服务器开启了ipfw2防火墙的话，还需要执行：

sysctl -w net.inet.ip.fw.dyn_keepalive=0

p.s. 若为APACHE服务器，同理。

  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2006%2F08%2F26%2F33%2F';
  addthis_title  = 'Fix+too+many+FIN_WAIT_2+connections+under+freebsd';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2006/08/26/33/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Marvell 88e8050 NIC Drivers on FreeBSD 6.x</title>
		<link>http://www.sofee.cn/blog/2006/08/05/27/</link>
		<comments>http://www.sofee.cn/blog/2006/08/05/27/#comments</comments>
		<pubDate>Sat, 05 Aug 2006 03:50:22 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[if_myk.ko]]></category>
		<category><![CDATA[loader.conf]]></category>
		<category><![CDATA[Marvell]]></category>
		<category><![CDATA[NIC-Driver]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/?p=27</guid>
		<description><![CDATA[There is two method to install marvell 88e8050 nic driver: install the binary version from marvell official website or compile the driver source from andre&#8217;s homepage.
1. Install the binary version from marvell official website.
download the driver from http://www.marvell.com/drivers

#tar -xvf mykbsd60x86-8.12.2.3.tar
#cp if_myk.ko /boot/kernel/
#kldload if_myk.ko


2. compile the driver source from andre&#8217;s homepage.

#cd /usr/local/src/
#fetch &#60;a href=&#34;http://people.freebsd.org/~andre/mykbsd60x86-8.12.1.3-src.tgz&#34; title=&#34;http://people.freebsd.org/~andre/mykbsd60x86-8.12.1.3-src.tgz - [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2006/08/05/27/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
