<?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; Debian Linux</title>
	<atom:link href="http://www.redmaple.idv.tw/index.php/archives/category/debian-linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.redmaple.idv.tw</link>
	<description>- 在這複雜世界，透過鏡頭找尋並紀錄單純的感動 - by 紅楓 　http://www.redmaple.idv.tw</description>
	<lastBuildDate>Sat, 21 Jan 2012 16:54:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>很好！WordPress plugin &#8211; FireStatus資料表掛了一個..</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/516</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/516#comments</comments>
		<pubDate>Mon, 05 Jan 2009 15:00:58 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.redmaple.idv.tw/?p=516</guid>
		<description><![CDATA[話說今天伺服器主機當機，重開電腦 非常好~~ FireStats error : Database error: Table &#8216;./wordpress/wp_firestats_pending_data&#8217; is marked as crashed and should be repaired 紅的 FireStats 就看不到資料啦！！ 翻開書，來開始修理資料表吧&#8230; #mysql -u root -p 在Debian 的文字模式下輸入指令以root身份來登入Mysql，並輸入密碼進入Mysql中 Enter password: mysql&#62;SHOW DATABASES; 顯示目前db 中有幾個資料庫 +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ &#124; Database               &#124; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ &#124; mysql                     &#124; &#124; wordpress            [...]]]></description>
			<content:encoded><![CDATA[<p>話說今天伺服器主機當機，重開電腦</p>
<p>非常好~~</p>
<h2><strong><span style="color: #ff0000;">FireStats error : Database error: Table &#8216;./wordpress/wp_firestats_pending_data&#8217; is marked as crashed and should be repaired</span></strong></h2>
<p>紅的 FireStats 就看不到資料啦！！</p>
<p>翻開書，來開始修理資料表吧&#8230;</p>
<p><span id="more-516"></span> #<span style="color: #0000ff;"><strong>mysql -u root -p</strong></span></p>
<p>在Debian 的文字模式下輸入指令以root身份來登入Mysql，並輸入密碼進入Mysql中<span style="color: #0000ff;"><strong><br />
</strong></span></p>
<p>Enter password:</p>
<p>mysql&gt;<span style="color: #0000ff;"><strong>SHOW DATABASES;</strong></span></p>
<p>顯示目前db 中有幾個資料庫<span style="color: #0000ff;"><strong><br />
</strong></span></p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Database               |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| mysql                     |<br />
| wordpress            |　　　&lt;&#8212;-就是你啦<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</p>
<p>mysql&gt;<span style="color: #0000ff;"><strong>USE wordpress;</strong></span></p>
<p>進入 wordpress 資料庫</p>
<p><span style="color: #0000ff;"><strong><br />
</strong></span></p>
<p>mysql&gt;<span style="color: #0000ff;"><strong>SHOW TABLES;</strong></span></p>
<p>列出這個資料庫中的資料庫，這時就可以看到Wordpress中有多少個資料表了</p>
<p>其實是已經知道wp_firestats_pending_data資料表掛了，所以也可以直接輸入以下的指令去檢查資料表</p>
<p>mysql&gt;<span style="color: #0000ff;"><strong>CHECK TABLE  wp_firestats_pending_data;</strong></span><br />
| wordpress.wp_firestats_pending_data | check | error    | Table &#8216;./wordpress/wp_firestats_pending_data&#8217; is marked as crashed and should be repaired |</p>
<p>1 row in set (0.02 sec)</p>
<p>嗯～～真的有問題必須處理，所以就來修覆一下；REPAIR TABLE的參數有四個，紅只使用QUICK就把問題排除啦～～</p>
<p>mysql&gt; <span style="color: #0000ff;"><strong>REPAIR TABLE  wp_firestats_pending_data QUICK;</strong></span></p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| wordpress.wp_firestats_pending_data | repair | warning  | Number of rows changed from 1 to 10 |<br />
| wordpress.wp_firestats_pending_data | repair | status   | OK                                  |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
2 rows in set (0.07 sec)</p>
<p>mysql&gt;</p>
<p>修復完成，收工！紅的FireStatus plugin 復活啦～～</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/516/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修復Windows重灌之後 GRUB 被清除的問題</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/261</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/261#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:53:21 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[GRUB]]></category>

		<guid isPermaLink="false">http://www.redmaple.idv.tw/index.php/archives/261</guid>
		<description><![CDATA[其實這篇在很久以前就要寫了~~但一直忘記 今天再度遇到就寫下吧 首先，要先來個工具，就是 Linux Live CD 1.先去下載一個 Live CD 來當作我們下指令的平台 我是下載 中文knoppix團隊那兒製作的 B2DpureKGB，簡單好用，推薦一下 不管是windows的系統掛點時的資料救援、或是Linux系統的boot loader修復，我都是使用這個工具來幫忙 這工具實在太好用了 2.用 Live CD 開完機後，開啟一個命令視窗，將  Linux  root directory（根目錄）掛載起來（假設為hda6） #mount　/mnt/hda6 #為何可以直接掛呢？因為live CD在開機時有幫使用者搜尋過硬碟切割區，把資料寫到 fstab中了，所以我們才可以直接打 mount  +  目錄　的方式來掛載 3. 將GRUB寫入 #/usr/sbin/grub-install　&#8211;root-directory=/mnt/hda6　/dev/hda #上行指令的意思為設定 linux root directory 為 hda6, 將GRUB 寫在 hda 這個device上 4.收工 整個步驟沒很難 但不知道時就是會永遠試不出來～心中充滿無限的"看（斜音）"]]></description>
			<content:encoded><![CDATA[<p>其實這篇在很久以前就要寫了~~但一直忘記</p>
<p>今天再度遇到就寫下吧</p>
<p>首先，要先來個工具，就是 Linux Live CD</p>
<p><span id="more-261"></span>1.先去下載一個 Live CD 來當作我們下指令的平台</p>
<p>我是下載 中文knoppix團隊那兒製作的 B2DpureKGB，簡單好用，推薦一下</p>
<p>不管是windows的系統掛點時的資料救援、或是Linux系統的boot loader修復，我都是使用這個工具來幫忙</p>
<p>這工具實在太好用了</p>
<p>2.用 Live CD 開完機後，開啟一個命令視窗，將  Linux  root directory（根目錄）掛載起來（假設為hda6）</p>
<p>#<strong>mount　/mnt/hda6</strong></p>
<p>#為何可以直接掛呢？因為live CD在開機時有幫使用者搜尋過硬碟切割區，把資料寫到 fstab中了，所以我們才可以直接打 mount  +  目錄　的方式來掛載</p>
<p>3. 將GRUB寫入</p>
<p>#<strong>/usr/sbin/grub-install　&#8211;root-directory=<font color="#0000ff">/mnt/hda6</font>　</strong><font color="#ff0000"><strong>/dev/hda</strong> </font></p>
<p>#上行指令的意思為設定 linux root directory 為 hda6, 將GRUB 寫在 hda 這個device上</p>
<p>4.收工</p>
<p>整個步驟沒很難</p>
<p>但不知道時就是會永遠試不出來～心中充滿無限的"看（斜音）"</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/261/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install adobe flash player into Firefox on Debian</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/577</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/577#comments</comments>
		<pubDate>Tue, 08 Apr 2008 15:07:26 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.redmaple.idv.tw/?p=577</guid>
		<description><![CDATA[1.下載最新版本的 Firefox 到 Debian 的使用者目錄中，解壓縮後執行目錄中的 Firefox 就可以開啟瀏覽器囉 2.但是在看網頁時會發現，Flash無法正常撥放，實在很不優~~按瀏覽器上方的安裝又可能發生無法正常安裝，需以手動安裝方式來完成（其實也很簡單&#8230;），到Adobe的網頁去下載 Linux 版本的 Flash player（http://get.adobe.com/flashplayer）（用Linux平台才能直接看到.tar.gz  ,  .rpm  ,  .YUM,  .deb 等四個版本，Windows平台就會直接被要求下載 .exe 的安裝檔） 3.連到 Adobe 的網頁後可以看到數個版本，原先以為使用 Debian系統選擇安裝 .deb 會比較方便，結果紅是錯的&#8230;。因為Firefox是使用下載版本，所以是獨立的，因此下載使用  tar.gz 是最簡單的方式 4.將下載的檔案解壓縮會產生一個 Flashplayer的目錄，進入目錄中將 libflashplayer.so 複製到 firefox/plugins 目錄中 5.重新啟動 Firefox 就可以成功看到 Flash囉~~簡單吧！]]></description>
			<content:encoded><![CDATA[<p>1.下載最<a href="http://moztw.org" target="_blank">新版本的 Firefox</a> 到 Debian 的使用者目錄中，解壓縮後執行目錄中的 Firefox 就可以開啟瀏覽器囉</p>
<p>2.但是在看網頁時會發現，Flash無法正常撥放，實在很不優~~按瀏覽器上方的安裝又可能發生無法正常安裝，需以手動安裝方式來完成（其實也很簡單&#8230;），到Adobe的網頁去<a href="http://get.adobe.com/flashplayer" target="_blank">下載 Linux 版本的 Flash player（http://get.adobe.com/flashplayer）</a>（用Linux平台才能直接看到.tar.gz  ,  .rpm  ,  .YUM,  .deb 等四個版本，Windows平台就會直接被要求下載 .exe 的安裝檔）</p>
<p>3.連到 Adobe 的網頁後可以看到數個版本，原先以為使用 Debian系統選擇安裝 .deb 會比較方便，結果紅是錯的&#8230;。<span style="color: #0000ff;">因為Firefox是使用下載版本，所以是獨立的，因此下載使用  tar.gz 是最簡單的方式</span></p>
<p>4.將下載的檔案解壓縮會產生一個 Flashplayer的目錄，進入目錄中將 <span style="color: #0000ff;">libflashplayer.so</span> 複製到 <span style="color: #ff0000;">firefox/plugins</span> 目錄中</p>
<p>5.重新啟動 Firefox 就可以成功看到 Flash囉~~簡單吧！</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/577/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian PPPoE 撥號及不定時斷線問題排除</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/588</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/588#comments</comments>
		<pubDate>Tue, 08 Apr 2008 10:36:42 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.redmaple.idv.tw/?p=588</guid>
		<description><![CDATA[用 Debian 好長一陣子以來，常常會遇到 ADSL 約莫 3~7天就會斷線而不會自動重連的問題，這個問題困擾了紅很久，再次找尋相關資料，終於看到 Wiki.hk 上面有說明這個問題及解決方法！太讚了~ 先做個筆記，記錄 ADSL 撥號及斷線的指令 啟動 ADSL 連線（dsl-provider 位於 /etc/ppp/peers/ 目錄中） #pon  dsl-provider 將 ADSL 斷線 #poff =========================================================== 要排除自動斷線的問題則就要修改 /etc/ppp/peers/dsl-provider 檔案了 #nano  /etc/ppp/peers/dsl-provider 就可以看到以下的內容（當然也有許多的註釋） # Minimalistic default options file for DSL/PPPoE connections noipdefault defaultroute replacedefaultroute hide-password lcp-echo-interval 30 #這表示系統 30 秒會向 ADSL 伺服器發出 echo request 以確認連線是否正常 #如果 ADSL 伺服器 [...]]]></description>
			<content:encoded><![CDATA[<p>用 Debian 好長一陣子以來，常常會遇到 ADSL 約莫 3~7天就會斷線而不會自動重連的問題，這個問題困擾了紅很久，再次找尋相關資料，終於看到 Wiki.hk 上面有說明這個問題及解決方法！太讚了~</p>
<p>先做個筆記，記錄 ADSL 撥號及斷線的指令</p>
<p>啟動 ADSL 連線（dsl-provider 位於 /etc/ppp/peers/ 目錄中）</p>
<p>#<strong>pon  dsl-provider</strong></p>
<p><span id="more-588"></span>將 ADSL 斷線</p>
<p>#<strong>poff</strong></p>
<p>===========================================================</p>
<p>要排除自動斷線的問題則就要修改 <span style="color: #0000ff;">/etc/ppp/peers/dsl-provider</span> 檔案了</p>
<p>#<strong>nano  /etc/ppp/peers/dsl-provider</strong></p>
<p>就可以看到以下的內容（當然也有許多的註釋）</p>
<pre># Minimalistic default options file for DSL/PPPoE connections

noipdefault
defaultroute
replacedefaultroute
hide-password
lcp-echo-interval 30

#這表示系統 30 秒會向 ADSL 伺服器發出 echo request 以確認連線是否正常
#如果 ADSL 伺服器 90 秒 (30 秒 x 3) 都沒有回應，系統會假定連線有問題，自動斷開。您可以把 lcp-echo-failure 加大至 <span style="color: #0000ff;"><strong>15</strong></span> (30s x 15 = 450s)(約7分鐘半)
lcp-echo-failure <span style="color: #0000ff;"><strong>15</strong></span>   #預設值為 <span style="color: #ff0000;"><strong>3</strong></span> -將其改為-&gt;  <strong><span style="color: #0000ff;">15</span></strong>

noauth
persist
mtu 1492
usepeerdns
plugin rp-pppoe.so eth0
user "<em><a href="mailto:example@isp.example">example@isp.example</a></em>"</pre>
<p>==========================================================</p>
<p>嗯~~~這是目前找到的解決方法，希望會有效，修改後就等著驗證是否有用囉~~~</p>
<p>參考文件：</p>
<p><a href="http://wiki.debian.org.hk/w/Connect_Internet_with_PPPoEConf#.E4.B8.AD.E6.96.B7.E9.80.A3.E7.B7.9A_.28poff.29" target="_blank">Wiki.hk &#8211; 使用 PPPoEConf 連接 Internet</a> （有更詳細的PPPoE 設定步驟及修改說明）</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/588/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>更換 Debian 網路卡編號</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/582</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/582#comments</comments>
		<pubDate>Sun, 06 Apr 2008 16:20:59 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.redmaple.idv.tw/?p=582</guid>
		<description><![CDATA[先前設定 NAT環境，eth0 是對外的連線，eth1 是對內。當其中有一片網路卡壞掉時，換上新卡片後，Debian會去比對 MAC address 如果不是先前記錄的 eth0 / 1 時，就會將這片新網路卡編號遞增並設定為 eth2，對於想要換卡片後要能直接套用原先NAT設定（以不更改eth0及eth1的設定）的紅，產生了不小困擾（因為網路卡編號會自動遞增）。 在網路上找資料，原來 Debain 有在一個檔案中做 MAC address 的記錄 1.使用 nano 編輯 /etc/udev/rules.d/70-persistent-net.rules 這個檔案 2.修改網路卡編號 # PCI device  (sis900) #SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:55&#8243;, NAME="eth0" # PCI device  (8139too &#60;&#8212;Realteck ) SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:66&#8243;, NAME="eth1&#8243; # PCI device  (via-rhine &#60;&#8211; D-link 530 TX ) SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:77, NAME="eth0" [...]]]></description>
			<content:encoded><![CDATA[<p>先前設定 NAT環境，eth0 是對外的連線，eth1 是對內。當其中有一片網路卡壞掉時，換上新卡片後，Debian會去比對 MAC address 如果不是先前記錄的 eth0 / 1 時，就會將這片新網路卡編號遞增並設定為 eth2，對於想要換卡片後要能直接套用原先NAT設定（以不更改eth0及eth1的設定）的紅，產生了不小困擾（因為網路卡編號會自動遞增）。</p>
<p>在網路上找資料，原來 Debain 有在一個檔案中做 MAC address 的記錄</p>
<p>1.使用 nano 編輯 <strong><span style="color: #ff0000;">/etc/udev/rules.d/70-persistent-net.rules</span></strong> 這個檔案</p>
<p><span id="more-582"></span>2.修改網路卡編號<br />
# PCI device  (sis900)<br />
<span style="color: #ff0000;">#</span>SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:55&#8243;, NAME="eth<span style="color: #ff0000;">0</span>"</p>
<p># PCI device  (8139too &lt;&#8212;Realteck )<br />
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:66&#8243;, NAME="eth1&#8243;</p>
<p># PCI device  (via-rhine &lt;&#8211; D-link 530 TX )<br />
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:77, NAME="eth<strong><span style="color: #0000ff;">0</span></strong>"</p>
<p>將原先的 sis900 晶片的 eth0 標記起來（不使用），並將 vai-rhine 網路卡的 NAME 改為 eth0</p>
<p>就成功的將via-rhine網路卡更換為 eth0 的編號</p>
<p>3.重開機，就完全網路卡編號更新的動作啦~~</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/582/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debian 下使用 Local time ZONE</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/223</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/223#comments</comments>
		<pubDate>Sat, 29 Dec 2007 04:33:31 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://red.ns2go.com/index.php/archives/223</guid>
		<description><![CDATA[在之前試裝 Gentoo 時，曾要將自己所在時區的設定檔複製為 /etc/localtime ，並不了解有複製與無複製的差別&#8230;嗯！於是問題來了：在安裝 Debin 過程中，會詢問是否使用 GMT 硬體時間（格林威治時間），若選擇『是』之後，可以發現系統時間（GMT+0）比目前所在的時間（GMT+8 Asia/Taipei）慢了八小時！？怎麼在調整系統時間卻都無法改變其設定&#8230;呃 = =" 上網 Google 了一下，發現很多網友也有這樣的問題，最後紅是在鳥哥的網頁中找到解決方法，其實方法很簡單，到目錄 /usr/share/zoneinfo/Asia$ 下，將 Taipei 複製為 /etc/localtime ，時間的計算就由 UTC 改為 CST 了。 =======2008.05.15補充======= 單單將 Taipei 複製成 localtime 是還不夠的，因為發現還是會使用 UTC 時間，上網 google 一下，發現 chuany 有寫到解決方法，在此補充一下 1.除了要複製正確的時間成 /etc/localtime 2.要編輯 /etc/default/rcS  檔案 將 UTC =yes 改為 UTC = no 就行了~~ . 這東西不難，基本功部份要再多充實了&#8230;@@"]]></description>
			<content:encoded><![CDATA[<p>在之前試裝 Gentoo 時，曾要將自己所在時區的設定檔複製為 /etc/localtime ，並不了解有複製與無複製的差別&#8230;嗯！於是問題來了：在安裝 Debin 過程中，會詢問是否使用 GMT 硬體時間（格林威治時間），若選擇『是』之後，可以發現系統時間（GMT+0）比目前所在的時間（GMT+8  Asia/Taipei）慢了八小時！？怎麼在調整系統時間卻都無法改變其設定&#8230;呃 = ="</p>
<p><span id="more-223"></span> 上網 Google 了一下，發現很多網友也有這樣的問題，最後紅是在鳥哥的網頁中找到解決方法，其實方法很簡單，到目錄 /usr/share/zoneinfo/Asia$ 下，將 Taipei 複製為 /etc/localtime ，時間的計算就由 UTC 改為 CST 了。</p>
<p>=======2008.05.15補充=======</p>
<p>單單將 Taipei 複製成 localtime 是還不夠的，因為發現還是會使用 UTC 時間，上網 google 一下，發現 <a href="http://blog.linux.org.tw/~chuany/archives/2003_08.html" target="_blank">chuany</a> 有寫到解決方法，在此補充一下</p>
<p>1.除了要複製正確的時間成 /etc/localtime</p>
<p>2.要編輯 /etc/default/rcS  檔案</p>
<p>將 <span style="color: #ff0000;">UTC =yes</span> 改為 <span style="color: #0000ff;">UTC = no </span>就行了~~</p>
<p>.</p>
<p>這東西不難，基本功部份要再多充實了&#8230;@@"</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/223/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sources.list 中的 stable 與 版本代號的不同</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/222</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/222#comments</comments>
		<pubDate>Sat, 29 Dec 2007 04:15:21 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://red.ns2go.com/index.php/archives/222</guid>
		<description><![CDATA[在這次換用 Debian 3.1r0（版本代號：Sarge） 時，所想到先前的一個不解處：stable與版本代號，為何（可能）指的是同樣版本，卻要有兩種方式來表達與使用呢？此時才想通兩者間有不同的地方。 換回到 3.1r0 version 時，若在 sources.list 中設定 deb http://debian.nctu.edu.tw/debian stable main 這時的套件資料指向的是當前釋出的 stable 版，也就是 4.0r1 （Etch）版的套件，也可以寫成 deb http://debian.nctu.edu.tw/debian etch main。若將其改成 deb http://debian.nctu.edu.tw/debian sarge main 則就是指定要指向 Debian 3.1rX 的最後版套件。]]></description>
			<content:encoded><![CDATA[<p>在這次換用 Debian 3.1r0（版本代號：<font color="#0000ff">Sarge</font>） 時，所想到先前的一個不解處：stable與版本代號，為何（可能）指的是同樣版本，卻要有兩種方式來表達與使用呢？此時才想通兩者間有不同的地方。</p>
<p><span id="more-222"></span>換回到  3.1r0  version 時，若在 sources.list 中設定  deb <a href="http://debian.nctu.edu.tw/debian" rel="nofollow">http://debian.nctu.edu.tw/debian</a> stable main 這時的套件資料指向的是當前釋出的 stable 版，也就是 4.0r1 （Etch）版的套件，也可以寫成 deb <a href="http://debian.nctu.edu.tw/debian" rel="nofollow">http://debian.nctu.edu.tw/debian</a> <font color="#ff0000">etch </font>main。若將其改成 deb <a href="http://debian.nctu.edu.tw/debian" rel="nofollow">http://debian.nctu.edu.tw/debian</a> <font color="#ff0000">sarge </font>main 則就是指定要指向 Debian 3.1rX 的最後版套件。</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/222/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在 Debian 3.0r0 Sarge 安裝 NS2 2.27</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/193</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/193#comments</comments>
		<pubDate>Sat, 06 Oct 2007 10:50:04 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ns2]]></category>

		<guid isPermaLink="false">http://red.ns2go.com/index.php/archives/193</guid>
		<description><![CDATA[話說 Debian 3.0 Sarge 的版本現在不易弄到（現在看居然有些是要用買才能拿到 = ="）~自己能找出兩年前抓的 Sarge DVD安裝片也真是慶幸的大叫..爽啊！ 從遭遇找不到光碟片，到尋獲的過程中，真的百感交替～所以決定若有朋友需要 Sarge  DVD dis1 , 2 可留言或 e-mail 給紅，再告知如何下載。 以下為安裝NS2.27 在 Debian Sarge 的過程 OS: Debian3.0r0 (代號：Sarge) User: ns2 NS2 : NS2 2.27 安裝好　Debian 3.0rX 之後，先切換至 root 補齊以下的套件 注意，不能升級至 GCC 4.x 的版本，要使用 gcc 3.4 才行，不然編譯時即會產生錯誤 #aptitude 以下需求的套件是從其他網頁上得來的資料，經紅安裝後也的確可以運作.. gcc-3.4 gcc-3.4-base g++-3.4 xgraph xlibs-static-dev gnome-core（已預設安裝） x-window-system-core（已預設安裝） 從 http://www.isi.edu/nsnam/dist/ [...]]]></description>
			<content:encoded><![CDATA[<p>話說 Debian 3.0 Sarge 的版本現在不易弄到（現在看居然有些是要用買才能拿到 = ="）~自己能找出兩年前抓的 Sarge DVD安裝片也真是慶幸的大叫..爽啊！</p>
<p>從遭遇找不到光碟片，到尋獲的過程中，真的百感交替～所以決定<font color="#ff0000">若有朋友需要 Sarge  DVD dis1 , 2 可留言或 e-mail 給紅，再告知如何下載</font>。</p>
<p>以下為安裝NS2.27 在 Debian Sarge 的過程</p>
<p>OS: Debian3.0r0 (代號：Sarge)</p>
<p>User: ns2</p>
<p>NS2 : NS2 2.27</p>
<p>安裝好　Debian 3.0rX 之後，先切換至 root 補齊以下的套件</p>
<p>注意，不能升級至 GCC 4.x 的版本，要使用 gcc 3.4 才行，不然編譯時即會產生錯誤</p>
<p>#<strong>aptitude</strong><span id="more-193"></span></p>
<p>以下需求的套件是從其他網頁上得來的資料，經紅安裝後也的確可以運作..</p>
<p>gcc-3.4</p>
<p>gcc-3.4-base</p>
<p>g++-3.4</p>
<p>xgraph</p>
<p>xlibs-static-dev</p>
<p>gnome-core（已預設安裝）</p>
<p>x-window-system-core（已預設安裝）</p>
<p>從 <a href="http://www.isi.edu/nsnam/dist/" target="_blank">http://www.isi.edu/nsnam/dist/</a> 下載 NS2 v2.27（檔名：http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz 此為套件整合包）至個人帳號目錄下</p>
<p>2.將檔案解壓縮後，即會建立目錄『ns-allinone-2.27』</p>
<p>#<font color="#0000ff"><strong>tar　-zxvf　ns-allinone-2.27</strong><strong>.tar.gz</strong></font></p>
<p><font color="#ff0000">－－－－－－－－－如果安裝 Debian 3.0 （Sarge）就跳過此段－－－－－－－－－－</font></p>
<p>===========<span lang="en-us">Fedora Core 5 and Suse 10 適用</span>=================</p>
<p>若使用 <span lang="en-us">Fedora Core 5 and Suse 10 進行直接編譯應該會產生以下的錯誤訊息，要進行 patch 修正</span></p>
<p>（紅曾用 Fedora 5 進行 patch 及安裝，卻仍是失敗&#8230;Orz ，於是放棄～很慶幸的翻出兩年前的 Debian 3.0r (Sarge) 才有此篇的產生）</p>
<p>測試過後發現 2.27,2.28 ,2.29.2無法直接編譯，會有下列的錯誤訊息：</p>
<p>checking if 64bit support is requested&#8230; no<br />
checking if 64bit Sparc VIS support is requested&#8230; no<br />
checking system version (for dynamic loading)&#8230; ./configure: line<br />
7624: syntax error near unexpected token `)&#8217;<br />
./configure: line 7624: `       OSF*)&#8217;<br />
tcl8.3.2 configuration failed! Exiting &#8230;<br />
Tcl is not part of the ns project.  Please see<br />
<a href="http://www.Scriptics.com&lt" rel="nofollow">http://www.Scriptics.com&lt</a>;<a href="http://www.scriptics.com/&gt;" rel="nofollow">http://www.scriptics.com/&gt;</a><br />
使用  <a href="http://www.tekno.chalmers.se/~yusheng/projects.htm" target="_blank">http://www.tekno.chalmers.se/~yusheng/projects.htm</a> 網頁的 2.26,2.27,2.28 patch 及執行方式後，即可編譯</p>
<p>若以 2.27 版的 patch for gcc 4.1（檔名：ns-2.27-gcc410.patch）為例：</p>
<p>在 ns-allinone-2.27 目錄外，下指令：</p>
<p>#<font color="#ff0000"><strong>patch -p0 &lt;ns-2.27-gcc410.patch</strong> </font></p>
<p>=============================================2007.11.08 update=</p>
<p><font color="#ff0000">－－－－－－－－－接續以下動作－－－－－－－－－－</font></p>
<p>接下來開始編譯</p>
<p>#<font color="#0000ff"><strong>cd　ns-allinone-2.27</strong></font></p>
<p>#<font color="#0000ff"><strong>./install</strong></font></p>
<p>編譯成功後，會出現訊息，需要使用者手動設定ns2路徑至個人 PATH 中</p>
<p><a href="http://red.ns2go.com/wp-content/uploads/2007.12/ns2_01_.gif" onclick="ps_imagemanager_popup(this.href,'ns2_01_.gif','800','600');return false" onfocus="this.blur()"><img src="http://red.ns2go.com/wp-content/uploads/2007.12/.thumbs/.ns2_01_.gif" alt="ns2_01_.gif" title="ns2_01_.gif" border="0" height="150" width="200" /></a></p>
<p>=================================================================</p>
<p>.&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Please put <font color="#0000ff">/home/ns2/ns-allinone-2.27/bin:/home/ns2/ns-allinone-2.27/tcl8.4.5/unix:/home/ns2/ns-allinone-2.27/tk8.4.5/unix</font><br />
into your PATH environment; so that you&#8217;ll be able to run itm/tclsh/wish/xgraph.</p>
<p>IMPORTANT NOTICES:</p>
<p>(1) You MUST put <font color="#0000ff">/home/ns2/ns-allinone-2.27/otcl-1.8, /home/ns2/ns-allinone-2.27/lib</font>,<br />
into your <font color="#0000ff">LD_LIBRARY_PATH</font> environment variable.<br />
If it complains about X libraries, add path to your X libraries<br />
into LD_LIBRARY_PATH.<br />
If you are using csh, you can set it like:<br />
setenv LD_LIBRARY_PATH &lt;paths&gt;<br />
If you are using sh, you can set it like:<br />
export LD_LIBRARY_PATH=&lt;paths&gt;</p>
<p>(2) You MUST put <font color="#0000ff">/home/ns2/ns-allinone-2.27/tcl8.4.5/library</font> into your <font color="#0000ff">TCL_LIBRARY</font> environmental<br />
variable. Otherwise ns/nam will complain during startup.</p>
<p>(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.5<br />
and tk8.4.5. They are now installed under /home/ns2/ns-allinone-2.27/{bin,include,lib}</p>
<p>After these steps, you can now run the ns validation suite with<br />
cd ns-2.27; ./validate</p>
<p>For trouble shooting, please first read ns problems page<br />
<a href="http://www.isi.edu/nsnam/ns/ns-problems.html" rel="nofollow">http://www.isi.edu/nsnam/ns/ns-problems.html</a>. Also search the ns mailing list archive<br />
for related posts.</p>
<p>==============================================================================</p>
<p>在(1)的路徑設定上， Debian 預設是使用 bash，所以要用　<font color="#0000ff">LD_LIBRARY_PATH</font></p>
<p>3.設定 NS2 環境路徑</p>
<p>#<font color="#0000ff"><span style="font-weight: bold">nano ../.bashrc</span></font></p>
<p>將下述三行加至　.bashrc 中，即可</p>
<p>第一行多加了　$PATH　是加原有系統設定的路徑一併加回，若未加的話，就無法系統中可執行的程式了</p>
<p>另～每個路徑結束後，使用冒號&#8212;&gt;&#8217;  :  &#8216; 做分隔</p>
<p style="color: #ff0000">export PATH=$PATH:/home/ns2/ns-allinone-2.27/bin:/home/ns2/ns-allinone-2.27/tcl8.4.5/unix:/home/ns2/ns-allinone-2.27/tk8.4.5/unix<br />
export LD_LIBRARY_PATH=/home/ns2/ns-allinone-2.27/otcl-1.8:/home/ns2/ns-allinone-2.27/lib<br />
export TCL_LIBRARY=/home/ns2/ns-allinone-2.27/tcl8.4.5/library</p>
<p>4.重新登入帳號 ns2 （讓系統重新讀取一次PATH路徑）</p>
<p>5.讓NS2進行驗證動作</p>
<p>#<strong>cd　ns-allinone-2.27</strong></p>
<p>#<span style="font-weight: bold">cd　ns-2.27</span></p>
<p>#<span style="font-weight: bold">./validate</span></p>
<p>約半小時至數小時後，就可以看一行字出現：</p>
<h2><strong>　All test pass</strong></h2>
<p><a href="http://red.ns2go.com/wp-content/uploads/2007.12/ns2_02_.gif" onclick="ps_imagemanager_popup(this.href,'ns2_02_.gif','800','600');return false" onfocus="this.blur()"><img src="http://red.ns2go.com/wp-content/uploads/2007.12/.thumbs/.ns2_02_.gif" alt="ns2_02_.gif" title="ns2_02_.gif" border="0" height="150" width="200" /></a></p>
<p>恭喜！成功了&#8230;.</p>
<p>（編譯成功時的字當然不會放大！加粗！，但～～～是我太激動&#8230;我~~~終於在 Debian 上可以正常使用NS2 了&#8230;泣）</p>
<p>附記：</p>
<p>在 Linux KDE 或 GNOME 桌面環境下執行 NS-2 （<font color="#ff0000">沒有  Cygwin 模擬 lnux 環境的指令： startxwin.bat 去啟動繪圖模式</font>）只要直接下指令（以執行example2.tcl為例）</p>
<p>#<strong>ns  example2.tcl</strong></p>
<p>就可以了（若tcl 中有要求圖形畫面的輸出）</p>
<p><a href="http://red.ns2go.com/wp-content/uploads/2007.10/NS2_snapshot.jpg" onclick="ps_imagemanager_popup(this.href,'NS2_snapshot.jpg','800','549');return false"><img src="http://red.ns2go.com/wp-content/uploads/2007.10/.thumbs/.NS2_snapshot.jpg" alt="NS2_snapshot.jpg" title="NS2_snapshot.jpg" border="0" height="137" width="200" /></a></p>
<p>參考網頁</p>
<p>1.<a href="http://nsnam.isi.edu/nsnam/index.php/Downloading_and_installing_ns-2" target="_blank">Downloading and installing ns-2</a></p>
<p>2.<a href="http://blog.cotix.net/2007.08.08/121" target="_blank">Kcw&#8217;s Blog &#8211; Debian GNU Linux / 安裝NS2</a></p>
<p>3.<a href="http://nsnam.isi.edu/nsnam/index.php/Main_Page" target="_blank">ns2 &#8211; main page </a></p>
<p>後記：</p>
<p>1.很感謝 <a href="http://blog.cotix.net/" target="_blank">Kcw</a> 寫的Debian相關套件資料，讓紅在安裝過程上節省不少資料搜尋的時間。</p>
<p><font color="#ff0000"><br />
</font></p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/193/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>紅的Linux使用歷程</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/172</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/172#comments</comments>
		<pubDate>Tue, 14 Aug 2007 09:58:19 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>

		<guid isPermaLink="false">http://red.ns2go.com/index.php/archives/172</guid>
		<description><![CDATA[從玩 Linux 開始，Debian 並非紅的第一選擇 2001 / 2002年時　紅選用了GUI親合力不錯的 Mandrake(現更名為 Mandriva)　也不是網路上常見的Redhat(或現在的 Fedora)&#160; 起初的需求是要： 　1.架設 NAT Server 　2.能驅動 D-link 530TX 晶片(當時能直接支援驅動這晶片的 Distribution 沒幾家哩..) 　3.易安裝移除套件的介面&#160; 在2002年左右時，能&#34;輕鬆&#34;達成上述需求的 Linux OS 並不多~ 對於一個初學者來說更是難（雖然現在也沒好太多=.=） 總是逃不開繁瑣的文字設定與編譯(自學，遇到這個真是頭痛&#8230;@@) 試了幾套 Distribution 當時只有 Mandrake9.2 能符合紅的需求（或許還好的~只是紅不知罷了..）　且GUI 介面也與 Windows 相近 現在的 Mandriva 2006 / 2007 亦是如此　畫面越來越漂亮　也有加入許多新的桌面技術 與5年前　10年前　Linux 給人的刻板難用、影音支援很差&#8230;&#8230;等印象　差距甚大 現在初學Linux的人　紅亦會適當推薦使用 Mandriva 來作為第一個環境&#160; &#160; 從學Linux的圖形介面操作、影音撥放　到現在的偶而編譯程式 Mandriva 開始有點不符紅的需求　一些比較特別的函式庫需額外自行下載、編譯、安裝（不是大多數..）　 即使編譯安裝完成也不見得能使用　因為路徑的設定可能不同　紅與shaw在這方面吃了不少苦頭 =.= 也在同時發現　許多網友　大都是用 Redhat&#160; 或&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>從玩 Linux 開始，Debian 並非紅的第一選擇</p>
<p>2001 / 2002年時　紅選用了GUI親合力不錯的 Mandrake(現更名為 Mandriva)　也不是網路上常見的Redhat(或現在的 Fedora)&nbsp;</p>
<p>起初的需求是要：</p>
<p>　1.架設 NAT Server </p>
<p>　2.能驅動 D-link 530TX 晶片(當時能直接支援驅動這晶片的 D<font>istribution 沒幾家哩..</font>)</p>
<p><span id="more-172"></span>　3.易安裝移除套件的介面&nbsp;</p>
<p>在2002年左右時，能&quot;輕鬆&quot;達成上述需求的 Linux OS 並不多~ 對於一個初學者來說更是難（雖然現在也沒好太多=.=）</p>
<p>總是逃不開繁瑣的文字設定與編譯(自學，遇到這個真是頭痛&#8230;@@)</p>
<p>試了幾套 D<font>istribution 當時只有 Mandrake9.2 能符合紅的需求（或許還好的~只是紅不知罷了..）　且GUI 介面也與 Windows 相近</font></p>
<p>現在的 Mandriva 2006 / 2007 亦是如此　畫面越來越漂亮　也有加入許多新的桌面技術</p>
<p>與5年前　10年前　Linux 給人的刻板難用、影音支援很差&#8230;&#8230;等印象　差距甚大</p>
<p>現在初學Linux的人　紅亦會適當推薦使用 Mandriva 來作為第一個環境&nbsp;</p>
<p>&nbsp;</p>
<p>從學Linux的圖形介面操作、影音撥放　到現在的偶而編譯程式</p>
<p>Mandriva 開始有點不符紅的需求　一些比較特別的函式庫需額外自行下載、編譯、安裝（不是大多數..）　</p>
<p>即使編譯安裝完成也不見得能使用　因為路徑的設定可能不同　紅與shaw在這方面吃了不少苦頭 =.=</p>
<p>也在同時發現　許多網友　大都是用 Redhat&nbsp; 或&nbsp; Debian 的平台在開發</p>
<p>腦中思考　為何他們會愛用那兩個平台呢？必有其一定的原因~~</p>
<p>自己歸納了幾個原因，或許是這些因素吧！？</p>
<p>　◇.Redhat 較老牌，有許多的使用者，因此許多程式也就因以為非制式的標準平台</p>
<p>　◆.Debian 的開發是由世界各地的社群共同維護，參與的人多，然支援的Driver 或程式也就不會太少</p>
<p>然~~又覺得 Debian 有一些 Redhat(Fedora) 或 Mandriva&nbsp; 所沒有的特性，讓紅在用過之後也漸漸愛上</p>
<p>　◇.更多套件的支援及版本選擇、版本升級</p>
<p>　◆.許多網友使用 Debian 做各方面的開發，有將其 source code 分享出來，甚至包裝成套件讓網友方便使用</p>
<p>　◇.Debian 有不錯的版本控制系統，系統能升級(相對於一些<font>distribution 來說，是個很不錯的優點</font>) (有彈性)</p>
<p>　　　套件不會只支援特定版本、或現在使用Mandriva 2005版時，而官方已不再支援相關套件~</p>
<p>　　　對於可能長久使用的系統管理者來說，是個不小的負擔，也無從更新安全漏洞或有問題的部份（個人認為挺重要..）</p>
<p>　◆.更自由</p>
<p>以上是紅的小小的使用心得與歷程~~ </p>
<p>紅在2006年改用 Debian 之後，就一直使用至今~~未來會不會想換呢？暫時不會了吧~~  </p>
<p><font>&nbsp; </font></p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/172/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad robtos 限定！Part II ： 還有更惡質的 robots (spiders) 不看robots.txt 的指示時～ 用 Robot trap</title>
		<link>http://www.redmaple.idv.tw/index.php/archives/171</link>
		<comments>http://www.redmaple.idv.tw/index.php/archives/171#comments</comments>
		<pubDate>Sun, 12 Aug 2007 09:25:52 +0000</pubDate>
		<dc:creator>紅楓</dc:creator>
				<category><![CDATA[Debian Linux]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://red.ns2go.com/index.php/archives/171</guid>
		<description><![CDATA[機車哩~~spider 也有這種來陰的，不照規定來的：有已寫好的 robots.txt 讓 spider 知道這兒歡不歡迎它們，但就有不看的傢伙存在 沒關係，上網 google 一下發現，還是有網友有法子可以治那些網路垃圾 有國外網友寫了這一篇資料：How to keep bad robots, spiders and web crawlers away 0.在使用這份資料之前，需先注意 apache2 是否有開啟支援 .htaccess 　看 /etc/apache2/sites-available/default 設定檔，&#8221;None&#8221; 才是有開啟 　　AllowOverride None &#160; 作者提供了兩個方法供使用 1.使用 .htaccess 來限定 BOT 的行為 2.設 Robot trap (管他叫：網路爬虫用陷阱？ robot抓取器？ -.- 自行體會中文的意境~~) 　紅使用了第二個『Robot trap』來抓 &#34; robot 逃犯 &#34; 　下載網站提供的 robotrap.zip 檔，解壓縮後，上傳至 www根目錄（不含 robotrap目錄） .htaccess [...]]]></description>
			<content:encoded><![CDATA[<p>機車哩~~spider 也有這種來陰的，不照規定來的：有已寫好的 robots.txt 讓 spider 知道這兒歡不歡迎它們，但就有不看的傢伙存在</p>
<p>沒關係，上網 google 一下發現，還是有網友有法子可以治那些網路垃圾</p>
<p>有國外網友寫了這一篇資料：<a href="http://www.fleiner.com/bots/" target="_blank">How to keep bad robots, spiders and web crawlers away</a></p>
<p>0.在使用這份資料之前，需先注意 apache2 是否有開啟支援 .htaccess</p>
<p>　看 /etc/apache2/sites-available/default 設定檔，&rdquo;None&rdquo; 才是有開啟</p>
<p>　　AllowOverride <font color="#ff0000">None</font></p>
<p><span id="more-171"></span>&nbsp;</p>
<p>作者提供了兩個方法供使用</p>
<p>1.使用 .htaccess 來限定 BOT 的行為</p>
<p>2.設 Robot trap (管他叫：網路爬虫用陷阱？ robot抓取器？ -.- 自行體會中文的意境~~)</p>
<p>　紅使用了第二個『Robot trap』來抓 &quot; robot 逃犯 &quot;</p>
<p>　下載網站提供的 robotrap.zip 檔，解壓縮後，上傳至 www根目錄（不含 robotrap目錄） </p>
<p><font color="#0000ff">.htaccess , ailtrap.shtml , X.html</font></p>
<p>&lt;DIR botsi&gt; <font color="#0000ff">.htaccess , index.shtml</font></p>
<p>&lt;DIR botsv&gt; <font color="#0000ff">.htaccess , index.shtml</font></p>
<p>3.修改 /www根目錄/.htaccess 檔案內容</p>
<pre>     <font color="#0000ff">RewriteEngine on</font></pre>
<pre><font color="#0000ff">　　Options +FollowSymlinks</font><font color="#0000ff"></font></pre>
<pre><font color="#0000ff">　　</font><font color="#0000ff">RewriteBase /</font></pre>
<pre><font color="#0000ff">　　RewriteRule ^.*\.html /botsv/index.shtml</font></pre>
<pre><font color="#0000ff">　　ErrorDocument 400 /botsv/index.shtml</font></pre>
<pre><font color="#0000ff">　　ErrorDocument 402 /botsv/index.shtml</font><font color="#0000ff"></font></pre>
<pre><font color="#0000ff">　　</font><font color="#0000ff">ErrorDocument 403 /botsv/index.shtml</font></pre>
<pre><font color="#0000ff">　　ErrorDocument 404 /botsv/index.shtml</font></pre>
<pre><font color="#0000ff">　　ErrorDocument 500 /botsv/index.shtml</font></pre>
<p>4.設定好 .htaccess 後，一定要先測試原先網頁是否能正常運作</p>
<p>5.收工~等待驗收成果了..&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.redmaple.idv.tw/index.php/archives/171/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

