<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>豆腐！</title>
	<atom:link href="http://daufu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://daufu.wordpress.com</link>
	<description>玄箱．突變．Debian</description>
	<lastBuildDate>Mon, 14 Jan 2008 14:21:45 +0000</lastBuildDate>
	<language>zh-hk</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='daufu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>豆腐！</title>
		<link>http://daufu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://daufu.wordpress.com/osd.xml" title="豆腐！" />
	<atom:link rel='hub' href='http://daufu.wordpress.com/?pushpress=hub'/>
		<item>
		<title>StartSSL：免費的SSL證書</title>
		<link>http://daufu.wordpress.com/2008/01/14/startssl%ef%bc%9a%e5%85%8d%e8%b2%bb%e7%9a%84ssl%e8%ad%89%e6%9b%b8/</link>
		<comments>http://daufu.wordpress.com/2008/01/14/startssl%ef%bc%9a%e5%85%8d%e8%b2%bb%e7%9a%84ssl%e8%ad%89%e6%9b%b8/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 14:21:45 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[安全]]></category>
		<category><![CDATA[伺服器]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[startssl]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2008/01/14/startssl%ef%bc%9a%e5%85%8d%e8%b2%bb%e7%9a%84ssl%e8%ad%89%e6%9b%b8/</guid>
		<description><![CDATA[市面上的SSL證書動輒都要起過100美金一年，如果只是為自己家裏的伺服器加密傳輸的資料就好像不值了。其中一個解決辦法是自己替自己簽發證書，只是這樣一來每個瀏覽器也會出警告，說同學的證書無效。 另一個較好的方法是申請一張免費的StartSSL證書，因為這簽發機構已通過了Mozilla的稽核，所以這張證書在Mozilla的瀏覽器是有效的，就好像由VeriSign等商業機構簽發的證書一樣。 首先到StartSSL申請一個戶口，但個人資料最好填寫正確的，因為申請過程會由人手批核。之後就可到Validations Wizard核實域名擁有者〈Sub-domain是不行的〉，核實過程會寄郵件到postmaster/webmaster等地址，所以同學要確定收到域名的電郵。 同學可以順道申請Google Apps 核實後便可到Certificates Wizard申請證書，選擇SSL/TLS Web Server Certificate，然後輸入私人密匙的密碼sub-domain〈證書可以同時用於domain和sub-domain〉並取得密匙(ssl.key)、certificate signing request(ssl.csr)和證書(ssl.crt)。Certificate signing request對證書用處不大，但私人密匙和證書就一定要保存好了。 解密私匙 # openssl rsa -in ssl.key -out server.key 下載簽發機構的證書 # wget http://www.startssl.com/certs/ca.crt# wget http://www.startssl.com/certs/sub.class1.server.ca.crt 組合證書 # cat ssl.crt ca.crt sub.class1.server.ca.crt &#62;&#62; server.crt 最後修改伺服器設定就可以了。 Technorati Tags: Free, SSL, StartSSL<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=34&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>市面上的SSL證書動輒都要起過100美金一年，如果只是為自己家裏的伺服器加密傳輸的資料就好像不值了。其中一個解決辦法是自己替自己簽發證書，只是這樣一來每個瀏覽器也會出警告，說同學的證書無效。</p>
<p>另一個較好的方法是申請一張免費的StartSSL證書，因為這簽發機構已通過了Mozilla的稽核，所以這張證書在Mozilla的瀏覽器是有效的，就好像由VeriSign等商業機構簽發的證書一樣。</p>
<p>首先到<a href="https://www.startssl.com/">StartSSL</a>申請一個戶口，但個人資料最好填寫正確的，因為申請過程會由人手批核。之後就可到Validations Wizard核實域名擁有者〈Sub-domain是不行的〉，核實過程會寄郵件到postmaster/webmaster等地址，所以同學要確定收到域名的電郵。</p>
<blockquote><p>同學可以順道申請Google Apps</p>
</blockquote>
<p>核實後便可到Certificates Wizard申請證書，選擇SSL/TLS Web Server Certificate，然後輸入私人密匙的密碼sub-domain〈證書可以同時用於domain和sub-domain〉並取得密匙(ssl.key)、certificate signing request(ssl.csr)和證書(ssl.crt)。Certificate signing request對證書用處不大，但私人密匙和證書就一定要保存好了。</p>
<p>解密私匙</p>
<p><code># openssl rsa -in ssl.key -out server.key</code></p>
<p>下載簽發機構的證書</p>
<p><code># wget http://www.startssl.com/certs/ca.crt<br /># wget http://www.startssl.com/certs/sub.class1.server.ca.crt</code></p>
<p>組合證書</p>
<p><code># cat ssl.crt ca.crt sub.class1.server.ca.crt &gt;&gt; server.crt</code></p>
<p>最後修改伺服器設定就可以了。</p>
<p>Technorati Tags: <a href="http://technorati.com/tags/Free" rel="tag">Free</a>, <a href="http://technorati.com/tags/SSL" rel="tag">SSL</a>, <a href="http://technorati.com/tags/StartSSL" rel="tag">StartSSL</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=34&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2008/01/14/startssl%ef%bc%9a%e5%85%8d%e8%b2%bb%e7%9a%84ssl%e8%ad%89%e6%9b%b8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>nginx + PHP + FastCGI：輕型網頁伺服器</title>
		<link>http://daufu.wordpress.com/2008/01/14/nginx-php-fastcgi%ef%bc%9a%e8%bc%95%e5%9e%8b%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8/</link>
		<comments>http://daufu.wordpress.com/2008/01/14/nginx-php-fastcgi%ef%bc%9a%e8%bc%95%e5%9e%8b%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 05:36:16 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[伺服器]]></category>
		<category><![CDATA[http server nginx php]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2008/01/14/nginx-php-fastcgi%ef%bc%9a%e8%bc%95%e5%9e%8b%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8/</guid>
		<description><![CDATA[nginx是一個非常輕型的網頁伺服器，而且也有在大型網站上使用。 安裝PHP和FastCGI # aptitude install php5-cgi libfcgi0c2 下載FastCGI的init script # cd /etc/init.d # wget -O php-fastcgi http://daufu.files.wordpress.com/2008/01/php-fastcgiinit.txt 修改檔案屬性 # chmod +x php-fastcgi 下載FastCGI init script的設定檔 # cd /etc/default # wget -O php-fastcgi http://daufu.files.wordpress.com/2008/01/php-fastcgidefault.txt 如果執行後沒有問題就把init script安裝到系統 # update-rc.d php-fastcgi defaults 19 21 啟動php-fastcgi # /etc/init.d/php-fastcgi start 可用ps aux指令檢查php-fastcgi有沒有執行 安裝nginx的必要套件〈以下的套件足以compile所有nginx的功能〉 # aptitude install zlib1g-dev libpcre3-dev libssl-dev libgcrypt11-dev [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=28&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>nginx是一個非常輕型的網頁伺服器，而且也有在大型網站上使用。</p>
<p>安裝PHP和FastCGI</p>
<p><code># aptitude install php5-cgi libfcgi0c2</code></p>
<p>下載FastCGI的init script</p>
<p><code># cd /etc/init.d<br />
# wget -O php-fastcgi http://daufu.files.wordpress.com/2008/01/php-fastcgiinit.txt</code></p>
<p>修改檔案屬性</p>
<p><code># chmod +x php-fastcgi</code></p>
<p>下載FastCGI init script的設定檔</p>
<p><code># cd /etc/default<br />
# wget -O php-fastcgi http://daufu.files.wordpress.com/2008/01/php-fastcgidefault.txt</code></p>
<p>如果執行後沒有問題就把init script安裝到系統</p>
<p><code># update-rc.d php-fastcgi defaults 19 21</code></p>
<ol>
<li>啟動php-fastcgi<br />
<code># /etc/init.d/php-fastcgi start</code></li>
<li>可用<code>ps aux</code>指令檢查php-fastcgi有沒有執行</li>
</ol>
<p>安裝nginx的必要套件〈以下的套件足以compile所有nginx的功能〉</p>
<p><code># aptitude install zlib1g-dev libpcre3-dev libssl-dev libgcrypt11-dev</code></p>
<p>到<a href="http://nginx.net/">官網</a>下載nginx</p>
<p><code># cd /usr/src<br />
# wget http://sysoev.ru/nginx/nginx-0.5.35.tar.gz</code></p>
<p>解壓縮檔案</p>
<p><code># tar zxvf nginx-0.5.35.tar.gz</code></p>
<p>Compile及安裝nginx</p>
<p><code># cd nginx-0.5.35<br />
# ./configure --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=www-data --group=www-data --with-http_ssl_module  --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module--http-client-body-temp-path=/var/cache/nginx/client_body_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --with-sha1=/usr/lib<br />
# make<br />
# make install<br />
# mkdir /var/cache/nginx<br />
# chown www-data:www-data /var/cache/nginx</code></p>
<p>安裝nginx的init script</p>
<p><code># cd /etc/init.d<br />
# wget -O nginx http://daufu.files.wordpress.com/2008/01/nginxinit.txt<br />
# chmod +x nginx<br />
# update-rc.d nginx defaults</code></p>
<blockquote><p>這個init script是從Debian的套件提出的</p></blockquote>
<p>為nginx設定FastCGI</p>
<p><code># cd /etc/nginx<br />
# wget -O fastcgi_params http://daufu.files.wordpress.com/2008/01/fastcgi_params.txt</code></p>
<p>修改nginx的設定檔</p>
<p><code># nano nginx.conf</code></p>
<blockquote><p>同學可參考nginx的<a href="http://wiki.codemongers.com/Main">英文wiki</a>或我的<a href="http://daufu.files.wordpress.com/2008/01/nginxconf.txt">設定檔</a></p></blockquote>
<p>修改完設定檔後，nginx便要重新讀取設定檔</p>
<p><code># kill -HUP 'cat /var/run/nginx.pid'</code></p>
<blockquote><p>nginx的一個特色是重啟並不需要先關閉伺服器，所以訪客的連線是不會中斷的。而將來nginx出了新版也可以用同樣的方法升級。</p></blockquote>
<p>參考資料：</p>
<ul>
<li><a href="http://blog.codefront.net/2007/06/11/nginx-php-and-a-php-fastcgi-daemon-init-script/">Nginx, PHP and a PHP FastCGI daemon init script</a></li>
<li><a href="http://blog.zhekov.net/2007/8/15/nginx-php-fastcgi/">Bloggitation: NginX, PHP, FastCGI</a></li>
</ul>
<p>Technorati Tags: <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a>, <a href="http://technorati.com/tags/nginx" rel="tag">nginx</a>, <a href="http://technorati.com/tags/PHP" rel="tag">PHP</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=28&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2008/01/14/nginx-php-fastcgi%ef%bc%9a%e8%bc%95%e5%9e%8b%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>另一個BitTorrent程式：Transmission + Clutch</title>
		<link>http://daufu.wordpress.com/2008/01/07/%e5%8f%a6%e4%b8%80%e5%80%8bbittorrent%e7%a8%8b%e5%bc%8f%ef%bc%9atransmission-clutch/</link>
		<comments>http://daufu.wordpress.com/2008/01/07/%e5%8f%a6%e4%b8%80%e5%80%8bbittorrent%e7%a8%8b%e5%bc%8f%ef%bc%9atransmission-clutch/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 11:12:47 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[P2P]]></category>
		<category><![CDATA[p2p transmission clutch bittorrent]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2008/01/07/%e5%8f%a6%e4%b8%80%e5%80%8bbittorrent%e7%a8%8b%e5%bc%8f%ef%bc%9atransmission-clutch/</guid>
		<description><![CDATA[Transmission原本是一個Mac OS X的BitTorrent程式，但它同時支援了Linux和不用compile GUI，所以也適合在玄箱裏使用。而Clutch則是個基於PHP的Transmission網頁介面，但它開發了不久，所以功能也不算齊備，暫時只有簡單的選項和Torrent管理。 安裝Transmission的必要套件 # aptitude install libgetopt++-dev intltool libssl-dev 安裝Clutch的必要套件 # aptitude install php5-json 轉到/usr/src目錄 # cd /usr/src 到Transmission官網下載源程式碼 # wget http://download.m0k.org/transmission/files/transmission-1.00.tar.bz2 解壓縮檔案 # tar jxvf transmission-1.00.tar.bz2 轉到目錄下 # cd transmission-1.00 Compile並安裝程式 # ./configure --disable-gtk# make# make install 然後切換到網頁伺服器的使用者，以下假設為www-data # su www-data 啟動transmission-daemon # transmission-daemon 然後轉到網頁伺服器的根目錄並到Clutch官網下載源程式碼〈下載WebUI Source (Other)版本〉 # wget http://www.clutchbt.com/Files/Clutch-0.2.tar.gz 解壓縮檔案 # [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=26&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Transmission原本是一個Mac OS X的BitTorrent程式，但它同時支援了Linux和不用compile GUI，所以也適合在玄箱裏使用。而Clutch則是個基於PHP的Transmission網頁介面，但它開發了不久，所以功能也不算齊備，暫時只有簡單的選項和Torrent管理。</p>
<p>安裝Transmission的必要套件</p>
<p><code># aptitude install libgetopt++-dev intltool libssl-dev</code></p>
<p>安裝Clutch的必要套件</p>
<p><code># aptitude install php5-json</code></p>
<p>轉到<em>/usr/src</em>目錄</p>
<p><code># cd /usr/src</code></p>
<p>到<a href="http://www.transmissionbt.com/">Transmission官網</a>下載源程式碼</p>
<p><code># wget http://download.m0k.org/transmission/files/transmission-1.00.tar.bz2</code></p>
<p>解壓縮檔案</p>
<p><code># tar jxvf transmission-1.00.tar.bz2</code></p>
<p>轉到目錄下</p>
<p><code># cd transmission-1.00</code></p>
<p>Compile並安裝程式</p>
<p><code># ./configure --disable-gtk<br /># make<br /># make install</code></p>
<p>然後切換到網頁伺服器的使用者，以下假設為<em>www-data</em></p>
<p><code># su www-data</code></p>
<p>啟動transmission-daemon</p>
<p><code># transmission-daemon</code></p>
<p>然後轉到網頁伺服器的根目錄並到<a href="http://www.clutchbt.com/">Clutch官網</a>下載源程式碼〈下載WebUI Source (Other)版本〉</p>
<p><code># wget http://www.clutchbt.com/Files/Clutch-0.2.tar.gz</code></p>
<p>解壓縮檔案</p>
<p><code># tar zxvf Clutch-0.2.tar.gz</code></p>
<p>刪除壓縮檔並更改目錄名稱</p>
<p><code># rm -f Clutch-0.2.tar.gz<br /># mv Clutch-0.2 clutch</code></p>
<p>修改目錄下/remote/data/socket.txt的內容為</p>
<p><code>/var/www/.transmission/daemon/socket</code></p>
<p>之後用瀏覽器開啟網頁便成功了。</p>
<blockquote><p>如果同學用Firefox 3，Clutch只會顯示Connection Failed的，這應該是Clutch的臭蟲。</p>
</blockquote>
<p>但要留意Clutch沒有密碼保護功能，所以同學有需要的話就要修改網頁伺服器的設定了。另外一點是transmission-daemon是不會跟着玄箱一起啟動的，要留意唷。</p>
<p>Technorati Tags: <a href="http://technorati.com/tags/BitTorrent" rel="tag">BitTorrent</a>, <a href="http://technorati.com/tags/BT" rel="tag">BT</a>, <a href="http://technorati.com/tags/Clutch" rel="tag">Clutch</a>, <a href="http://technorati.com/tags/P2P" rel="tag">P2P</a>, <a href="http://technorati.com/tags/Transmission" rel="tag">Transmission</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=26&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2008/01/07/%e5%8f%a6%e4%b8%80%e5%80%8bbittorrent%e7%a8%8b%e5%bc%8f%ef%bc%9atransmission-clutch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>MoBlock：Debian套件安裝</title>
		<link>http://daufu.wordpress.com/2008/01/07/moblock%ef%bc%9adebian%e5%a5%97%e4%bb%b6%e5%ae%89%e8%a3%9d/</link>
		<comments>http://daufu.wordpress.com/2008/01/07/moblock%ef%bc%9adebian%e5%a5%97%e4%bb%b6%e5%ae%89%e8%a3%9d/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 06:24:40 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[P2P]]></category>
		<category><![CDATA[Sylver]]></category>
		<category><![CDATA[安全]]></category>
		<category><![CDATA[p2p sylver]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2008/01/07/moblock%ef%bc%9adebian%e5%a5%97%e4%bb%b6%e5%ae%89%e8%a3%9d/</guid>
		<description><![CDATA[首先把moblock-deb的位置加入APT的source list # nano /etc/apt/sources.list 加入以下一行： deb-src http://moblock-deb.sourceforge.net/debian etch main 之後就加上作者的PGP鑰匙到APT的key ring # gpg --keyserver wwwkeys.eu.pgp.net --recv 9072870B # gpg --export --armor 9072870B &#124; sudo apt-key add - 轉到/usr/src目錄 # cd /usr/src 建立並轉到moblock目錄 # mkdir moblock # cd moblock 更新套件列表 # aptitude update 安裝必要的套件 # aptitude install fakeroot # apt-get build-dep moblock 下載moblock-deb的源程式碼 # apt-get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=25&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>首先把moblock-deb的位置加入APT的source list</p>
<p><code># nano /etc/apt/sources.list</code></p>
<p>加入以下一行：</p>
<p><code>deb-src http://moblock-deb.sourceforge.net/debian etch main</code></p>
<p>之後就加上作者的PGP鑰匙到APT的key ring</p>
<p><code># gpg --keyserver wwwkeys.eu.pgp.net --recv 9072870B<br />
# gpg --export --armor 9072870B | sudo apt-key add - </code></p>
<p>轉到<i>/usr/src</i>目錄</p>
<p><code># cd /usr/src</code></p>
<p>建立並轉到<i>moblock</i>目錄</p>
<p><code># mkdir moblock<br />
# cd moblock</code></p>
<p>更新套件列表</p>
<p><code># aptitude update</code></p>
<p>安裝必要的套件</p>
<p><code># aptitude install fakeroot<br />
# apt-get build-dep moblock</code></p>
<p>下載moblock-deb的源程式碼</p>
<p><code># apt-get source moblock</code></p>
<blockquote><p>在寫這篇文章的時候，作者把<b>不穩定</b>的RC版同時放到Stable Release中…如果同學遇到這個情況可到<a href="http://moblock-deb.sourceforge.net/debian/dists/etch/main/source/net/">官方網站</a>下載相關的<i>.diff.gz</i>、<i>.dsc</i>和<i>.orig.tar.gz</i>檔案</p>
<p><code># wget http://moblock-deb.sourceforge.net/debian/dists/etch/main/source/net/moblock_0.8-39+etch.diff.gz<br />
# wget http://moblock-deb.sourceforge.net/debian/dists/etch/main/source/net/moblock_0.8-39+etch.dsc<br />
# wget http://moblock-deb.sourceforge.net/debian/dists/etch/main/source/net/moblock_0.8.orig.tar.gz<br />
</code><br />
然後把它們解壓縮<br />
<code># dpkg-source -x moblock_0.8-39+etch.dsc</code></p></blockquote>
<p>轉到解壓縮後的目錄</p>
<p><code>cd moblock-0.8</code></p>
<p>compile為deb套件</p>
<p><code># dpkg-buildpackage -rfakeroot</code></p>
<p>之後在上一層目錄便可找到剛compile的deb檔案</p>
<p><code># cd ..<br />
# ls</code></p>
<p>最後便可以安裝</p>
<p><code># dpkg -i moblock-nfq_0.8-39+etch_powerpc.deb</code></p>
<p><font color="#ff0000">安裝完成後MoBlock會嘗試更新block list並啟動，但這很大機會把同學們一起擋掉，所以這時候<b>一定</b>要按<i>Ctrl + C</i>中止更新。</font></p>
<blockquote><p>如果停不了就要進入EM Mode來繼續了…</p></blockquote>
<p>修改設定檔</p>
<p><code># nano /etc/moblock/moblock.conf</code></p>
<p>如果想HTTP連接無阻的話，找到以下一行</p>
<p><code>WHITE_TCP_OUT=""</code></p>
<p>改為</p>
<p><code>WHITE_TCP_OUT="80 443"</code></p>
<p>如果你的IP地址是192.168.1.x，找到以下行</p>
<p><code>WHITE_IP_IN=""<br />
WHITE_IP_OUT=""</code></p>
<p>改為</p>
<p><code>WHITE_IP_IN="192.168.1.0/24"<br />
WHITE_IP_OUT="192.168.1.0/24"</code></p>
<p>儲存後便可更新MoBlock</p>
<p><code># moblock-control update</code></p>
<p>如果想知道MoBlock是否運行中可以用以下指令</p>
<p><code># moblock-control status</code></p>
<p>Technorati Tags: <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a>, <a href="http://technorati.com/tags/P2P" rel="tag">P2P</a>, <a href="http://technorati.com/tags/Kurobox" rel="tag">Kurobox</a>, <a href="http://technorati.com/tags/Security" rel="tag">Security</a>, <a href="http://technorati.com/tags/MoBlock" rel="tag">MoBlock</a>, <a href="http://technorati.com/tags/PeerGuardian" rel="tag">PeerGuardian</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=25&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2008/01/07/moblock%ef%bc%9adebian%e5%a5%97%e4%bb%b6%e5%ae%89%e8%a3%9d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>eAccelerator：PHP加速器</title>
		<link>http://daufu.wordpress.com/2007/06/23/eaccelerator%ef%bc%9aphp%e5%8a%a0%e9%80%9f%e5%99%a8/</link>
		<comments>http://daufu.wordpress.com/2007/06/23/eaccelerator%ef%bc%9aphp%e5%8a%a0%e9%80%9f%e5%99%a8/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 16:03:01 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[伺服器]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2007/06/23/eaccelerator%ef%bc%9aphp%e5%8a%a0%e9%80%9f%e5%99%a8/</guid>
		<description><![CDATA[安裝eAccelerator之前必須安裝php-dev、automake、autoconf、libtool和m4套件： # aptitude install php5-dev automake autoconf libtool m4 之後就需要網頁伺服器的使用者ID，假如網頁伺服器的使用者是www-data，可用以下指令查到它的UID： # grep www-data /etc/passwd www-data:x:33:33:www-data:/var/www:/bin/sh 其中第二個冒號後的數字就是UID，即33。 然後到官方網站下載eAccelerator： wget http://bart.eaccelerator.net/source/0.9.5.1/eaccelerator-0.9.5.1.tar.bz2 解壓後轉到目錄裏： # tar jvxf eaccelerator-0.9.5.1.tar.bz2 # cd eaccelerator-0.9.5.1 Compile eAccelerator： # phpize # ./configure ---with-eaccelerator-userid=33 # make 安裝： # make install 複製設定檔到/etc/php5/conf.d目錄： # cp eaccelerator.ini /etc/php5/conf.d 建立暫存目錄： # mkdir /var/cache/eaccelerator # chown www-data:www-data /var/cache/eaccelerator # chmod [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=22&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>安裝eAccelerator之前必須安裝php-dev、automake、autoconf、libtool和m4套件：</p>
<p><code># aptitude install php5-dev automake autoconf libtool m4</code></p>
<p>之後就需要網頁伺服器的使用者ID，假如網頁伺服器的使用者是www-data，可用以下指令查到它的UID：</p>
<p><code># grep www-data /etc/passwd<br />
www-data:x:33:33:www-data:/var/www:/bin/sh</code></p>
<p>其中第二個冒號後的數字就是UID，即33。</p>
<p>然後到<a href="http://eaccelerator.net/" title="PHP Accelerator, optimizer, dynamic content cache">官方網站</a>下載eAccelerator：</p>
<p><code>wget http://bart.eaccelerator.net/source/0.9.5.1/eaccelerator-0.9.5.1.tar.bz2</code></p>
<p>解壓後轉到目錄裏：</p>
<p><code># tar jvxf eaccelerator-0.9.5.1.tar.bz2<br />
# cd eaccelerator-0.9.5.1</code></p>
<p>Compile eAccelerator：</p>
<p><code># phpize<br />
# ./configure ---with-eaccelerator-userid=33<br />
# make</code></p>
<p>安裝：</p>
<p><code># make install</code></p>
<p>複製設定檔到/etc/php5/conf.d目錄：</p>
<p><code># cp eaccelerator.ini /etc/php5/conf.d</code></p>
<p>建立暫存目錄：</p>
<p><code># mkdir /var/cache/eaccelerator<br />
# chown www-data:www-data /var/cache/eaccelerator<br />
# chmod 0644 /var/cache/eaccelerator</code></p>
<p>修改設定檔，找到以下幾行：</p>
<p><code>;extension="eaccelerator.so"<br />
zend_extension="/usr/lib/php4/eaccelerator.so"</code></p>
<p><code>eaccelerator.cache_dir = "/tmp/eaccelerator"</code></p>
<p>修改為：</p>
<p><code>extension="eaccelerator.so"<br />
;zend_extension="/usr/lib/php4/eaccelerator.so"</code></p>
<p><code>eaccelerator.cache_dir = "/var/cache/eaccelerator"</code></p>
<p>如果同學想知道自己是否安裝成功，可以用<i>php-cgi -v</i>指令看看。如果顯示大約如下，那就表示PHP成功載入eAccelerator。</p>
<p><code>PHP 5.2.0-8+etch4 (cgi-fcgi) (built: May 13 2007 19:11:51)<br />
Copyright (c) 1997-2006 The PHP Group<br />
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies<br />
with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator</code></p>
<p>但如果想知道eAccelerator是不是真的運作中就進行以下步驟：</p>
<p>在網頁伺服器的目錄建立<i>info.php</i>檔案，內容如下：</p>
<p><code>&lt;?php<br />
phpinfo();<br />
?&gt;</code></p>
<p>並且將擁有者轉為<i>www-data</i>：</p>
<p><code># chown www-data:www-data info.php</code></p>
<p>和加上可執行權限：</p>
<p><code># chmod +x info.php</code></p>
<p>如果在網頁瀏覽器看見以下信息，同學便成功了！</p>
<p>This program makes use of the Zend Scripting Language Engine:<br />
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies<br />
with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator</p>
<p>如果看不見，就可能要「重新啟動」PHP，但由於在下技術低劣，所以只懂重新啟動Debian：</p>
<p><code># reboot</code></p>
<p>Technorati Tags: <a href="http://technorati.com/tags/eAccelerator" rel="tag">eAccelerator</a>, <a href="http://technorati.com/tags/PHP" rel="tag">PHP</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=22&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2007/06/23/eaccelerator%ef%bc%9aphp%e5%8a%a0%e9%80%9f%e5%99%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>網頁伺服器：lighttpd + PHP + Ruby on Rails + MySQL</title>
		<link>http://daufu.wordpress.com/2007/06/21/%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8%ef%bc%9alighttpd-php-ruby-on-rails-mysql/</link>
		<comments>http://daufu.wordpress.com/2007/06/21/%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8%ef%bc%9alighttpd-php-ruby-on-rails-mysql/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 13:19:33 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2007/06/21/%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8%ef%bc%9alighttpd-php-ruby-on-rails-mysql/</guid>
		<description><![CDATA[相比Apache的穩「重」，lighttpd是一個相當輕巧而且穩定的網頁伺服器。連維基百科和YouTube也有採用。 首先安裝MySQL及其相關的： # aptitude install mysql-server mysql-common mysql-client libmysqlclient15-dev mytop zlib1g-dev 過程中會問MySQL root使用者的密碼，這和Debian的root無關的。 想知道MySQL是否運作中，可以用以下的指令： # mysqladmin -u root -p ping Enter password: mysqld is alive 安裝PHP及其相關的： # aptitude install php5-cgi php5-dev php5-mysql 想知道有什麼PHP相關的套件可以安裝，可以到這裡。 安裝Ruby及其相關的： # aptitude install ruby1.8-dev ruby ri irb rdoc libreadline-ruby1.8 libruby1.8 rubygems libmysql-ruby1.8 安裝Rails： # gem install rails --include-dependencies 不用gem安裝的話，也可以用aptitude安裝： # aptitude [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=21&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>相比Apache的穩「重」，lighttpd是一個相當輕巧而且穩定的網頁伺服器。連維基百科和YouTube也有採用。</p>
<p>首先安裝MySQL及其相關的：</p>
<p><code># aptitude install mysql-server mysql-common mysql-client libmysqlclient15-dev mytop zlib1g-dev</code></p>
<blockquote><p>過程中會問MySQL root使用者的密碼，這和Debian的root無關的。</p></blockquote>
<p>想知道MySQL是否運作中，可以用以下的指令：</p>
<p><code># mysqladmin -u root -p ping<br />
Enter password:<br />
mysqld is alive </code></p>
<p>安裝PHP及其相關的：</p>
<p><code># aptitude install php5-cgi php5-dev php5-mysql</code></p>
<blockquote><p>想知道有什麼PHP相關的套件可以安裝，可以到<a href="http://packages.debian.org/cgi-bin/search_packages.pl?suite=stable&amp;subword=1&amp;exact=&amp;arch=any&amp;section=all&amp;case=insensitive&amp;keywords=php&amp;searchon=names&amp;page=1&amp;number=all">這裡</a>。</p></blockquote>
<p>安裝Ruby及其相關的：</p>
<p><code># aptitude install ruby1.8-dev ruby ri irb rdoc libreadline-ruby1.8 libruby1.8 rubygems libmysql-ruby1.8</code></p>
<p>安裝Rails：</p>
<p><code># gem install rails --include-dependencies</code></p>
<blockquote><p>不用<em>gem</em>安裝的話，也可以用<em>aptitude</em>安裝：</p>
<p><code># aptitude install rails</code></p>
<p>但這樣就裝不了最新版囉！</p></blockquote>
<p>安裝lighttpd：</p>
<p><code># aptitude install lighttpd lighttpd-mod-magnet lighttpd-mod-mysql-vhost lighttpd-mod-trigger-b4-dl lighttpd-mod-webdav</code></p>
<p>啟用FastCGI：</p>
<p><code># lighty-enable-mod fastcgi</code></p>
<p>如果同學使用PHP5的話，就要修改<em>/etc/lighttpd/conf-available/10-fastcgi.conf</em>，把以下一行：</p>
<p><font face="Courier New">&#8220;bin-path&#8221; =&gt; &#8220;/usr/bin/php4-cgi&#8221;,</font></p>
<p>修改為：</p>
<p><font face="Courier New">&#8220;bin-path&#8221; =&gt; &#8220;/usr/bin/php5-cgi&#8221;,</font></p>
<p>或：</p>
<p><font face="Courier New">&#8220;bin-path&#8221; =&gt; &#8220;/usr/bin/php-cgi&#8221;,</font></p>
<p><code></code></p>
<p>修改<em>/etc/lighttpd/lighttpd.conf</em>設定檔：</p>
<ul>
<li>server.modules列出與lighttpd同時啟動的模組，如果想啟動某個模組，只要把前面的#號刪除便可。</li>
<li>server.document-root指出了儲存網頁的目錄。</li>
<li>server.username和server.groupname分別是lighttpd所用的使用者身份。</li>
<li>詳細的設定可參考<a href="http://trac.lighttpd.net/trac/wiki">這裡</a>。</li>
</ul>
<p><code></code></p>
<p>重新啟動lighttpd：</p>
<p><code># /etc/init.d/lighttpd restart</code></p>
<p>Technorati Tags: <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a>, <a href="http://technorati.com/tags/lighttpd" rel="tag">lighttpd</a>, <a href="http://technorati.com/tags/PHP" rel="tag">PHP</a>, <a href="http://technorati.com/tags/Ruby" rel="tag">Ruby</a>, <a href="http://technorati.com/tags/Ruby%20on%20Rails" rel="tag">Ruby on Rails</a>, <a href="http://technorati.com/tags/RoR" rel="tag">RoR</a>, <a href="http://technorati.com/tags/MySQL" rel="tag">MySQL</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=21&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2007/06/21/%e7%b6%b2%e9%a0%81%e4%bc%ba%e6%9c%8d%e5%99%a8%ef%bc%9alighttpd-php-ruby-on-rails-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>MLDonkey: BitTorrent + eMule + &#8230;</title>
		<link>http://daufu.wordpress.com/2007/06/16/mldonkey-bittorrent-emule/</link>
		<comments>http://daufu.wordpress.com/2007/06/16/mldonkey-bittorrent-emule/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 11:04:53 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[P2P]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2007/06/16/mldonkey-bittorrent-emule/</guid>
		<description><![CDATA[MLDonkey是一個支援多個P2P網絡的軟件，而且內置了網頁介面，同學平日使用也會很方便。 安裝： # aptitude install mldonkey-server 安裝過程中會問到以下的問題： 是否在開機時啟動MLDonkey MLDonkey運作時的目錄 最高下載速度 最高上載速度 管理員密碼 之後MLDonkey就會啟動。每次MLDonkey啟動都會自動從網上下載資料，所同學請等一會，如果想知道MLDonkey正在做什麼，可以查看系統記錄檔：/var/log/syslog。 然後在步驟2的目錄裏會找到個叫downloads.ini的檔案，那就是MLDonkey的設定檔。由於所有設定都可以在網頁介面進行，平常是不用修改這檔案的。但MLDonkey預設網頁介面只能從玄箱自己進入，所以同學要把自己的IP地址加入allowed_ips裏，如： allowed_ips = [ "127.0.0.1"; "192.168.1.0/24";] 如果是一個網段，同學可在這個網站找到適合的表示法。 設定完成後重新啟動MLDonkey： # /etc/init.d/mldonkey-server restart 在網頁瀏覽器輸入玄箱IP地址:4080，如：192.168.1.100:4080就可以進入網頁介面。 如果同學不能安裝MoBlock，MLDonkey也提供IP阻擋功能的。每次MLDonkey啟動時都會下載Options/Web infos裏指定的檔案到web_infos目錄。之後在Options/Net/ip_blocking填上該檔案，如：web_infos/level1.gz便可。 Technorati Tags: BitTorrent, BT, Debian, P2P, MLDonkey<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=20&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>MLDonkey是一個支援多個P2P網絡的軟件，而且內置了網頁介面，同學平日使用也會很方便。</p>
<p>安裝：</p>
<p><code># aptitude install mldonkey-server</code></p>
<p>安裝過程中會問到以下的問題：</p>
<ol>
<li>是否在開機時啟動MLDonkey
<li>MLDonkey運作時的目錄
<li>最高下載速度
<li>最高上載速度
<li>管理員密碼</li>
</ol>
<p>之後MLDonkey就會啟動。每次MLDonkey啟動都會自動從網上下載資料，所同學請等一會，如果想知道MLDonkey正在做什麼，可以查看系統記錄檔：<em>/var/log/syslog</em>。</p>
<p>然後在步驟2的目錄裏會找到個叫downloads.ini的檔案，那就是MLDonkey的設定檔。由於所有設定都可以在網頁介面進行，平常是不用修改這檔案的。但MLDonkey預設網頁介面只能從玄箱自己進入，所以同學要把自己的IP地址加入allowed_ips裏，如：</p>
<p><code>allowed_ips = [<br /> "127.0.0.1";<br /> "192.168.1.0/24";]</code></p>
<p>如果是一個網段，同學可在這個<a title="Online IP Subnet Calculator" href="http://www.subnet-calculator.com/">網站</a>找到適合的表示法。</p>
<p>設定完成後重新啟動MLDonkey：</p>
<p><code># /etc/init.d/mldonkey-server restart</code></p>
<p>在網頁瀏覽器輸入<em>玄箱IP地址:4080</em>，如：<em>192.168.1.100:4080</em>就可以進入網頁介面。</p>
<p>如果同學不能安裝<a title="MoBlock：Linux的PeerGuardian &laquo; 豆腐！" href="http://daufu.wordpress.com/2007/06/13/moblock%ef%bc%9alinux%e7%9a%84peerguardian/">MoBlock</a>，MLDonkey也提供IP阻擋功能的。每次MLDonkey啟動時都會下載<em>Options/Web infos</em>裏指定的檔案到<em>web_infos</em>目錄。之後在<em>Options/Net/ip_blocking</em>填上該檔案，如：<em>web_infos/level1.gz</em>便可。</p>
<p>Technorati Tags: <a href="http://technorati.com/tags/BitTorrent" rel="tag">BitTorrent</a>, <a href="http://technorati.com/tags/BT" rel="tag">BT</a>, <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a>, <a href="http://technorati.com/tags/P2P" rel="tag">P2P</a>, <a href="http://technorati.com/tags/MLDonkey" rel="tag">MLDonkey</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=20&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2007/06/16/mldonkey-bittorrent-emule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>Sylver準備的Debian：安裝後記</title>
		<link>http://daufu.wordpress.com/2007/06/15/sylver%e6%ba%96%e5%82%99%e7%9a%84debian%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a8%98/</link>
		<comments>http://daufu.wordpress.com/2007/06/15/sylver%e6%ba%96%e5%82%99%e7%9a%84debian%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a8%98/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 13:37:38 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[玄箱]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Sylver]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2007/06/15/sylver%e6%ba%96%e5%82%99%e7%9a%84debian%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a8%98/</guid>
		<description><![CDATA[avr_evtd Sylver準備的Debian用了avr_evtd代替了原本的kuroevtd去管理玄箱的按鈕，但附設的是舊版，所以安裝Debian後最好安裝新版。 首先到官方網站下載最新版到/目錄： # cd / # wget http://downloads.sourceforge.net/ppc-evtd/avr_evtd_1.7.2.release.tar.gz 解壓縮後檔案會放到/usr/src目錄： # tar zxvf avr_evtd_1.7.2.release.tar.gz # cd /usr/src/avr_evtd 由於需要compile程式，同學要先安裝make、gcc、g++等套件： # aptitude install make gcc g++ 安裝avr_evtd： # make install avr_evtd 修改設定： # nano /etc/default/avr_evtd 如果需要EM Mode，把以下一行： EMMODE=NO 改為： EMMODE=YES 同學如果需要進入EM Mode，只需按RESET鍵20餘秒，玄箱就會自動重新啟動進入EM Mode。 另預設的設定會在每日1:15到6:20關機，如果不需要，把以下一行： TIMER=ON 改為： TIMER=OFF 修改完成後就重新啟動avr_evtd： # /etc/init.d/avr_evtd restart 其實新avr_evtd還有附帶效果的：從此電源燈不論玄箱是否處於關機狀態都會漸亮漸滅的… （更新：似乎只要關掉TIMER就沒有這問題效果） XFS檔案系統 XFS是由SGI開發的檔案系統，網絡上有不少報告顯示它的效能比EXT3好，同學不妨把用作儲存檔案的分割區轉為XFS檔案系統。 注意：核心需要是Debian-sarge-2.6.18-mh4_kurobox_hg-20061010或之後的版本。 注意：分割區上的資料將被刪除。 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=19&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>avr_evtd</h3>
<p>Sylver準備的Debian用了<i>avr_evtd</i>代替了原本的<i>kuroevtd</i>去管理玄箱的按鈕，但附設的是舊版，所以安裝Debian後最好安裝新版。</p>
<p>首先到<a href="https://sourceforge.net/projects/ppc-evtd/" title="SourceForge.net: ppc-evtd">官方網站</a>下載最新版到<i>/</i>目錄：</p>
<p><code># cd /<br />
# wget http://downloads.sourceforge.net/ppc-evtd/avr_evtd_1.7.2.release.tar.gz</code></p>
<p>解壓縮後檔案會放到<i>/usr/src</i>目錄：</p>
<p><code># tar zxvf avr_evtd_1.7.2.release.tar.gz</code></p>
<p><code># cd /usr/src/avr_evtd</code></p>
<p>由於需要compile程式，同學要先安裝<i>make</i>、<i>gcc</i>、<i>g++</i>等套件：</p>
<p><code># aptitude install make gcc g++</code></p>
<p>安裝<i>avr_evtd</i>：</p>
<p><code># make install avr_evtd</code></p>
<p>修改設定：</p>
<p><code># nano /etc/default/avr_evtd</code></p>
<p>如果需要EM Mode，把以下一行：</p>
<p><code>EMMODE=NO</code></p>
<p>改為：</p>
<p><code>EMMODE=YES</code></p>
<p>同學如果需要進入EM Mode，只需按RESET鍵20餘秒，玄箱就會自動重新啟動進入EM Mode。</p>
<p>另預設的設定會在每日1:15到6:20關機，如果不需要，把以下一行：</p>
<p><code>TIMER=ON</code></p>
<p>改為：</p>
<p><code>TIMER=OFF</code></p>
<p>修改完成後就重新啟動<i>avr_evtd</i>：</p>
<p><code># /etc/init.d/avr_evtd restart</code></p>
<p>其實新<i>avr_evtd</i>還有附帶效果的：從此電源燈不論玄箱是否處於關機狀態都會漸亮漸滅的… （更新：似乎只要關掉TIMER就沒有這<strike>問題</strike>效果）</p>
<h3>XFS檔案系統</h3>
<p><a href="http://oss.sgi.com/projects/xfs/" title="SGI - Developer Central Open Source | XFS">XFS</a>是由SGI開發的檔案系統，網絡上有不少報告顯示它的效能比EXT3好，同學不妨把用作儲存檔案的分割區轉為XFS檔案系統。</p>
<blockquote><p><b>注意</b>：核心需要是Debian-sarge-2.6.18-mh4_kurobox_hg-20061010或之後的版本。</p>
<p><b>注意</b>：分割區上的資料將被刪除。</p></blockquote>
<p>首先安裝XFS的維護軟件：</p>
<p><code># aptitude install xfsprogs xfsdump</code></p>
<p>然後卸載分割區，假設分割區為<i>/dev/hda3</i>：</p>
<p><code># umount /dev/hda3</code></p>
<p>重新格式化硬碟：</p>
<p><code># mkfs.xfs -f /dev/hda3</code></p>
<p>重新掛載硬碟，假設要掛載到<i>/mnt</i>目錄：</p>
<p><code># mount -t xfs /dev/hda3 /mnt</code></p>
<p>如果沒有問題就修改<i>/etc/fstab</i>：</p>
<p><code># nano /etc/fstab</code></p>
<p>找到關於<i>/dev/hda3</i>的一行，修改<i>ext3</i>為<i>xfs</i>：</p>
<p><code>/dev/hda3 /mnt xfs defaults 1 2</code></p>
<p>Technorati Tags: <a href="http://technorati.com/tags/Kurobox" rel="tag">Kurobox</a>, <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a>, <a href="http://technorati.com/tags/Sylver" rel="tag">Sylver</a>, <a href="http://technorati.com/tags/XFS" rel="tag">XFS</a>, <a href="http://technorati.com/tags/avr_evtd" rel="tag">avr_evtd</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=19&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2007/06/15/sylver%e6%ba%96%e5%82%99%e7%9a%84debian%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a8%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>MoBlock：Linux的PeerGuardian</title>
		<link>http://daufu.wordpress.com/2007/06/13/moblock%ef%bc%9alinux%e7%9a%84peerguardian/</link>
		<comments>http://daufu.wordpress.com/2007/06/13/moblock%ef%bc%9alinux%e7%9a%84peerguardian/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 08:51:37 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[玄箱]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[P2P]]></category>
		<category><![CDATA[Sylver]]></category>
		<category><![CDATA[安全]]></category>
		<category><![CDATA[p2p sylver]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2007/06/13/moblock%ef%bc%9alinux%e7%9a%84peerguardian/</guid>
		<description><![CDATA[PeerGuardian的作用是從網上下載列有anti-P2P、駭客、政府機構等IP的列表，並封鎖它們的連線。而MoBlock則是PeerGuardian的官方Linux版本。 由於MoBlock需要iptables，玄箱的Debian核心必須使用Sylver老師的新版核心。使用Genbako老師系統的同學是用不了的。 注意：以下的安裝步驟請參考新的文章。 注意：以下方法只是我試出來的，並「好像」在我的玄箱成功運作而已。 首先安裝wget、unzip、libnfnetlink-dev及libnetfilter-queue-dev套件： # aptitude install wget unzip libnfnetlink-dev libnetfilter-queue-dev 到moblock-deb下載準備給i386機使用的套件檔案： # wget http://moblock-deb.sourceforge.net/debian/dists/unstable/main/binary-i386/net/moblock-nfq_0.8-15_i386.deb 由於玄箱的CPU是PowerPC，同學要用&#8211;force-architecture參數安裝： # dpkg --force-architecture -i moblock-nfq_0.8-15_i386.deb 安裝過程中，它會自動下載最新的封鎖列表，然後啟動MoBlock Reloading moblock: moblock.Starting moblock: moblock. 但由於CPU不同，MoBlock其實並沒有運作，所以同學要自行compile一個MoBlock。 如果同學不想compile，我也上載了我compile完那個moblock，同學可以直接下載到/usr/bin目錄，並執行： # chmod 775 moblock 到MoBlock下載source code： # cd /usr/src# wget http://download.berlios.de/moblock/MoBlock-0.8-i586.tar.bz2 一般習慣是把source code放到/usr/src目錄的。 之後便解開： # tar jxvf MoBlock-0.8-i586.tar.bz2# cd MoBlock-0.8 Compile前需先修改Makefile： nano Makefile 找到以下句： CFLAGS=-Wall [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=18&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>PeerGuardian的作用是從網上下載列有anti-P2P、駭客、政府機構等IP的列表，並封鎖它們的連線。而MoBlock則是PeerGuardian的官方Linux版本。</p>
<blockquote><p>由於MoBlock需要iptables，玄箱的Debian核心必須使用<a href="http://www.kurobox.com/mwiki/index.php/Debian_sylver">Sylver</a>老師的新版核心。使用<a href="http://genbako.vodapone.com/">Genbako</a>老師系統的同學是用不了的。</p>
</blockquote>
<p><strong><font color="#ff0000">注意</font></strong>：以下的安裝步驟請參考新的<a href="http://daufu.wordpress.com/2008/01/07/moblock%ef%bc%9adebian%e5%a5%97%e4%bb%b6%e5%ae%89%e8%a3%9d/">文章</a>。</p>
<blockquote><p><strong><font color="#ff0000">注意</font></strong>：以下方法只是我試出來的，並「好像」在我的玄箱成功運作而已。</p>
</blockquote>
<p>首先安裝<em>wget</em>、<em>unzip</em>、<em>libnfnetlink-dev</em>及<em>libnetfilter-queue-dev</em>套件：</p>
<p><code># aptitude install wget unzip libnfnetlink-dev libnetfilter-queue-dev</code></p>
<p>到<a title="moblock-deb: debian packages for moblock and peerguardnf" href="http://moblock-deb.sourceforge.net/">moblock-deb</a>下載準備給i386機使用的套件檔案：</p>
<p><code># wget http://moblock-deb.sourceforge.net/debian/dists/unstable/main/binary-i386/net/moblock-nfq_0.8-15_i386.deb</code></p>
<p>由於玄箱的CPU是PowerPC，同學要用&#8211;force-architecture參數安裝：</p>
<p><code># dpkg --force-architecture -i moblock-nfq_0.8-15_i386.deb</code></p>
<p>安裝過程中，它會自動下載最新的封鎖列表，然後啟動MoBlock</p>
<p><code>Reloading moblock: moblock.<br />Starting moblock: moblock.</code></p>
<p>但由於CPU不同，MoBlock其實並沒有運作，所以同學要自行compile一個MoBlock。</p>
<blockquote><p>如果同學不想compile，我也上載了我compile完那個moblock，同學可以直接<a href="http://www.box.net/shared/15grhxhspe">下載</a>到/usr/bin目錄，並執行：</p>
<p><code># chmod 775 moblock</code></p>
</blockquote>
<p>到<a title="MoBlock Homepage" href="http://moblock.berlios.de/">MoBlock</a>下載source code：</p>
<p><code># cd /usr/src<br /># wget http://download.berlios.de/moblock/MoBlock-0.8-i586.tar.bz2 </code></p>
<blockquote><p>一般習慣是把source code放到<em>/usr/src</em>目錄的。</p>
</blockquote>
<p>之後便解開：</p>
<p><code># tar jxvf MoBlock-0.8-i586.tar.bz2<br /># cd MoBlock-0.8</code></p>
<p>Compile前需先修改<em>Makefile</em>：</p>
<p><code>nano Makefile</code></p>
<p>找到以下句：</p>
<p><code>CFLAGS=-Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \</code></p>
<p>修改成：</p>
<p><code>CFLAGS=-Wall -O2 -fomit-frame-pointer -ffast-math \</code></p>
<p>跟着compile和安裝：</p>
<p><code># make<br /># make install</code></p>
<p>最後便可以重新啟動MoBlock：</p>
<p><code>/etc/init.d/moblock-nfq start</code></p>
<p>這樣玄箱每日都會自動更新封鎖列表！</p>
<p>Technorati Tags: <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a>, <a href="http://technorati.com/tags/P2P" rel="tag">P2P</a>, <a href="http://technorati.com/tags/Kurobox" rel="tag">Kurobox</a>, <a href="http://technorati.com/tags/Security" rel="tag">Security</a>, <a href="http://technorati.com/tags/MoBlock" rel="tag">MoBlock</a>, <a href="http://technorati.com/tags/PeerGuardian" rel="tag">PeerGuardian</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=18&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2007/06/13/moblock%ef%bc%9alinux%e7%9a%84peerguardian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
		<item>
		<title>實用小工具</title>
		<link>http://daufu.wordpress.com/2007/06/12/%e5%af%a6%e7%94%a8%e5%b0%8f%e5%b7%a5%e5%85%b7/</link>
		<comments>http://daufu.wordpress.com/2007/06/12/%e5%af%a6%e7%94%a8%e5%b0%8f%e5%b7%a5%e5%85%b7/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 06:46:41 +0000</pubDate>
		<dc:creator>Den</dc:creator>
				<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://daufu.wordpress.com/2007/06/12/%e5%af%a6%e7%94%a8%e5%b0%8f%e5%b7%a5%e5%85%b7/</guid>
		<description><![CDATA[如果只讀讀檔案的內容，而不用修改？可以用less。 # aptitude install less# less file 讓一般帳號擁有root權限？可以用sudo。 # aptitude install sudo 安裝後便可修改設定： # visudo 假設同學要帳號abc擁有root權限，就加入這行： abc ALL=(ALL) ALL 意義為： 使用者帳號 登入的主機 = (可以變換的身份) 可以使用的指令 在玄箱裏下載檔案？可以用wget。 # aptitude install wget# wget http://file.link 優化硬碟？可以用hdparm。 # aptitude install hdparm 之後打開/etc/hdparm.conf並找到這段： #/dev/hda {#mult_sect_io = 16#write_cache = off#dma = on#} 移除前面的#號，並加入 spindown_time = 120 即 /dev/hda {mult_sect_io = 16write_cache [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=17&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>如果只讀讀檔案的內容，而不用修改？可以用<em>less</em>。</h3>
<p><code># aptitude install less<br /># less file</code></p>
<h3>讓一般帳號擁有<em>root</em>權限？可以用<em>sudo</em>。</h3>
<p><code># aptitude install sudo</code></p>
<p>安裝後便可修改設定：</p>
<p><code># visudo</code></p>
<p>假設同學要帳號abc擁有<em>root</em>權限，就加入這行：</p>
<p><code>abc ALL=(ALL) ALL</code></p>
<p>意義為：</p>
<p>使用者帳號 登入的主機 = (可以變換的身份) 可以使用的指令</p>
<h3>在玄箱裏下載檔案？可以用<em>wget</em>。</h3>
<p><code># aptitude install wget<br /># wget http://file.link</code></p>
<h3>優化硬碟？可以用<em>hdparm</em>。</h3>
<p><code># aptitude install hdparm</code></p>
<p>之後打開/etc/hdparm.conf並找到這段：</p>
<p><code>#/dev/hda {<br />#mult_sect_io = 16<br />#write_cache = off<br />#dma = on<br />#}</code></p>
<p>移除前面的#號，並加入</p>
<p><code>spindown_time = 120</code></p>
<p>即</p>
<p><code>/dev/hda {<br />mult_sect_io = 16<br />write_cache = off<br />dma = on<br />spindown_time = 120<br />}</code></p>
<p>其中spindown_time的意思是：硬碟在多少時間裏沒有資料寫入便停下，單位是5秒。例如120就是10分鐘。</p>
<p>詳細的設定請到<a title="Debian hdd spindown" href="http://www.kurobox.com/mwiki/index.php/Debian_hdd_spindown">這裡</a>。</p>
<h3>需要compile程式？用<em>make</em>、<em>gcc</em>和<em>g++</em>吧！</h3>
<p><code># aptitude install make gcc g++</code></p>
<h3>解壓縮.bz2檔案？可以用<em>bzip2</em>。</h3>
<p><code># aptitude install bzip2<br /># tar jxvf file.bz2</code></p>
<p>Technorati Tag: <a href="http://technorati.com/tags/Debian" rel="tag">Debian</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/daufu.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/daufu.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/daufu.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/daufu.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/daufu.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/daufu.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/daufu.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/daufu.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/daufu.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/daufu.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daufu.wordpress.com&amp;blog=814128&amp;post=17&amp;subd=daufu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daufu.wordpress.com/2007/06/12/%e5%af%a6%e7%94%a8%e5%b0%8f%e5%b7%a5%e5%85%b7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dc69484b4cd1e1f417580df1790383fa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Den</media:title>
		</media:content>
	</item>
	</channel>
</rss>
