<?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>Tarotoast's Stuff &#187; linux</title>
	<atom:link href="http://blog.tarotoast.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tarotoast.com</link>
	<description>Personal blog</description>
	<lastBuildDate>Tue, 04 May 2010 08:49:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SSH 斷線問題</title>
		<link>http://blog.tarotoast.com/2008/04/20/433/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ssh-%25e6%2596%25b7%25e7%25b7%259a%25e5%2595%258f%25e9%25a1%258c</link>
		<comments>http://blog.tarotoast.com/2008/04/20/433/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 06:54:04 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[Server Diary]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[disconnect]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/?p=433</guid>
		<description><![CDATA[最近剛搬到 Slicehost，有個大問題就是 SSH 沒放多久就自動斷線 明明隔壁視窗的 Bluehost 都放了兩天 idle 都沒斷，為啥 Slicehost 才半個小時就葛掉了 稍微找了一下 (其實我丟了一張 ticket :$)，發現其實只要再 sshd 裡面修改一下就好了: 編輯 /etc/ssh/sshd_config KeepAlive yes ClientAliveInterval 60 還有因為我是從 Ubuntu 下面 GTerm 連過去的，所以其實還可以這樣改: 編輯 ~/.ssh/config ServerAliveInterval 60 然後很奇妙的是，不再斷線了 XD Bye bye SSH disconnecting every so fu*ing often :)]]></description>
			<content:encoded><![CDATA[<p>最近剛搬到 Slicehost，有個大問題就是 SSH 沒放多久就自動斷線<br />
明明隔壁視窗的 Bluehost 都放了兩天 idle 都沒斷，為啥 Slicehost 才半個小時就葛掉了<br />
稍微找了一下 (其實我丟了一張 ticket :$)，發現其實只要再 sshd 裡面修改一下就好了:<br />
編輯 /etc/ssh/sshd_config<br />
<code>KeepAlive yes<br />
ClientAliveInterval 60<br />
</code><br />
還有因為我是從 Ubuntu 下面 GTerm 連過去的，所以其實還可以這樣改:<br />
編輯 ~/.ssh/config<br />
<code>ServerAliveInterval 60<br />
</code><br />
然後很奇妙的是，不再斷線了 XD<br />
Bye bye SSH disconnecting every so fu*ing often :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2008/04/20/433/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu 7.10 把玩心得</title>
		<link>http://blog.tarotoast.com/2007/10/07/396/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ubuntu-710-%25e6%258a%258a%25e7%258e%25a9%25e5%25bf%2583%25e5%25be%2597</link>
		<comments>http://blog.tarotoast.com/2007/10/07/396/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 11:52:48 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/10/07/396/</guid>
		<description><![CDATA[雖然說是把玩，但是會換成 Ubuntu 的原因也主要是因為工作需要。換成 Ubuntu 後最棒的事情就是我覺得我的電腦又變快了 (a)。雖然說我現在還是保持著 Vista 跟 Ubuntu 的 Dual Boot 狀態，但是真正開 Vista 的時間實在很少。以後會開 Vista 就只會在一定要開才開的狀況下吧。我絕對不光是為了 Compiz Fusion 的絢麗畫面而跳槽的 XD 用到目前為止覺得最大的問題是 Logitech 的 Webcam 不能用。雖然偵測的型號都很正常，但是 aMSN 或者 Camorama 就是不能用。第二的大問題就是 Linux 下的多個 mixer 之間的不同。對電腦來說我現在有 3 個輸入輸出裝置，一個是主機板上的 on board 音效卡，一個是 free.2 Skype Phone，還有一個是 Logitech webcam 上的麥克風。雖然進去 Ubuntu 內建的 Mixer 把輸出裝置都改成 onboard 音效卡後，大部分的軟體都正常播放，少數卻還是沒有正常的播。影響最大的是 Firefox 裡面的 Flash 沒有聲音。好吧可能在多花點時間多爬一些文章說不定就會好了，可是很浪費時間耶。 [...]]]></description>
			<content:encoded><![CDATA[<p>雖然說是把玩，但是會換成 Ubuntu 的原因也主要是因為工作需要。換成 Ubuntu 後最棒的事情就是我覺得我的電腦又變快了 (a)。雖然說我現在還是保持著 Vista 跟 Ubuntu 的 Dual Boot 狀態，但是真正開 Vista 的時間實在很少。以後會開 Vista 就只會在一定要開才開的狀況下吧。我絕對不光是為了 Compiz Fusion 的絢麗畫面而跳槽的 XD</p>
<p>用到目前為止覺得最大的問題是 Logitech 的 Webcam 不能用。雖然偵測的型號都很正常，但是 aMSN 或者 Camorama 就是不能用。第二的大問題就是 Linux 下的多個 mixer 之間的不同。對電腦來說我現在有 3 個輸入輸出裝置，一個是主機板上的 on board 音效卡，一個是 free.2 Skype Phone，還有一個是 Logitech webcam 上的麥克風。雖然進去 Ubuntu 內建的 Mixer 把輸出裝置都改成 onboard 音效卡後，大部分的軟體都正常播放，少數卻還是沒有正常的播。影響最大的是 Firefox 裡面的 Flash 沒有聲音。好吧可能在多花點時間多爬一些文章說不定就會好了，可是很浪費時間耶。</p>
<p><strong>Update: </strong>某次 Software Update 後忽然間 Firefox 的聲音又好了</p>
<p>7.10 的更新很頻繁，再怎麼說幾天後就要 Release 了，每天都可以很開心的 apt-get update + upgrade 上百個剛編好的 package。用到目前覺得最好用的部份應該還是這是一台 Linux Box：伺服器的功能全部都是內建的。有 shell access 的工作站就是比 Windows Box 好用太多了。</p>
<p>下次回台灣來把老被老木的電腦全部灌成 Ubuntu。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/10/07/396/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 好棒.. ?</title>
		<link>http://blog.tarotoast.com/2007/10/01/395/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=linux-%25e5%25a5%25bd%25e6%25a3%2592</link>
		<comments>http://blog.tarotoast.com/2007/10/01/395/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 02:06:51 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[Reflection]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/10/01/395/</guid>
		<description><![CDATA[Ubuntu 真的很棒，只要妳用的東西是很熱門很多人研究過，Google 打下去就會出現很詳細 Howto 的話，那的確很棒。但是如果要用的東西不很熱門，或者是某些公司出的 linux 板程式，那很容易要裝個東西就會浪費掉一兩個小時。 剛為了要裝 Oboe Sync 3.0，被 Python、Qt3 vs Qt4、PyQt、sip 這些錯縱複雜的關係搞得很機。抓下來一個 .tar.gz 也沒說要啥 dependency 然後就只有一個 oboe_exe.py，跑了後才開始靠背少了什麼東西。 去找 PyQT 然後又跟我說要編需要 sipconfig，鬼才知道那東西是在哪個 package 裡面。繞了一大圈發現 sip 是 PyQT 同一間公司出的，靠北是不會說喔。 好不容易要開始編 sip 然後又開始靠北說三小 Error: Failed to create ./qtdirs using platform linux-g++. Make sure your compiler is installed correctly and you have a working make on [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 真的很棒，只要妳用的東西是很熱門很多人研究過，Google 打下去就會出現很詳細 Howto 的話，那的確很棒。但是如果要用的東西不很熱門，或者是某些公司出的 linux 板程式，那很容易要裝個東西就會浪費掉一兩個小時。</p>
<p>剛為了要裝 Oboe Sync 3.0，被 Python、Qt3 vs Qt4、PyQt、sip 這些錯縱複雜的關係搞得很機。抓下來一個 .tar.gz 也沒說要啥 dependency 然後就只有一個 oboe_exe.py，跑了後才開始靠背少了什麼東西。</p>
<p>去找 PyQT 然後又跟我說要編需要 sipconfig，鬼才知道那東西是在哪個 package 裡面。繞了一大圈發現 sip 是 PyQT 同一間公司出的，靠北是不會說喔。</p>
<p>好不容易要開始編 sip 然後又開始靠北說三小</p>
<blockquote>
<pre>Error: Failed to create ./qtdirs using platform linux-g++.</pre>
<pre>Make sure your compiler is installed correctly and you have a working make on your PATH. "</pre>
</blockquote>
<p>最好是這種 error message 有意義。</p>
<p>Google 又找了一下發現是寫 configure.py 的人很白爛，qt3 和 qt4 共存的時候只會抓到 qt3 然後就爆了。又仔細的爬了一下文發現可以用 -q 選項來指定 qmake 的 absolute path，所以來找一下 qmake 在哪裡：</p>
<blockquote>
<pre>peter@50k:~$ which qmake</pre>
<pre>/usr/bin/qmake</pre>
<pre>peter@50k:~$ ls -al /usr/bin/qmake</pre>
<pre>lrwxrwxrwx 1 root root 23 2007-09-25 22:38 /usr/bin/qmake -&gt; /etc/alternatives/qmake</pre>
<pre>peter@50k:~$ ls -al /etc/alternatives/qmake</pre>
<pre>lrwxrwxrwx 1 root root 18 2007-10-01 18:24 /etc/alternatives/qmake -&gt; /usr/bin/qmake-qt3</pre>
<pre>peter@50k:~$ ls -al /usr/bin/qmake-qt3</pre>
<pre>-rwxr-xr-x 1 root root 2032164 2007-09-18 10:05 /usr/bin/qmake-qt3</pre>
<pre>peter@50k:~$ ls /usr/share/qt4/*/qmake</pre>
<pre>/usr/share/qt4/bin/qmake</pre>
<pre>peter@50k:~$ whereis qmake-qt4</pre>
<pre>qmake-qt4: /usr/bin/qmake-qt4 /usr/X11R6/bin/qmake-qt4 /usr/bin/X11/qmake-qt4 /usr/share/man/man1/qmake-qt4.1.gz</pre>
</blockquote>
<p>靠北夠不夠麻煩阿，Linux 想要更普及話的話，這些問題都得排除。能夠想像你媽打電話來問說要怎麼裝啥啥啥程式嗎？對啦妳可以直接 ssh 進去，那如果變成一個客服要做的時候，最好是有辦法每個 client 都給他 ssh 進去修。</p>
<p>沒有 .deb 的東西還是少裝，省得在那邊覺得為啥只是簡單的想要裝個程式，卻浪費了一堆冤枉時間，到頭來只是幾行沒有人跟你說的指令而已。更！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/10/01/395/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu 7.10 條教筆記</title>
		<link>http://blog.tarotoast.com/2007/09/29/394/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ubuntu-710-%25e6%25a2%259d%25e6%2595%2599%25e7%25ad%2586%25e8%25a8%2598</link>
		<comments>http://blog.tarotoast.com/2007/09/29/394/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 06:24:41 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[compiz]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[gcin]]></category>
		<category><![CDATA[gdm]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/09/29/394/</guid>
		<description><![CDATA[nVidia TwinView 在 Restricted Drive Manager 停用 nVidia 的 Driver 去 nVidia 官方網站抓最新的 Linux Driver 讓他裝 在 Restricted Drive Manager 啟用 nVidia 的 Driver 用 nVidia X Server Setting 來設定 TwinView FASTTRAK 378 RAID 0 安裝 dmraid: sudo apt-get install dmraid 建立 mount point: sudo mkdir /media/raid0 測試: sudo mount /dev/mapper/pdc_cbchadihee1 /media/raid0 最後再把這個 mount point [...]]]></description>
			<content:encoded><![CDATA[<p><strong>nVidia TwinView</strong></p>
<ol>
<li>在 Restricted Drive Manager 停用 nVidia 的 Driver</li>
<li>去 nVidia 官方網站抓最新的 Linux Driver 讓他裝</li>
<li>在 Restricted Drive Manager 啟用 nVidia 的 Driver</li>
<li>用 nVidia X Server Setting 來設定 TwinView</li>
</ol>
<p><a href="http://www.flickr.com/photos/tarotoast/1461847980/" title="Photo Sharing"><img src="http://farm2.static.flickr.com/1239/1461847980_f87f7c3173.jpg" alt="Screenshot-NVIDIA X Server Settings" height="481" width="500" /></a></p>
<p><strong>FASTTRAK 378 RAID 0</strong></p>
<ol>
<li>安裝 dmraid: <span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">sudo apt-get install dmraid</span></li>
<li>建立 mount point: <span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">sudo mkdir /media/raid0</span></li>
<li>測試: <span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">sudo mount /dev/mapper/pdc_cbchadihee1 /media/raid0</span></li>
<li>最後再把這個 mount point 寫入 /etc/fstab 讓下次重開時候自動 mount</li>
</ol>
<p><strong>GCIN</strong></p>
<ol>
<li>在 Synaptic 裡面把 SCIM uninstall 掉然後安裝 GCIN</li>
<li>在 shell 裡面輸入 <span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"> im-switch -s gcin </span></li>
<li>把 ~/.gtkrc.mine 改成:<br />
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><p>export GTK_IM_MODULE=gcin<br />
export LC_CTYPE=&#8221;zh_TW.UTF-8&#8243;</p></blockquote>
</li>
<li>登出再登入</li>
</ol>
<p><strong>Sound</strong></p>
<ol>
<li>打開 System / Preferences / Sound</li>
<li>把 Sound playback 選成 VIA 8237</li>
</ol>
<p><strong>Desktop Effect</strong></p>
<ol>
<li><span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">sudo apt-get install ccsm</span></li>
<li>System / Advanced Desktop Effects Settings</li>
</ol>
<p><a href="http://www.flickr.com/photos/tarotoast/1462021410/" title="Photo Sharing"><img src="http://farm2.static.flickr.com/1191/1462021410_55aa666972.jpg" alt="Screenshot-CompizConfig Settings Manager" height="302" width="500" /></a></p>
<p><strong>Fonts</strong></p>
<ol>
<li>安裝微軟正黑體:<br />
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><p>sudo cp msjh* /usr/share/fonts<br />
sudo chmod o+rx /usr/share/fonts/msjh*<br />
sudo fc-cache -f -v</p></blockquote>
</li>
<li>打開 Firefox: Edit / Preferences 然後把所有字體預設都改成 Microsoft JhengHei 省得麻煩</li>
</ol>
<p><strong>sshfs</strong></p>
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><p>sudo apt-get install sshfs<br />
adduser peter fuse</p></blockquote>
<p><strong>GDM Dead Keyboard</strong><br />
這個奇怪的問題似乎有人碰過: <a href="http://www.linuxforums.org/forum/suse-linux-help/54000-keyboard-not-funtioning-login.html">Keyboard not funtioning at login</a>。問題應該是像上面那篇文章寫的一樣，不知道為什麼 gdm 會比其他的 getty 開啟的更早，導致 keyboard 的控制被 getty 拿去，然後 gdm 下啥都不能做了囧。我用比較簡單的解法：</p>
<ol>
<li>把 gdm 預設關閉：<span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm</span></li>
<li>在 /etc/rc.local 加入：<span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">service gdm start</span></li>
</ol>
<p><strong>Wine + Wine Doors</strong></p>
<ol>
<li>Wine:<br />
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><p>wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -<br />
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list<br />
sudo apt-get update<br />
sudp apt-get install wine</p></blockquote>
</li>
<li>Wine Doors: 去<a href="http://www.wine-doors.org/wordpress/?page_id=3">這裡</a>下載最新的 deb 然後讓 Package Manager 自動安裝</li>
</ol>
<p><strong>Microsoft IntelliMouse Explorer</strong></p>
<ol>
<li>修改 /etc/X11/xorg.conf:<br />
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><p>Section &#8220;InputDevice&#8221;<br />
Identifier &#8220;Mouse0&#8243;<br />
Driver &#8220;mouse&#8221;<br />
Option &#8220;CorePointer&#8221;<br />
Option &#8220;Device&#8221; &#8220;/dev/psaux&#8221;<br />
Option &#8220;Protocol&#8221; &#8220;ExplorerPS/2&#8243;<br />
Option &#8220;Buttons&#8221; &#8220;7&#8243;Option &#8221;<br />
ButtonMapping&#8221; &#8220;1 2 3 4 5&#8243;<br />
Option &#8220;ZAxisMapping&#8221; &#8220;6 7&#8243;<br />
Option &#8220;Resolution&#8221; &#8220;100&#8243;<br />
EndSection</p></blockquote>
</li>
<li>安裝 imwheel: <span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">sudo apt-get install imwheel</span></li>
<li>修改 /etc/X11/imwheel/imwheelrc:<br />
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><p>&#8220;.*&#8221; None,Up,Alt_L|Left None,Down,Alt_L|Right&#8221;^firefox-bin$&#8221;<br />
None,Left,Alt_L|Left<br />
None,Right,Alt_L|Right</p></blockquote>
</li>
<li>新增 /etc/X11/Xsession.d/57xmodmap:<br />
<blockquote style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">#/bin/bash<br />
xmodmap -e &#8220;pointer = 1 2 3 6 7 4 5&#8243; </p></blockquote>
</li>
<li>把 /etc/X11/Xsession.d/57xmodmap 改成執行檔: <span style="background: #dddddd none repeat scroll 0% 50%; font-family: monospace; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">sudo chmod 755 /etc/X11/Xsession.d/57xmodmapservice</span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/09/29/394/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP 5.2.1 on FC4 x86_64 compile note</title>
		<link>http://blog.tarotoast.com/2007/04/21/365/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-521-on-fc4-x86_64-compile-note</link>
		<comments>http://blog.tarotoast.com/2007/04/21/365/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 21:22:12 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[Footprints + Diary]]></category>
		<category><![CDATA[Server Diary]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fc4]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/04/21/365/</guid>
		<description><![CDATA[Linking libraries from its default location ln -s /usr/include /opt/include ln -s /usr/lib64 /opt/lib Now configuring with new location: ./configure --prefix=/usr/local --enable-force-cgi-redirect --enable-fastcgi --with-libxml --with-zlib --with-bz2 --with-curl --with-gd --enable-mbstring --with-mysql --with-jpeg-dir=/opt --with-png-dir=/opt --with-mysql=/opt]]></description>
			<content:encoded><![CDATA[<p>Linking libraries from its default location</p>
<pre style="white-space: -moz-pre-wrap; border: 1px inset ; margin: 0px; padding: 6px; width: 400px; text-align: left">
ln -s /usr/include /opt/include
ln -s /usr/lib64 /opt/lib
</pre>
<p>Now configuring with new location:</p>
<pre style="white-space: -moz-pre-wrap; border: 1px inset ; margin: 0px; padding: 6px; width: 400px; text-align: left">
./configure --prefix=/usr/local --enable-force-cgi-redirect --enable-fastcgi --with-libxml --with-zlib --with-bz2 --with-curl  --with-gd --enable-mbstring --with-mysql --with-jpeg-dir=/opt --with-png-dir=/opt --with-mysql=/opt
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/04/21/365/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Swap</title>
		<link>http://blog.tarotoast.com/2007/03/06/348/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=linux-swap</link>
		<comments>http://blog.tarotoast.com/2007/03/06/348/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 07:46:15 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/03/06/348/</guid>
		<description><![CDATA[I was trying to do a mysqldump on a gigantic database in order to move to a faster machine. About a minute after issuing the command, I started to regret. The mysqldump took over the entire system resource (in terms of memory, both physical ram and sawp are all taken) and pratically hanged the system. [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to do a <code>mysqldump</code> on a gigantic database in order to move to a faster machine. About a minute after issuing the command, I started to regret. The <code>mysqldump</code> took over the entire system resource (in terms of memory, both physical ram and sawp are all taken) and pratically hanged the system. Hopefully no researchers are using any service at that moment.</p>
<p>Clearly, the server do not have enough memory for me to do a successful dump. I was thinking if there&#8217;s away to resize the swap. It turns out that I can increase the swap space pretty easy:</p>
<ol>
<li>As root, go to a directory where swap can be stored and type:<br />
<code>dd if=/dev/zero of=swapfile bs=1024 count=4127438</code><br />
This command will create a 4GB file filled with null.</li>
<li>Now make sure it&#8217;s read/write only to root:<br />
<code>chmod 600 swapfile</code></li>
<li>Make it a SWAP:<br />
<code>mkswap swapfile</code></li>
<li>Add it into existing SWAP:<br />
<code>swapon swapfile</code></li>
</ol>
<p>Now do a <code>top</code> and 4G of swap space is added, I can now dump the 2.8G database :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/03/06/348/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
