<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-24469559</id><updated>2020-02-28T15:15:03.780+08:00</updated><category term="Linux使用"/><category term="Software"/><category term="網絡應用"/><category term="Linux資料"/><category term="Linux軟件編譯"/><category term="Date"/><category term="編程資料or技巧"/><category term="linux-game"/><title type='text'>PSP-JuPiTer</title><subtitle type='html'>Linux使用日記－記錄下我使用Linux的心得和其他人提供的解決辦法&lt;br /&gt;如果各位覺得我有甚麼地方有錯誤，歡迎告知我，好讓我改正錯誤。&lt;br /&gt;如果想和我討論一下交流交流的話，我也無任歡迎！&lt;br /&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default?alt=atom&amp;redirect=false'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default?alt=atom&amp;start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>134</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24469559.post-803358174531799966</id><published>2010-09-27T17:59:00.001+08:00</published><updated>2010-09-27T18:25:43.115+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date"/><category scheme="http://www.blogger.com/atom/ns#" term="Software"/><title type='text'>Boot Windows by GRUB2</title><content type='html'>Grub2的設定與以前有後大的分別，現在主要設定檔是自動生成的&lt;br /&gt;grub.cfg是自動生成，所以直接編輯的話更新後就會失效&lt;br /&gt;想要手動加入Windows開機選項的話，可以修改&lt;i&gt;/etc/grub.d/40_custom&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;首先我們要知道目標Windows 7所在分區&lt;br /&gt;&lt;blockquote&gt;$sudo blkid&lt;br /&gt;/dev/sda2: UUID=&quot;10AC99D8AC99B8A4&quot; TYPE=&quot;ntfs&quot; &lt;br /&gt;&lt;/blockquote&gt;用blkid查看目標所在分區的UUID，大概會出現一個ntfs格式的分區&lt;br /&gt;之後在40_custom裹加入：&lt;br /&gt;&lt;blockquote&gt;#!/bin/sh&lt;br /&gt;exec tail -n +3 $0&lt;br /&gt;# This file provides an easy way to add custom menu entries.  Simply type the&lt;br /&gt;# menu entries you want to add after this comment.  Be careful not to change&lt;br /&gt;# the &#39;exec tail&#39; line above.&lt;br /&gt;menuentry &quot;Windows&quot; {&lt;br /&gt;insmod chain&lt;br /&gt;insmod ntfs&lt;br /&gt;search --fs-uuid --set 10ac99d8ac99b8a4&lt;br /&gt;chainloader +1&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;第一句menuentry意思是加入一個Windows的項目在開機選單裹&lt;br /&gt;然後insmod意思是啟用chain模塊和ntfs模塊，目的是使用chainloader命令和讀取ntfs格式的分區&lt;br /&gt;（不過chain好像沒有也可以）&lt;br /&gt;search就是用uuid去尋找目標分區，用uuid會比舊格式方便&lt;br /&gt;原因是加入新硬碟後或者硬碟順序改變了，依然可以啟動而無修改&lt;br /&gt;最後chainloader +1就會啟動Windows&lt;br /&gt;&lt;br /&gt;完成編輯以後還要更新設定檔才能使修改生效&lt;br /&gt;執行&lt;span style=&quot;font-style:italic;&quot;&gt;sudo update-grub&lt;/span&gt;便完成&lt;br /&gt;重新開機看看效果吧～&lt;br /&gt;&lt;br /&gt;另外附上修復Windows 7開機的小方法：&lt;br /&gt;用Windows 7安裝光碟開機，打開一個cmd&lt;br /&gt;&lt;blockquote&gt;BootRec /ScanOS &lt;br /&gt;BootRec /RebuildBcd &lt;br /&gt;bcdedit &lt;br /&gt;BootRec /FixBoot &lt;br /&gt;BootRec /FixMbr&lt;br /&gt;&lt;/blockquote&gt;使用BootRec命令來修復開機&lt;br /&gt;&lt;br /&gt;Via: http://grub.enbug.org/ChainLoadWindows</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/803358174531799966/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=803358174531799966&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/803358174531799966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/803358174531799966'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2010/09/boot-windows-by-grub2.html' title='Boot Windows by GRUB2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-6050846267062517996</id><published>2010-08-22T17:41:00.000+08:00</published><updated>2010-08-22T17:41:05.582+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Software"/><title type='text'>Kensington SlimBlade Trackball @ Gentoo</title><content type='html'>昨天買了隻Kensington的SlimBlade Trackball&lt;br /&gt;在Gentoo System下這隻Trackball不需要甚麼設定便可以良好地工作&lt;br /&gt;但這顯然不乎合我的Geek理念&lt;br /&gt;所以我上網查了一下&lt;br /&gt;修改/etc/X11/xinit/xinitrc.d/99-input&lt;br /&gt;用xinput去設定這隻Trackball&lt;br /&gt;先把按鍵remap，因為我習慣用左手來操控mouse&lt;br /&gt;所以把左右鍵交換，然後把Trackball左上角的鍵改成left click&lt;br /&gt;右上角則為中鍵&lt;br /&gt;左下角是右鍵、右下角是左鍵&lt;br /&gt;原本SlimBlade有個功能是瀏覽模式&lt;br /&gt;這個功能也很容實現，253 property 是Wheel Emulation，設定成&lt;i&gt;1&lt;/i&gt;意思是true&lt;br /&gt;257是Wheel Emulation Button，輸入&lt;i&gt;2&lt;/i&gt;是第二個鍵&lt;br /&gt;這個2不是remap後的值&lt;br /&gt;第2個鍵是左上角那個，這樣定設按住左上角鍵&lt;br /&gt;再上下左右動就可以上下左右Scrolling&lt;br /&gt;單按一下就是單click左鍵&lt;br /&gt;完成啦～&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;&lt;br /&gt;$ cat /etc/X11/xinit/xinitrc.d/99-input&lt;br /&gt;#!/bin/sh&lt;br /&gt;xinput set-button-map &quot;Kensington Kensington Slimblade Trackball&quot;  3 1 1 4 5 6 7 2 9 10 11 12&lt;br /&gt;xinput set-prop &quot;Kensington Kensington Slimblade Trackball&quot; 253 1&lt;br /&gt;xinput set-prop &quot;Kensington Kensington Slimblade Trackball&quot; 257 2&lt;br /&gt;&lt;/i&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/6050846267062517996/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=6050846267062517996&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/6050846267062517996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/6050846267062517996'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2010/08/kensington-slimblade-trackball-gentoo.html' title='Kensington SlimBlade Trackball @ Gentoo'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-6966308552292265437</id><published>2010-07-20T11:25:00.005+08:00</published><updated>2010-09-04T12:05:27.935+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="編程資料or技巧"/><title type='text'>trac + lighttpd</title><content type='html'>做Final Year Project，想搭建一個Bugs tracking server&lt;br /&gt;於是挑了用Python實現的trac&lt;br /&gt;系統是Gentoo + lighttpd + fastcgi&lt;br /&gt;lighttpd支援fastcgi，只需要設定lighttpd就可以跑python的webapp&lt;br /&gt;trac就用Gentoo portage提供的webapp-config安裝到lighttpd的網站目錄&lt;br /&gt;因為還想跑其他網站，所以註冊了一個免費域名&lt;br /&gt;再用lighttpd的vhost modules&lt;br /&gt;&lt;br /&gt;其實fastcgi只是一個python文件，裏面寫了啟動trac的code&lt;br /&gt;設定lighttpd去讀取它就可以&lt;br /&gt;所以最複雜的就是lighttpd的設定，這部份留到安裝好portage裏的trac再做&lt;br /&gt;先emerge www-apps/trac &lt;br /&gt;如果沒有sqlite和lighttpd的話還要emerge lighttpd sqlite&lt;br /&gt;trac還支援其他SQL DB&lt;br /&gt;因為server就只有我和另外兩個隊友使用，sqlite已經很足夠了&lt;br /&gt;裝好以後可以用Gentoo的webapp-config輕鬆設定好trac&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;sudo webapp-config -I -h &amp;lt;hostname&amp;gt; -d trac trac 0.11.7 -s lighttpd&lt;/i&gt;&lt;/blockquote&gt;只需要跟據實際情況填上&lt;hostname&gt;&lt;br /&gt;會在/var/www/&lt;hostname&gt;目錄裏建立好trac用的fastcgi執行檔&lt;br /&gt;而trac本體會安裝在另外的地方，trac project則存放在/var/lib/trac&lt;br /&gt;&lt;br /&gt;trac預設支援SVN，我是喜歡用GIT&lt;br /&gt;trac也有GIT plugins，不過我沒有安裝&lt;br /&gt;接着需要用trac-admin來建立一個trac project&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;sudo trac-admin /var/lib/trac/&lt;project name&gt; initenv&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;可能trac設計是預期和網站整合，所以url是/trac/projectname&lt;br /&gt;&lt;br /&gt;然後便是設定lighttpd&lt;br /&gt;先來搞定mod_fastcgi，編輯/etc/lighttpd/mod_fastcgi.conf&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;server.modules += (&quot;mod_fastcgi&quot;)&lt;br /&gt;var.fcgi_binary=&quot;/var/www/trac-site.net/cgi-bin/trac.fcgi&quot; # 0.10 name of prior fcgi executable&lt;br /&gt;&lt;br /&gt;$HTTP[&quot;url&quot;] =~ &quot;^/trac(?!/static)&quot; {&lt;br /&gt;    fastcgi.server = (&quot;/trac&quot; =&gt;&lt;br /&gt;        (&quot;trac&quot; =&gt;&lt;br /&gt;             (&quot;socket&quot; =&gt; &quot;/tmp/trac-fastcgi.sock&quot;,&lt;br /&gt;              &quot;bin-path&quot; =&gt; fcgi_binary,&lt;br /&gt;              &quot;check-local&quot; =&gt; &quot;disable&quot;,&lt;br /&gt;              &quot;bin-environment&quot; =&gt;&lt;br /&gt;              (&quot;TRAC_ENV_PARENT_DIR&quot; =&gt; &quot;/var/lib/trac/&quot; )&lt;br /&gt;              #(&quot;TRAC_ENV&quot; =&gt; &quot;/var/lib/trac/android/&quot;)&lt;br /&gt;             )&lt;br /&gt;        )&lt;br /&gt;    )&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;modules裏加載mod_fastcgi，然後設定trac.fcgi的位置為一個變量(var.fcgi_binary)&lt;br /&gt;用RE設定網址/trac為fastcgi負責&lt;br /&gt;再設定trac需要的東東，大概就是這樣&lt;br /&gt;重點是lighttpd.conf&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;var.basedir  = &quot;/var/www&quot;&lt;br /&gt;var.logdir   = &quot;/var/log/lighttpd&quot;&lt;br /&gt;var.statedir = &quot;/var/lib/lighttpd&quot;&lt;br /&gt;&lt;br /&gt;# {{{ modules&lt;br /&gt;# At the very least, mod_access and mod_accesslog should be enabled.&lt;br /&gt;# All other modules should only be loaded if necessary.&lt;br /&gt;# NOTE: the order of modules is important.&lt;br /&gt;server.modules = (&lt;br /&gt;#    &quot;mod_rewrite&quot;,&lt;br /&gt;   &quot;mod_redirect&quot;,&lt;br /&gt;   &quot;mod_alias&quot;,&lt;br /&gt;    &quot;mod_access&quot;,&lt;br /&gt;#    &quot;mod_cml&quot;,&lt;br /&gt;#    &quot;mod_trigger_b4_dl&quot;,&lt;br /&gt;   &quot;mod_auth&quot;,&lt;br /&gt;#    &quot;mod_status&quot;,&lt;br /&gt;#    &quot;mod_setenv&quot;,&lt;br /&gt;#    &quot;mod_proxy&quot;,&lt;br /&gt;   &quot;mod_simple_vhost&quot;,&lt;br /&gt;#    &quot;mod_evhost&quot;,&lt;br /&gt;#    &quot;mod_userdir&quot;,&lt;br /&gt;#    &quot;mod_compress&quot;,&lt;br /&gt;#    &quot;mod_ssi&quot;,&lt;br /&gt;#    &quot;mod_usertrack&quot;,&lt;br /&gt;#    &quot;mod_expire&quot;,&lt;br /&gt;#    &quot;mod_secdownload&quot;,&lt;br /&gt;#    &quot;mod_rrdtool&quot;,&lt;br /&gt;#    &quot;mod_webdav&quot;,&lt;br /&gt;    &quot;mod_accesslog&quot;&lt;br /&gt;)&lt;br /&gt;# }}}&lt;br /&gt;&lt;br /&gt;# {{{ server settings&lt;br /&gt;server.username      = &quot;lighttpd&quot;&lt;br /&gt;server.groupname     = &quot;lighttpd&quot;&lt;br /&gt;&lt;br /&gt;server.document-root = var.basedir + &quot;/localhost&quot;&lt;br /&gt;server.pid-file      = &quot;/var/run/lighttpd.pid&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;auth.backend                   = &quot;htdigest&quot;&lt;br /&gt;auth.backend.htdigest.userfile = &quot;/etc/lighttpd/lighttpd-htdigest.user&quot; &lt;br /&gt;&lt;br /&gt;auth.require               = ( &lt;br /&gt;                              &quot;/trac/login&quot; =&gt;&lt;br /&gt;                              (&lt;br /&gt;                               &quot;method&quot;  =&gt; &quot;digest&quot;,&lt;br /&gt;                               &quot;realm&quot;   =&gt; &quot;Android&quot;,&lt;br /&gt;                               &quot;require&quot; =&gt; &quot;valid-user&quot;&lt;br /&gt;                              )&lt;br /&gt;                            )&lt;br /&gt;&lt;br /&gt;url.redirect = (&lt;br /&gt;    &quot;^/favicon.ico&quot;         =&gt;      &quot;/favicon.ico&quot;&lt;br /&gt;)&lt;br /&gt;# {{{ cgi includes&lt;br /&gt;# uncomment for cgi support&lt;br /&gt;#   include &quot;mod_cgi.conf&quot;&lt;br /&gt;# uncomment for php/fastcgi support&lt;br /&gt;  include &quot;mod_fastcgi.conf&quot;&lt;br /&gt;# }}}&lt;br /&gt;&lt;br /&gt;simple-vhost.server-root         = &quot;/var/www/tokyo-jupiter.sytes.net/&quot;&lt;br /&gt;simple-vhost.default-host        = &quot;tokyo-jupiter.sytes.net&quot;&lt;br /&gt;simple-vhost.document-root       = &quot;/&quot;&lt;br /&gt;$HTTP[&quot;host&quot;] == &quot;trac-site.net&quot; {&lt;br /&gt;    server.document-root = &quot;/var/www/trac-site.net/&quot; &lt;br /&gt;    dir-listing.activate = &quot;enable&quot; &lt;br /&gt;    auth.backend                   = &quot;htdigest&quot;&lt;br /&gt;    auth.backend.htdigest.userfile = &quot;/etc/lighttpd/lighttpd-htdigest.user&quot; &lt;br /&gt;    $HTTP[&quot;url&quot;] =~ &quot;^/trac/.*/login$&quot; {&lt;br /&gt;        auth.require               = ( &lt;br /&gt;                                      &quot;/&quot; =&gt;&lt;br /&gt;                                      (&lt;br /&gt;                                       &quot;method&quot;  =&gt; &quot;digest&quot;,&lt;br /&gt;                                       &quot;realm&quot;   =&gt; &quot;XxXxX&quot;,&lt;br /&gt;                                       &quot;require&quot; =&gt; &quot;valid-user&quot;&lt;br /&gt;                                      )&lt;br /&gt;                                    )&lt;br /&gt;    }&lt;br /&gt;    url.redirect = (&lt;br /&gt;        &quot;^/$&quot;             =&gt;      &quot;http://trac-site.net/trac/&lt;projectname&gt;/&quot;,&lt;br /&gt;        &quot;^/trac?$&quot;        =&gt;      &quot;http://trac-site.net/trac/&lt;projectname&gt;/&quot;&lt;br /&gt;    )&lt;br /&gt;    alias.url = (&quot;/trac/static&quot; =&gt; &quot;/var/lib/trac/static/&quot;)&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;上面不是完整的lighttpd.conf，因為太長了所以我刪了一些沒用的&lt;br /&gt;因為用了vhost module，所以vhost外面的設定會作為全局設定，vhost裏面的才是最後的&lt;br /&gt;認證那裏是用了htdigest，要用md5去生成那個htdigest.user檔案的內容&lt;br /&gt;alias.url是設定static網址的位置，/trac/static會指向/var/lib/trac/static/&lt;br /&gt;原來的document-root的內容則保留trac的東西&lt;br /&gt;url.redirect把/和/trac都重導向到/trac/&lt;projectname&gt;&lt;br /&gt;&lt;br /&gt;trac的帳號是用http的登入方法，所以認證是由lighttpd負責的&lt;br /&gt;雖然http本身不是很安全，但官方建議盡量用digest&lt;br /&gt;我這個網站就只有trac，因此我做了redirect</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/6966308552292265437/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=6966308552292265437&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/6966308552292265437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/6966308552292265437'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2010/07/trac-lighttpd.html' title='trac + lighttpd'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>嘉模堂區, 澳門</georss:featurename><georss:point>22.162223987295476 113.560990691185</georss:point><georss:box>22.161602987295478 113.560078691185 22.162844987295475 113.561902691185</georss:box></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-2237942983970663297</id><published>2010-04-22T20:22:00.001+08:00</published><updated>2010-04-22T21:35:46.380+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>LVM</title><content type='html'>因為Ubuntu自動分區是使用了LVM&lt;br /&gt;所以我也研究了一下LVM&lt;br /&gt;目前只知道它的好處是，日後能調整分區的大小&lt;br /&gt;例如買了隻新的HDD，可以把partition加進去現有的partition&lt;br /&gt;類似raid0，不過partition的大小可以不同&lt;br /&gt;可以是同一隻HDD裏面的，而LVM主要不是提高性能用&lt;br /&gt;我是參考了這個&lt;a href=&quot;http://tldp.org/HOWTO/LVM-HOWTO/index.html&quot;&gt;HOWTO&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;先簡單介紹LVM吧&lt;br /&gt;LVM就是Logical Volume Manager&lt;br /&gt;它可以在一個partition裏分割出幾個logical volume(LV)&lt;br /&gt;每一個LV都可以當成普通的partition去建立檔案系統和掛載&lt;br /&gt;而LV是建立在一個volume group(VG)裏面的&lt;br /&gt;一個VG又可以包含好幾個physical volume(PV)&lt;br /&gt;而PV就是普通的partition&lt;br /&gt;（借用HOWTO裏的圖～）&lt;br /&gt;&lt;pre&gt;    hda1   hdc1      (PV:s on partitions or whole disks)                        &lt;br /&gt;       \   /                                                                    &lt;br /&gt;        \ /                                                                     &lt;br /&gt;       diskvg        (VG)                                                       &lt;br /&gt;       /  |  \                                                                  &lt;br /&gt;      /   |   \                                                                 &lt;br /&gt;  usrlv rootlv varlv (LV:s)&lt;br /&gt;    |      |     |                                                              &lt;br /&gt; ext2  reiserfs  xfs (filesystems) &lt;/pre&gt;&lt;br /&gt;除始之外，PE和LE是PV和LV裏的基本單位&lt;br /&gt;&lt;br /&gt;我只研究了最基本的建立LVM partition方法&lt;br /&gt;在Ubuntu 9.10的環境&lt;br /&gt;先分好區，這裏分了3個分區&lt;br /&gt;/dev/sda1是/boot、/dev/sda2是Logical Partition&lt;br /&gt;/dev/sda5是/和swap（都在同一個Volume裏）&lt;br /&gt;因為/boot不需要LVM所以這裏不需要理會&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;&lt;br /&gt;#( 先把/dev/sda5建立為PV )&lt;br /&gt;$ sudo pvcreate /dev/sda5&lt;br /&gt;#( 然後把它加進新的VG )&lt;br /&gt;$ sudo vgcreate vgname /dev/sda5&lt;br /&gt;#( 最後在VG裏分割出兩個LV作為/和swap )&lt;br /&gt;$ sudo lvcreate -L 20G -n root vgname&lt;br /&gt;$ sudo lvcreate -l 100%FREE -n swap vgname&lt;br /&gt;#( -L用來指定大小，-l是用百分比來指定，XX%FREE是指剩餘空間的XX％ )&lt;br /&gt;#( -n就是LV的名字 )&lt;br /&gt;#( 建好後的LV就在/dev/mapper/下面 )&lt;br /&gt;#( /dev/mapper/vgname-root和/dev/mapper/vgname-swap )&lt;br /&gt;&lt;/i&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/2237942983970663297/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=2237942983970663297&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2237942983970663297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2237942983970663297'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2010/04/lvm.html' title='LVM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-8587568511331327584</id><published>2010-04-22T19:44:00.001+08:00</published><updated>2010-04-22T19:53:53.073+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Software"/><title type='text'>重裝grub2</title><content type='html'>現在Ubuntu已經改用Grub2&lt;br /&gt;雖然還不太清濋有甚麼好處，但抱着嘗鮮的心態我裝了個Ubuntu 9.10玩&lt;br /&gt;然後發現Grub2的改動很大&lt;br /&gt;首先/boot/grub/grub.cfg的內容是自動產生的&lt;br /&gt;然後grub的設定檔分散在/etc下面&lt;br /&gt;還在研究怎麼修改它&lt;br /&gt;&lt;br /&gt;如果是要重裝grub2的話&lt;br /&gt;（例如裝了windows要再安裝它）&lt;br /&gt;比舊版本麻煩得多&lt;br /&gt;先要有可以開機的Linux，這個可以用Ubuntu的Live CD&lt;br /&gt;啟動入了系統後&lt;br /&gt;要掛載目標系統的&lt;abbr title=&quot;(root)&quot;&gt;/&lt;/abbr&gt;和/boot&lt;br /&gt;再用chroot進入目標系統的環境&lt;br /&gt;這裏假設/在/dev/sda5、/boot在/dev/sda1&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;&lt;br /&gt;#( 先把root掛在/media/cdrom0 )&lt;br /&gt;$ sudo mount /dev/sda5 /media/cdrom0&lt;br /&gt;#( 然後是/boot )&lt;br /&gt;$ sudo mount /dev/sda1 /media/cdrom0/boot&lt;br /&gt;#( 還需要/dev和/proc )&lt;br /&gt;$ sudo mount --bind /dev /media/cdrom0/dev&lt;br /&gt;$ sudo mount -t proc /media/cdrom0/proc&lt;br /&gt;#( 可以chroot啦 )&lt;br /&gt;$ sudo chroot /media/cdrom0/ /bin/bash&lt;br /&gt;#&lt;br /&gt;#( 然後會得到一個root shell，可以安裝grub2到mbr了 )&lt;br /&gt;# sudo grub-install --recheck /dev/sda&lt;br /&gt;#( unmount所有分區再reboot就可以進入系統了 )&lt;br /&gt;# exit&lt;br /&gt;$ sudo umount /media/cdrom0/proc&lt;br /&gt;$ sudo umount /media/cdrom0/dev&lt;br /&gt;$ sudo umount /media/cdrom0/boot&lt;br /&gt;$ sudo umount /media/cdrom0/&lt;br /&gt;$ sudo reboot&lt;br /&gt;&lt;/i&gt;&lt;/blockquote&gt;完成了～&lt;br /&gt;更多關於Grub2的資料在&lt;a href=&quot;http://wiki.ubuntu-tw.org/index.php?title=GRUB_2_%E4%B8%AD%E6%96%87%E6%8C%87%E5%8D%97#.E5.8D.87.E7.B4.9A.E8.87.B3_GRUB_2&quot;&gt;Ubuntu wiki&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/8587568511331327584/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=8587568511331327584&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/8587568511331327584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/8587568511331327584'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2010/04/grub2.html' title='重裝grub2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-3102885097244522957</id><published>2010-02-01T00:30:00.003+08:00</published><updated>2010-03-16T16:57:20.092+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Software"/><title type='text'>Linux 顯卡硬解－續</title><content type='html'>Linux平台下的硬解實現已經很成熟啦&lt;br /&gt;我現在的環境是&lt;br /&gt;sys-kernel/gentoo-sources-2.6.31-r6&lt;br /&gt;x11-drivers/nvidia-drivers-185.18.36&lt;br /&gt;media-video/mplayer-1.0_rc4_p20091026-r1&lt;br /&gt;media-video/smplayer-0.6.8&lt;br /&gt;&lt;br /&gt;在smplayer裏有vdpau的選擇&lt;br /&gt;使用的話播放H264編碼的video CPU使用率非常低&lt;br /&gt;以我的E4500為例，播於youtube下載回來的高清格式影片&lt;br /&gt;使用xv的話約40％&lt;br /&gt;使用vdpau的話約10％&lt;br /&gt;差距非常之大&lt;br /&gt;影視效果以肉眼看不到多大分別&lt;br /&gt;&lt;br /&gt;不過現在smplayer用vdpau有個問題&lt;br /&gt;就是不能screenshot&lt;br /&gt;（就不能截圖啦）&lt;br /&gt;因為用vdpau的話mplayer會取消所有filter&lt;br /&gt;其中包括了screenshot&lt;br /&gt;所以用了vdpau就會有部份功能沒有了</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/3102885097244522957/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=3102885097244522957&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/3102885097244522957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/3102885097244522957'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2010/02/linux.html' title='Linux 顯卡硬解－續'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-1882311591883707137</id><published>2009-12-31T23:48:00.009+08:00</published><updated>2010-01-01T00:34:40.786+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>Gentoo &amp; synaptics</title><content type='html'>synaptics是touch pad的驅動&lt;br /&gt;用HAL來自動設定的話很簡單&lt;br /&gt;在/etc/make.conf裏的INPUT_DEVICES裏加入evdev synaptics&lt;br /&gt;INPUT_DEVICES=&quot;evdev synaptics&quot;&lt;br /&gt;然後use裏面加入hal&lt;br /&gt;emerge -DaNu world&lt;br /&gt;確保需要的東西都安裝好，例如input-synaptics&lt;br /&gt;最後要讓hal daemon每次開機都啟動&lt;br /&gt;# rc-update add hald default&lt;br /&gt;這樣就能用touch pad了，而keyboard mouse則由evdev負責，基本上都沒甚麼需要設定了&lt;br /&gt;keyboard主要是交換按鍵（例如Ctrl和Caps Lock）&lt;br /&gt;Mouse就不用怎麼搞的（上下左右scrolling都可以用啦～）&lt;br /&gt;但touch pad可能要設定一下，因為預設並不是太適用&lt;br /&gt;本身是只有上下scrolling沒有左右，也沒有Tap（即是碰一下touch pad就等於按一下左鍵）&lt;br /&gt;要改設定首先去把設定檔cp過去/etc&lt;br /&gt;# cp /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi /etc/hal/fdi/policy/&lt;br /&gt;&lt;br /&gt;然後修改/etc/hal/fdi/policy/11-x11-synaptics.fd，加入下面三行&lt;br /&gt;&lt;blockquote style=&quot;font-style:italic;&quot;&gt;&lt;pre&gt;&lt;br /&gt;        &amp;lt;merge key=&quot;input.x11_options.VertEdgeScroll&quot; type=&quot;string&quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;        &amp;lt;merge key=&quot;input.x11_options.HorizEdgeScroll&quot; type=&quot;string&quot;&amp;gt;true&amp;lt;/merge&amp;gt;&lt;br /&gt;        &amp;lt;merge key=&quot;input.x11_options.TapButton1&quot; type=&quot;string&quot;&amp;gt;false&amp;lt;/merge&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;這樣會啟用上下左右scrolling和取消tap&lt;br /&gt;更多的選項可以用synclient -l查看&lt;br /&gt;synclient也可以即時修改synaptics的設定，不過想要永久修改的話需要改/etc下面的&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;或者我加些說明吧&lt;br /&gt;現在X.org是由evdev module來處理keyboard mouse等input device&lt;br /&gt;需synaptics依舊是驅動touch pad的&lt;br /&gt;X.org也用上了HAL來操作實體硬件，所以可以用hal來設定各樣input device&lt;br /&gt;這樣一來再也不需要/etc/X11/xorg.conf了</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/1882311591883707137/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=1882311591883707137&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/1882311591883707137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/1882311591883707137'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/12/gentoo-synaptics.html' title='Gentoo &amp; synaptics'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-1361035437477457152</id><published>2009-12-22T20:50:00.003+08:00</published><updated>2009-12-22T21:06:49.179+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Software"/><title type='text'>emesene 1.5.1</title><content type='html'>由於eMeSeNe 1.5改動很大&lt;br /&gt;加入了視像聊天的功能，也修複了很多Bug&lt;br /&gt;但預設不能顯示M群的名字&lt;br /&gt;&lt;br /&gt;其實emesene存在這個功能，不過預設沒有打開&lt;br /&gt;只要到選項－》連線－》MSN群組聊天時顯示聯絡人名稱&lt;br /&gt;然後重新啟動&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_0AtKKluj3PI/SzDD-yINHWI/AAAAAAAADzs/U9MQEIDAnLY/s1600-h/MSN.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 395px; height: 400px;&quot; src=&quot;http://3.bp.blogspot.com/_0AtKKluj3PI/SzDD-yINHWI/AAAAAAAADzs/U9MQEIDAnLY/s400/MSN.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5418045835102199138&quot; /&gt;&lt;/a&gt;&lt;br /&gt;這樣就可以繼續用M群了～</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/1361035437477457152/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=1361035437477457152&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/1361035437477457152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/1361035437477457152'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/12/emesene-151.html' title='emesene 1.5.1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_0AtKKluj3PI/SzDD-yINHWI/AAAAAAAADzs/U9MQEIDAnLY/s72-c/MSN.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-2488795906768876066</id><published>2009-08-31T11:35:00.005+08:00</published><updated>2010-05-23T10:43:36.207+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux資料"/><title type='text'>rsync 小技巧</title><content type='html'>rsync是用來做遠端同步的東西&lt;br /&gt;它可以只傳輸不同的部份，籍此加速傳輸&lt;br /&gt;我用rsync來同步整個root目錄，不同步其他檔案系統的文件&lt;br /&gt;消耗寬頻只有幾百KB，cpu佔用也不大&lt;br /&gt;相當好~&lt;br /&gt;&lt;br /&gt;我用來同步的命令是這樣：&lt;br /&gt;&lt;blockquote&gt;rsync -xavz -e &#39;ssh -i /home/username/.ssh/id_dsa&#39; --rsync-path=&#39;sudo rsync&#39;  \&lt;br /&gt;--exclude-from=/etc/file.ex     \&lt;br /&gt;--delete-delay                  \&lt;br /&gt;username@remotehost:/ /&lt;/blockquote&gt;&lt;br /&gt;用來把remote host的/同步到local machine&lt;br /&gt;由於我disable了root login，用一個有sudo能力的normal user&lt;br /&gt;所以就要定義--rsync-path參，令到rsync在remote host執行之前先取得super user power&lt;br /&gt;-e參數是設定使用ssh，在ssh後面加上 -i 來指定私匙&lt;br /&gt;這樣把user的公匙cp到remote就可以免密碼登入ssh&lt;br /&gt;-xavz的意思分別是：&lt;br /&gt;x：只同步同一filesystem內的文件（同一個partition內）&lt;br /&gt;a：archive樣式，一般都會加上的。同步整個目錄再保留所有權限設定&lt;br /&gt;v：顯示同步時的一些訊息&lt;br /&gt;z：啟用壓縮傳輸，可以大大節省頻寬&lt;br /&gt;--delete-delay會在同步時先檢查哪些文件只存在於local machine，在remote host裹不存在的&lt;br /&gt;然後把它們刪除&lt;br /&gt;&lt;br /&gt;/etc/file.ex是用來排除一些不需要同步的檔案&lt;br /&gt;&lt;blockquote&gt;# cat /etc/file.ex &lt;br /&gt;.bash_history&lt;br /&gt;/home/*&lt;br /&gt;/mnt/*&lt;br /&gt;/tmp/*&lt;br /&gt;/proc/*&lt;br /&gt;/sys/*&lt;br /&gt;/dev/*&lt;br /&gt;/etc/mtab&lt;br /&gt;/etc/fstab&lt;br /&gt;/etc/ssh/ssh_host_*&lt;br /&gt;/etc/network/interfaces&lt;br /&gt;/etc/hostname&lt;br /&gt;/boot/*&lt;br /&gt;/etc/file.ex&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;此exclude file還可以用在tar把包做whole system backup&lt;br /&gt;/boot/*的意思是不archive /boot下面的文係，但會archive一個空的/boot directory&lt;br /&gt;這樣解壓縮去一個新的system時就會有一個空的/boot讓我們用&lt;br /&gt;&lt;br /&gt;++++++++++++++++++++++++++&lt;br /&gt;還有一個要注意的地方&lt;br /&gt;rsync的兩個directory都需要用/完結的&lt;br /&gt;不然會在目標目錄下再建一個source directory</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/2488795906768876066/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=2488795906768876066&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2488795906768876066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2488795906768876066'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/08/rsync.html' title='rsync 小技巧'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-8941488980100107635</id><published>2009-08-28T17:23:00.000+08:00</published><updated>2009-08-28T17:41:12.931+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>hostname</title><content type='html'>Linux改hostname可以用&lt;span style=&quot;font-style:italic;&quot;&gt;hostname&lt;/span&gt;這個命令&lt;br /&gt;但我發現每次重新啟動都會失效&lt;br /&gt;估計Linux啟動時會讀取&lt;span style=&quot;font-style:italic;&quot;&gt;/etc/hostname&lt;/span&gt;檔案內的文字作為hostname&lt;br /&gt;所以最直接改hostname的方法還是編輯&lt;span style=&quot;font-style:italic;&quot;&gt;/etc/hostname&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/8941488980100107635/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=8941488980100107635&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/8941488980100107635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/8941488980100107635'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/08/hostname.html' title='hostname'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-3518157992828692411</id><published>2009-06-26T11:36:00.003+08:00</published><updated>2009-08-28T00:30:21.332+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="網絡應用"/><title type='text'>ssh hostname</title><content type='html'>ssh可以設定一個簡短的hostname來連接指定的主機&lt;br /&gt;例如把root@192.168.12.34設定成pc1&lt;br /&gt;編輯&lt;span style=&quot;font-style:italic;&quot;&gt;~/.ssh/config&lt;/span&gt;&lt;br /&gt;加入:&lt;br /&gt;&lt;blockquote&gt;Host pc1&lt;br /&gt;    Hostname 192.168.12.34&lt;br /&gt;    User     root&lt;/blockquote&gt;&lt;br /&gt;這樣&lt;span style=&quot;font-style:italic;&quot;&gt;ssh pc1&lt;/span&gt;就等於&lt;span style=&quot;font-style:italic;&quot;&gt;ssh root@192.168.12.34&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://cloud-support.engineyard.com/faqs/ssh/how-to-configure-an-ssh-host-name&quot;&gt;via&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/3518157992828692411/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=3518157992828692411&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/3518157992828692411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/3518157992828692411'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/06/ssh-hostname.html' title='ssh hostname'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-7343949528709633422</id><published>2009-05-20T13:42:00.003+08:00</published><updated>2009-06-14T12:42:33.463+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux資料"/><title type='text'>swap control and caps_lock</title><content type='html'>以前Sun的server鍵盤和現在的不一樣&lt;br /&gt;最主要的特點是沒Caps Lock鍵，在那個位置的是Control鍵&lt;br /&gt;這個設計我覺得比$M的好，相信很多人都認同這點&lt;br /&gt;所以X.org可以把這兩個鍵交換&lt;br /&gt;&lt;br /&gt;編輯X.org的設定檔&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;#vim /etc/X11/xorg.conf&lt;/span&gt;&lt;br /&gt;在&lt;abbr title=&quot;當然是keyboard的那個section&quot;&gt;Input Device Section&lt;/abbr&gt;裏加上這句&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Option &quot;XkbOptions&quot; &quot;ctrl:swapcaps&quot;&lt;/span&gt;&lt;br /&gt;我的大概是這樣：&lt;br /&gt;&lt;blockquote&gt;Section &quot;InputDevice&quot;&lt;br /&gt;       Identifier  &quot;Keyboard0&quot;&lt;br /&gt;       Driver      &quot;keyboard&quot;&lt;br /&gt;       Option      &quot;CoreKeyboard&quot;&lt;br /&gt;       Option &quot;XkbRules&quot; &quot;xorg&quot;&lt;br /&gt;       Option &quot;XkbModel&quot; &quot;pc105&quot;&lt;br /&gt;       Option &quot;XkbLayout&quot; &quot;us&quot;&lt;br /&gt;       Option  &quot;XkbOptions&quot;    &quot;ctrl:swapcaps&quot;&lt;br /&gt;# Option &quot;XkbVariant&quot; &quot;nodeadkeys&quot;&lt;br /&gt;EndSection&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;這樣左邊的Control鍵就變成Caps_Lock，而原本的Caps_Lock鍵就等於Control&lt;br /&gt;右邊的Control則不變&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.linuxquestions.org/linux/answers/Hardware/Getting_Control_on_Caps_Lock_A_How_To&quot;&gt;via&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;+++++++++++++++++++++++++++++++++++&lt;br /&gt;其實Gnome本身的鍵盤配置就可以設定</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/7343949528709633422/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=7343949528709633422&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/7343949528709633422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/7343949528709633422'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/05/swap-control-and-capslock.html' title='swap control and caps_lock'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-8675907369069457310</id><published>2009-04-05T13:21:00.004+08:00</published><updated>2009-04-18T18:41:26.420+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>Gentoo overlay</title><content type='html'>Gentoo的portage設計真的不錯&lt;br /&gt;裏面本身有很多package，但還可以用overlay的方式去擴充&lt;br /&gt;例如想在本機建一個overlay，先建一個目錄&lt;br /&gt;然後在/etc/make.conf裏加上那個目錄，例如：&lt;br /&gt;&lt;blockquote&gt;PORTDIR_OVERLAY=&quot;$PORTDIR_OVERLAY&lt;br /&gt;/opt/portage/&lt;/blockquote&gt;&lt;br /&gt;在裏面放入你需要新增的ebuil，不過要按照portage的方式放置&lt;br /&gt;例如gajim&lt;br /&gt;要擺在&lt;span style=&quot;font-style:italic;&quot;&gt;net-im/gajim/&lt;/span&gt;下面，因為gajim在portage裏面是net-im/gajim&lt;br /&gt;最後還要建一個Manifest的文件，是用ebuild manifest生成的&lt;br /&gt;主要是用來校驗下載回來的源碼&lt;br /&gt;&lt;br /&gt;擧一個比較具體的例子吧，&lt;br /&gt;/opt/portage目錄是我的overlay，已經在make.conf裏加在PORTDIR_OVERLAY&lt;br /&gt;由於portage裏的是gajim-0.11.4，版本比較舊&lt;br /&gt;我想加入個gajim-0.12.1的ebuild&lt;br /&gt;先把portage裏面gajim-0.11.4.ebuild cp去overlay下面&lt;br /&gt;&lt;blockquote&gt;$cp /usr/portage/net-im/gajim/gajim-0.11.4.ebuild /opt/portage/net-im/gajim/&lt;br /&gt;$mv gajim-0.11.4.ebuild gajim-0.12.1.ebuild&lt;br /&gt;# gajim-0.12.1的ebuild就是把0.11.4改名過來的囧&lt;br /&gt;$ebuild /opt/portage/net-im/gajim/gajim-0.12.1.ebuild manifest&lt;br /&gt;# 這様把Manifest搞出來&lt;br /&gt;$ls /opt/portage/net-im/gajim&lt;br /&gt;gajim-0.12.1.ebuild  Manifest&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;最後就是用emerge安裝gajim</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/8675907369069457310/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=8675907369069457310&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/8675907369069457310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/8675907369069457310'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/04/gentoo-overlay.html' title='Gentoo overlay'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-3655653657542215157</id><published>2009-02-01T22:45:00.005+08:00</published><updated>2009-02-06T01:11:15.275+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux軟件編譯"/><title type='text'>ebuild usage</title><content type='html'>Gentoo的emerge其實都是安裝ebuild&lt;br /&gt;其間共有五個過程：unpack, compile, install, qmerge, clean&lt;br /&gt;手動安裝一個package就是先unpack&lt;br /&gt;之後可以修改一下源碼再compile&lt;br /&gt;compil完繼續剩餘的步驟, install, qmerge, clean&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ebuild /path/to/the/ebuild unpack&lt;br /&gt;# do something&lt;br /&gt;ebuild /path/to/the/ebuild compile&lt;br /&gt;ebuild /path/to/the/ebuild install qmerge clean&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;想修改portage裏某個package的ebuild又不想建一個新的overlay&lt;br /&gt;可以cp portage裏的ebuild去某個地方然後改改它&lt;br /&gt;再用以上方法安裝</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/3655653657542215157/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=3655653657542215157&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/3655653657542215157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/3655653657542215157'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/02/ebuild-usage.html' title='ebuild usage'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-468276429568746004</id><published>2009-02-01T20:41:00.003+08:00</published><updated>2009-02-01T20:57:39.116+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux軟件編譯"/><title type='text'>cairo-1.8.6 in gentoo</title><content type='html'>Portage裏的cairo-1.8.6有Bug，Firefox等部份program會Crash&lt;br /&gt;貌似是cairo本身的問題&lt;br /&gt;&lt;a href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=250159&quot;&gt;http://bugs.gentoo.org/show_bug.cgi?id=250159&lt;/a&gt;&lt;br /&gt;bug report裏提供了&lt;a href=&quot;http://cgit.freedesktop.org/cairo/patch/?id=efa9e1088cbf1b5331cc0bab3348520f3b91ae4b&quot;&gt;一個補丁&lt;/a&gt;，打了就沒問題&lt;br /&gt;&lt;br /&gt;打補丁的辦法應該有很多，但我只Google到&lt;a href=&quot;http://www.linuxsir.org/bbs/post1908620-6.html&quot;&gt;這個&lt;/a&gt;&lt;br /&gt;具體為:&lt;br /&gt;&lt;blockquote&gt;# ebuild /usr/portage/x11-libs/cairo/cairo-1.8.6.ebuild unpack&lt;br /&gt;# cd /var/tmp/portage/x11-libs/cairo-1.8.6/work/cairo-1.8.6/&lt;br /&gt;# patch -p 1 &lt; /opt/portage/cairo.patch &lt;br /&gt;# ebuild /usr/portage/x11-libs/cairo/cairo-1.8.6.ebuild compile&lt;br /&gt;# ebuild /usr/portage/x11-libs/cairo/cairo-1.8.6.ebuild install qmerge clean&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/468276429568746004/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=468276429568746004&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/468276429568746004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/468276429568746004'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/02/cairo-186-in-gentoo.html' title='cairo-1.8.6 in gentoo'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-4706255898087321393</id><published>2009-01-02T01:02:00.002+08:00</published><updated>2009-01-02T01:09:47.689+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>tar + lzma</title><content type='html'>lzma是一個壓縮高同時速度不慢的壓縮算法&lt;br /&gt;我比較過，它的速度比bz2快很多同時壓縮比差不多&lt;br /&gt;我覺得lzma真是很優秀的算法&lt;br /&gt;&lt;br /&gt;lzma和gzip一樣，只對付單個文件&lt;br /&gt;不過這也足夠了，因為我們有tar(反正tar把包更好，因為權限也能保留）&lt;br /&gt;lzma可以和管道（|）配合操作，所以能和tar配合&lt;br /&gt;lzma -c即是用stdin和stdout來輸入或輸出（man裏只寫了stdin，其實stdout也可以的）&lt;br /&gt;舉例：&lt;br /&gt;&lt;blockquote&gt;tar cf - /files | lzma -zc &gt; files.tar.lzma    # 這是壓縮&lt;br /&gt;lzma -dc files.tar.lzma | tar x                # 這是解壓縮，解壓縮時也能使用tar本身的功能（保留權限）&lt;br /&gt;lzma -dc files.tar.lzma | tar t                # 這是列出壓縮檔裏的文件，其他的用法就自行發揮吧～&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/4706255898087321393/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=4706255898087321393&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/4706255898087321393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/4706255898087321393'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2009/01/tar-lzma.html' title='tar + lzma'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-5799539652409154723</id><published>2008-12-31T00:50:00.004+08:00</published><updated>2009-03-25T23:41:35.482+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>SSHFS</title><content type='html'>昨天架起的Atom電腦已經正常運作了一天，一切正常&lt;br /&gt;用NFS分享了一個只讀的目錄，任何主機都可以掛載&lt;br /&gt;想再設定一個可讀寫的，但沒有效果&lt;br /&gt;於是用SSHFS掛上/&lt;br /&gt;&lt;br /&gt;SSHFS是透過FUSE＋SSH來分享檔案的，就像把SFTP掛在某個目錄&lt;br /&gt;但每次掛載都要輸入密碼，上網查到&lt;a href=&quot;http://go-linux.blogspot.com/2007/11/fusesshfs.html&quot;&gt;這個方法&lt;/a&gt;可以免密碼登入&lt;br /&gt;原來ssh登入可以靠密匙而不用輸入密碼&lt;br /&gt;基本過程是，client建立一條密匙，把公匙複制到server端加在~/.ssh/authorized_keys&lt;br /&gt;client先建立一條dsa密匙：&lt;br /&gt;&lt;blockquote&gt;$ssh-keygen -t dsa&lt;/blockquote&gt;&lt;br /&gt;一路按Enter即可&lt;br /&gt;注意： 要在登入的電腦執行，不是被登入的電腦&lt;br /&gt;然後把~/.ssh/id_dsa.pub複制到server（假設我複制到/tmp)&lt;br /&gt;在server執行：&lt;br /&gt;&lt;blockquote&gt;cat /tmp/id_dsa.pub &gt; ~/.ssh/authorized_keys &lt;/blockquote&gt;&lt;br /&gt;想要哪個user免密碼登入就複制到該user的home目錄下面&lt;br /&gt;注意： server要的是id_dsa.pub而不是id_dsa&lt;br /&gt;&lt;br /&gt;然後就搞定了！&lt;br /&gt;&lt;br /&gt;+++++++++++++++++++++&lt;br /&gt;原來NFS掛的雖然是目錄，但是對分區有效的&lt;br /&gt;即是我掛上了/，但實際上是/這锢分區，其他分區是無法訪問的&lt;br /&gt;所以要管理文件還是用ssh好了</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/5799539652409154723/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=5799539652409154723&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/5799539652409154723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/5799539652409154723'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/12/sshfs.html' title='SSHFS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-2991351149806510610</id><published>2008-12-30T00:14:00.002+08:00</published><updated>2008-12-30T00:29:32.223+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux軟件編譯"/><title type='text'>Gentoo in Atom</title><content type='html'>成功把Atom啟動了&lt;br /&gt;安裝Gentoo的過程依然花了&lt;a href=&quot;http://tokyo-jupiter.blogspot.com/2008/12/atom.html&quot;&gt;很多時間&lt;/a&gt;&lt;br /&gt;安裝時寫CHOST和配置內核主要參看了&lt;a href=&quot;http://en.gentoo-wiki.com/wiki/Inspiron_Mini&quot;&gt;這裏&lt;/a&gt;，其餘都是按照&lt;a href=&quot;http://www.gentoo.org/doc/en/handbook/handbook-x86.xml&quot;&gt;手册&lt;/a&gt;去做&lt;br /&gt;&lt;br /&gt;雖然過程不太順利&lt;br /&gt;安裝Gentoo用的媒體是Prayaya Live USB&lt;br /&gt;我下載了&lt;a href=&quot;http://club.prayaya.com/thread-3719-1-1.html&quot;&gt;Prayaya Q3版&lt;/a&gt;，但需要在Windows下安裝（因為我不懂如何在Linux下安裝Grub4dos...）&lt;br /&gt;啟動後發現沒有ssh，只好用apt裝。單單是update就花了兩個多小時（因為它默認的源太慢了！）&lt;br /&gt;然後audacious又有依賴問題，要先干掉它才能裝ssh（還要改root密碼)&lt;br /&gt;現在這隻Prayaya Live USB一啟動好就能用ssh登入操控&lt;br /&gt;&lt;br /&gt;接下來的事就用Prayaya來裝Gentoo，一切就如手册寫的那樣&lt;br /&gt;但不知何解這台機有時一啟動就重啟，不知是內核的問題還是硬件的問題（估計是內核）&lt;br /&gt;但偶爾會啟動成功，啟動後甚麼問題也沒有&lt;br /&gt;裝好基本系統就裝個ssh&lt;br /&gt;但發現網卡驅動不了，上網查了一下&lt;br /&gt;原來Realtek RTL8101E用的模塊是r8169，在1000M裏面（但說明上明明寫着是10/100）&lt;br /&gt;編譯好該模塊後上網正常&lt;br /&gt;因為我有Router，用DHCP分配IP&lt;br /&gt;這樣一啟動好電腦後就可以用ssh登入控制系統&lt;br /&gt;即使重啟後也沒有問題～&lt;br /&gt;&lt;br /&gt;再安裝deluge和amule，&lt;abbr title=&quot;花了一天的時間搞這個囧&quot;&gt;大功告成！&lt;/abbr</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/2991351149806510610/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=2991351149806510610&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2991351149806510610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2991351149806510610'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/12/gentoo-in-atom.html' title='Gentoo in Atom'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-7558261911845219287</id><published>2008-11-17T23:32:00.003+08:00</published><updated>2008-11-17T23:42:32.390+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>Linux硬解</title><content type='html'>之前以為自己已經打開了硬解&lt;br /&gt;誰不知並沒有真正的用了硬解，正常用CPU解碼就是20%~40%&lt;br /&gt;看了&lt;a href=&quot;http://linuxtoy.org/archives/linux-video-decode.html&quot;&gt;Toy&lt;/a&gt;才知道事實呢T.T&lt;br /&gt;&lt;br /&gt;幸好nVidia的驅動也支援硬解，用它提供的&lt;abbr title=&quot;(The Video Decode and Presentation API for Unix)&quot;&gt;VDPAU API&lt;/abbr&gt;&lt;br /&gt;不過mplayer要打過補丁才能用&lt;br /&gt;我還是等mplayer更新了支持才試試&lt;br /&gt;反正現在能看高清就算了&lt;br /&gt;&lt;br /&gt;BTW&lt;br /&gt;&lt;a href=&quot;http://labs.adobe.com/downloads/flashplayer10.html&quot;&gt;64bit版的FlashPlayer&lt;/a&gt;終於出了&lt;br /&gt;之前還在愁64bit的系統怎麼看Flash，因為我想用自己compile的Firefox&lt;br /&gt;不想用32bit的Bin版，自己compile的快得多呢</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/7558261911845219287/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=7558261911845219287&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/7558261911845219287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/7558261911845219287'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/11/linux.html' title='Linux硬解'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-2931224576812097896</id><published>2008-11-12T11:51:00.002+08:00</published><updated>2008-11-12T11:57:34.823+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>Aspire One升級Kernel-2.6.27</title><content type='html'>昨天把&lt;abbr title=&quot;Acer Aspire One&quot;&gt;AA1&lt;/abbr&gt;升級到Kernel-2.6.27&lt;br /&gt;新內核直接支持無線網卡了&lt;br /&gt;這樣就不需要madwifi啦，只要加載模塊ath5k就可以&lt;br /&gt;但這樣無線網卡會由ath0改變成wlan0&lt;br /&gt;(用iwconfig查看得知）&lt;br /&gt;連接時需要把原來的ath0改成wlan0&lt;br /&gt;&lt;br /&gt;例如我用wicd&lt;br /&gt;要在Preference裏把wireless interface改成wlan0&lt;br /&gt;還有Driver要用wext</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/2931224576812097896/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=2931224576812097896&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2931224576812097896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2931224576812097896'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/11/aspire-onekernel-2627.html' title='Aspire One升級Kernel-2.6.27'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-7125223952417899091</id><published>2008-08-26T17:57:00.002+08:00</published><updated>2008-08-26T18:06:16.354+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>ArchLinux on Acer Aspire One</title><content type='html'>/昨天把Acer Aspire One買了回來&lt;br /&gt;要的是8G SSD版，雖然網上的規格是512MB，但我買回來的有1G RAM&lt;br /&gt;不知道是有兩毎型號還是網上的規格表打錯了？&lt;br /&gt;&lt;br /&gt;先講講為甚麼要換掉原來那個系統&lt;br /&gt;Aspire One原本是用Linpus的，但那個並不是完全版的&lt;br /&gt;只有少數幾個Porgram，又不能自己安裝程式&lt;br /&gt;基本上就像一本『好易通』&lt;br /&gt;所以用了&lt;abbr title=&quot;為甚麼要用十五分鐘？因為我要用五分鐘把Arch的USB img下載回來&quot;&gt;十五分鐘&lt;/abbr&gt;就&lt;abbr title=&quot;反正又有隻還原光碟，壞了也可以回去。雖然我絕對不會用那個Linpus&quot;&gt;把它刪掉了&lt;/abbr&gt;&lt;br /&gt;而且作為一個DIYer，當然要把這台Aspire One發揮超過100%的功用&lt;br /&gt;&lt;br /&gt;先講講現在支援得怎樣&lt;br /&gt;基本上所有硬件都支援，wifi只要安裝打過補丁的madwifi mod就可以了&lt;br /&gt;還未能解決的問題有︰&lt;br /&gt;Card reader需要在開機前把卡插上才能認出&lt;br /&gt;左邊的SD卡用ext3格式的話不能suspend，否則文件系統會&lt;abbr title=&quot;原因暫時不明&quot;&gt;壞掉&lt;/abbr&gt;&lt;br /&gt;那些快捷鍵只有幾個能用&lt;br /&gt;最後就是啟動速度沒原來的快(囧)&lt;br /&gt;&lt;br /&gt;安裝過程基本就像正常安裝Archlinux一樣，只是有&lt;a href=&quot;http://wiki.archlinux.org/index.php/Acer_Aspire_One&quot;&gt;這些要點需注意&lt;/a&gt;&lt;br /&gt;因為安裝在SSD上，SSD的寫入次數是有限制的&lt;br /&gt;所以不能把swap分區放在SSD裏&lt;br /&gt;使用ext3格式也要加上參數&lt;br /&gt;減低寫入的次數&lt;br /&gt;&lt;br /&gt;/home就用左邊的SD卡，反正SD卡比較便宜&lt;br /&gt;寫入操作大都放在那裏吧&lt;br /&gt;pacman的cache都放在SD卡裏，設定在pacman.conf&lt;br /&gt;/var/log等就掛在ram裏(反正1G都用不完)&lt;br /&gt;唯一不同的是，沒有swap分區系統會有點問題的(具體你試試就知道)&lt;br /&gt;所以建議在SD卡裏擺一個swap文件&lt;br /&gt;&lt;br /&gt;建立方法如下︰&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;br /&gt;#dd if=/dev/zero of=/home/swapfile bs=1024 count=xxx&lt;br /&gt;xxx是文件的大小，單位是KB&lt;br /&gt;262144是256MB，我就是用這個大小&lt;br /&gt;#mkswap /home/swapfile&lt;br /&gt;#swapon /home/swapfile        #這樣就啟用了swap文件&lt;br /&gt;#還需要在fstab裏加一行，以便會次開機都會掛載&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;我把我的fstab、rc.conf貼出來吧&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/7125223952417899091/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=7125223952417899091&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/7125223952417899091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/7125223952417899091'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/08/archlinux-on-acer-aspire-one.html' title='ArchLinux on Acer Aspire One'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-2857147960292549749</id><published>2008-08-23T18:08:00.003+08:00</published><updated>2008-08-29T20:50:30.146+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>更改ext3格式的分區標簽</title><content type='html'>雖然我沒法說ext3是最好的格式&lt;br /&gt;但對於Linux來說這是比較可靠和方便的格式了&lt;br /&gt;雖然我用的是XFS，而XFS確實不錯。速度快，可靠性不算太差&lt;br /&gt;(因為HDD這件硬件一定會先掛掉囧)&lt;br /&gt;但使用ext3來取代fat是一個非常之好的選擇&lt;br /&gt;&lt;br /&gt;在Windows裏可以為fat(或ntfs)格式的分區改名(標簽)&lt;br /&gt;Linux也支持標簽這個特性的(具體體現在掛載分區時可以在FM裏見到那個標簽，掛載目錄也是用那個標簽)&lt;br /&gt;想要設定ext3分區的標簽很簡單&lt;br /&gt;在建立時就設定(用gparted)&lt;br /&gt;對於已存在的分區，可以用以下命令&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;#e2label $device $label&lt;/span&gt;&lt;br /&gt;$device是目標分區(eg. /dev/sda1)&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;當然XFS也可以設定標簽&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;#xfs_admin -L $label $device&lt;/span&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/2857147960292549749/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=2857147960292549749&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2857147960292549749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/2857147960292549749'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/08/ext3.html' title='更改ext3格式的分區標簽'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-6772893672665867082</id><published>2008-08-15T09:54:00.002+08:00</published><updated>2008-08-15T10:08:40.236+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>ArchLinux 休眠</title><content type='html'>&lt;abbr title=&quot;Suspend&quot;&gt;休眠&lt;/abbr&gt;原來很簡單&lt;br /&gt;首先pm-utils提供了三種休眠方式&lt;br /&gt;s2ram, s2disk and s2both&lt;br /&gt;s2disk好像因為spwa分區要設定一下，所以不能直接用&lt;br /&gt;不過我覺得desktop s2disk沒甚麼意思，反正一直接着電源不會沒電的&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;$sudo pm-suspend&lt;/span&gt;&lt;br /&gt;如無意外這樣就可以休眠的了&lt;br /&gt;想更方便點的話就要安裝gnome-power-manager&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;$gnome-power-cmd.sh suspend        # 這樣就能休眠，不用密碼&lt;/span&gt;&lt;br /&gt;預設回愎時要求輸入密碼解鎖的&lt;br /&gt;覺得麻煩就用&lt;span style=&quot;font-style:italic;&quot;&gt;gconf-editor&lt;/span&gt;把&lt;span style=&quot;font-style:italic;&quot;&gt;/apps/gnome-power-manager/lock/&lt;/span&gt;下面全部都取消打勾</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/6772893672665867082/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=6772893672665867082&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/6772893672665867082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/6772893672665867082'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/08/archlinux.html' title='ArchLinux 休眠'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-5543670236361096510</id><published>2008-07-30T12:34:00.002+08:00</published><updated>2008-07-30T12:57:34.930+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux資料"/><category scheme="http://www.blogger.com/atom/ns#" term="網絡應用"/><title type='text'>lighttpd</title><content type='html'>使用lighttpd+fastcgi架設網站原來不是很複雜&lt;br /&gt;根據&lt;a href=&quot;http://wiki.archlinux.org/index.php/Lighttpd_For_Both_SSL_And_Non-SSL&quot; target=&quot;_blank&quot;&gt;ArchWiki&lt;/a&gt;，只要安裝lighttpd即可&lt;br /&gt;因為lighttpd自帶了fastcgi&lt;br /&gt;因為要用普通用戶限權跑，所以還要新增一個lighttpd組和lighttpd用戶&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;#groupadd lighttpd&lt;br /&gt;#useradd -g lighttpd -d /home/lighttpd -s /bin/false lighttpd&lt;br /&gt;#mkdir /home/lighttpd&lt;br /&gt;#chown -R lighttpd.lighttpd /home/lighttpd&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;修改log目錄的限權&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;#chown lighttpd /var/log/lighttpd/*.log&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;還要修改/etc/logrotate.d/lighttpd 使新建的log限權是屬於lighttpd&lt;br /&gt;改成這樣︰&lt;blockquote&gt;&lt;pre&gt;/var/log/lighttpd/*log {&lt;br /&gt;  create 644 lighttpd lighttpd&lt;br /&gt;  compress&lt;br /&gt;  postrotate&lt;br /&gt;    /bin/kill -HUP `cat /var/run/lighttpd.pid 2&gt;/dev/null` 2&gt; /dev/null || true&lt;br /&gt;  endscript&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;最後是修改&lt;span style=&quot;font-style:italic;&quot;&gt;/etc/lighttpd/lighttpd.conf&lt;/span&gt;&lt;br /&gt;我的要求是lighttpd + fastcgi + python&lt;br /&gt;因為fastcgi並不是解釋器，只是把cgi program和lighttpd連接的『中間件』&lt;br /&gt;要python寫的program能連接fastcgi還要按特定的標準來寫&lt;br /&gt;所以最簡單的是使用&lt;a href=&quot;http://webpy.org&quot; target=&quot;_blank&quot;&gt;web.py&lt;/a&gt;&lt;br /&gt;下面是我修改好的lighttpd.conf，會執行/home/lighttpd/index.py&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# lighttpd configuration file&lt;br /&gt;#&lt;br /&gt;# use it as a base for lighttpd 1.0.0 and above&lt;br /&gt;#&lt;br /&gt;# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $&lt;br /&gt;&lt;br /&gt;############ Options you really have to take care of ####################&lt;br /&gt;&lt;br /&gt;## modules to load&lt;br /&gt;# at least mod_access and mod_accesslog should be loaded&lt;br /&gt;# all other module should only be loaded if really neccesary&lt;br /&gt;# - saves some time&lt;br /&gt;# - saves memory&lt;br /&gt;server.modules              = (&lt;br /&gt;                                &quot;mod_rewrite&quot;,&lt;br /&gt;#                               &quot;mod_redirect&quot;,&lt;br /&gt;#                               &quot;mod_alias&quot;,&lt;br /&gt;                                &quot;mod_access&quot;,&lt;br /&gt;#                               &quot;mod_cml&quot;,&lt;br /&gt;#                               &quot;mod_trigger_b4_dl&quot;,&lt;br /&gt;#                               &quot;mod_auth&quot;,&lt;br /&gt;#                               &quot;mod_status&quot;,&lt;br /&gt;#                               &quot;mod_setenv&quot;,&lt;br /&gt;                                &quot;mod_fastcgi&quot;,&lt;br /&gt;#                               &quot;mod_proxy&quot;,&lt;br /&gt;#                               &quot;mod_simple_vhost&quot;,&lt;br /&gt;#                               &quot;mod_evhost&quot;,&lt;br /&gt;#                               &quot;mod_userdir&quot;,&lt;br /&gt;#                               &quot;mod_cgi&quot;,&lt;br /&gt;                                &quot;mod_compress&quot;,&lt;br /&gt;#                               &quot;mod_ssi&quot;,&lt;br /&gt;#                               &quot;mod_usertrack&quot;,&lt;br /&gt;#                               &quot;mod_expire&quot;,&lt;br /&gt;#                               &quot;mod_secdownload&quot;,&lt;br /&gt;#                               &quot;mod_rrdtool&quot;,&lt;br /&gt;                                &quot;mod_accesslog&quot; )&lt;br /&gt;&lt;br /&gt;## a static document-root, for virtual-hosting take look at the&lt;br /&gt;## server.virtual-* options&lt;br /&gt;server.document-root        = &quot;/home/lighttpd&quot;&lt;br /&gt;&lt;br /&gt;## where to send error-messages to&lt;br /&gt;server.errorlog             = &quot;/var/log/lighttpd/error.log&quot;&lt;br /&gt;&lt;br /&gt;# files to check for if .../ is requested&lt;br /&gt;index-file.names            = ( &quot;index.php&quot;, &quot;index.html&quot;,&lt;br /&gt;                                &quot;index.htm&quot;, &quot;default.htm&quot;, &quot;index.py&quot;)&lt;br /&gt;&lt;br /&gt;## set the event-handler (read the performance section in the manual)&lt;br /&gt;# server.event-handler = &quot;freebsd-kqueue&quot; # needed on OS X&lt;br /&gt;&lt;br /&gt;# mimetype mapping&lt;br /&gt;mimetype.assign             = (&lt;br /&gt;  &quot;.pdf&quot;          =&gt;      &quot;application/pdf&quot;,&lt;br /&gt;  &quot;.sig&quot;          =&gt;      &quot;application/pgp-signature&quot;,&lt;br /&gt;  &quot;.spl&quot;          =&gt;      &quot;application/futuresplash&quot;,&lt;br /&gt;  &quot;.class&quot;        =&gt;      &quot;application/octet-stream&quot;,&lt;br /&gt;  &quot;.ps&quot;           =&gt;      &quot;application/postscript&quot;,&lt;br /&gt;  &quot;.torrent&quot;      =&gt;      &quot;application/x-bittorrent&quot;,&lt;br /&gt;  &quot;.dvi&quot;          =&gt;      &quot;application/x-dvi&quot;,&lt;br /&gt;  &quot;.gz&quot;           =&gt;      &quot;application/x-gzip&quot;,&lt;br /&gt;  &quot;.pac&quot;          =&gt;      &quot;application/x-ns-proxy-autoconfig&quot;,&lt;br /&gt;  &quot;.swf&quot;          =&gt;      &quot;application/x-shockwave-flash&quot;,&lt;br /&gt;  &quot;.tar.gz&quot;       =&gt;      &quot;application/x-tgz&quot;,&lt;br /&gt;  &quot;.tgz&quot;          =&gt;      &quot;application/x-tgz&quot;,&lt;br /&gt;  &quot;.tar&quot;          =&gt;      &quot;application/x-tar&quot;,&lt;br /&gt;  &quot;.zip&quot;          =&gt;      &quot;application/zip&quot;,&lt;br /&gt;  &quot;.mp3&quot;          =&gt;      &quot;audio/mpeg&quot;,&lt;br /&gt;  &quot;.m3u&quot;          =&gt;      &quot;audio/x-mpegurl&quot;,&lt;br /&gt;  &quot;.wma&quot;          =&gt;      &quot;audio/x-ms-wma&quot;,&lt;br /&gt;  &quot;.wax&quot;          =&gt;      &quot;audio/x-ms-wax&quot;,&lt;br /&gt;  &quot;.ogg&quot;          =&gt;      &quot;application/ogg&quot;,&lt;br /&gt;  &quot;.wav&quot;          =&gt;      &quot;audio/x-wav&quot;,&lt;br /&gt;  &quot;.gif&quot;          =&gt;      &quot;image/gif&quot;,&lt;br /&gt;  &quot;.jar&quot;          =&gt;      &quot;application/x-java-archive&quot;,&lt;br /&gt;  &quot;.jpg&quot;          =&gt;      &quot;image/jpeg&quot;,&lt;br /&gt;  &quot;.jpeg&quot;         =&gt;      &quot;image/jpeg&quot;,&lt;br /&gt;  &quot;.png&quot;          =&gt;      &quot;image/png&quot;,&lt;br /&gt;  &quot;.xbm&quot;          =&gt;      &quot;image/x-xbitmap&quot;,&lt;br /&gt;  &quot;.xpm&quot;          =&gt;      &quot;image/x-xpixmap&quot;,&lt;br /&gt;  &quot;.xwd&quot;          =&gt;      &quot;image/x-xwindowdump&quot;,&lt;br /&gt;  &quot;.css&quot;          =&gt;      &quot;text/css&quot;,&lt;br /&gt;  &quot;.html&quot;         =&gt;      &quot;text/html&quot;,&lt;br /&gt;  &quot;.htm&quot;          =&gt;      &quot;text/html&quot;,&lt;br /&gt;  &quot;.js&quot;           =&gt;      &quot;text/javascript&quot;,&lt;br /&gt;  &quot;.asc&quot;          =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.c&quot;            =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.py&quot;           =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.cpp&quot;          =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.log&quot;          =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.conf&quot;         =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.text&quot;         =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.txt&quot;          =&gt;      &quot;text/plain&quot;,&lt;br /&gt;  &quot;.dtd&quot;          =&gt;      &quot;text/xml&quot;,&lt;br /&gt;  &quot;.xml&quot;          =&gt;      &quot;text/xml&quot;,&lt;br /&gt;  &quot;.mpeg&quot;         =&gt;      &quot;video/mpeg&quot;,&lt;br /&gt;  &quot;.mpg&quot;          =&gt;      &quot;video/mpeg&quot;,&lt;br /&gt;  &quot;.mov&quot;          =&gt;      &quot;video/quicktime&quot;,&lt;br /&gt;  &quot;.qt&quot;           =&gt;      &quot;video/quicktime&quot;,&lt;br /&gt;  &quot;.avi&quot;          =&gt;      &quot;video/x-msvideo&quot;,&lt;br /&gt;  &quot;.asf&quot;          =&gt;      &quot;video/x-ms-asf&quot;,&lt;br /&gt;  &quot;.asx&quot;          =&gt;      &quot;video/x-ms-asf&quot;,&lt;br /&gt;  &quot;.wmv&quot;          =&gt;      &quot;video/x-ms-wmv&quot;,&lt;br /&gt;  &quot;.bz2&quot;          =&gt;      &quot;application/x-bzip&quot;,&lt;br /&gt;  &quot;.tbz&quot;          =&gt;      &quot;application/x-bzip-compressed-tar&quot;,&lt;br /&gt;  &quot;.tar.bz2&quot;      =&gt;      &quot;application/x-bzip-compressed-tar&quot;,&lt;br /&gt;  # default mime type&lt;br /&gt;  &quot;&quot;              =&gt;      &quot;application/octet-stream&quot;,&lt;br /&gt; )&lt;br /&gt;&lt;br /&gt;# Use the &quot;Content-Type&quot; extended attribute to obtain mime type if possible&lt;br /&gt;#mimetype.use-xattr        = &quot;enable&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## send a different Server: header&lt;br /&gt;## be nice and keep it at lighttpd&lt;br /&gt;# server.tag                 = &quot;lighttpd&quot;&lt;br /&gt;&lt;br /&gt;#### accesslog module&lt;br /&gt;accesslog.filename          = &quot;/var/log/lighttpd/access.log&quot;&lt;br /&gt;&lt;br /&gt;## deny access the file-extensions&lt;br /&gt;#&lt;br /&gt;# ~    is for backupfiles from vi, emacs, joe, ...&lt;br /&gt;# .inc is often used for code includes which should in general not be part&lt;br /&gt;#      of the document-root&lt;br /&gt;url.access-deny             = ( &quot;~&quot;, &quot;.inc&quot; )&lt;br /&gt;&lt;br /&gt;$HTTP[&quot;url&quot;] =~ &quot;\.pdf$&quot; {&lt;br /&gt;  server.range-requests = &quot;disable&quot;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;##&lt;br /&gt;# which extensions should not be handle via static-file transfer&lt;br /&gt;#&lt;br /&gt;# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi&lt;br /&gt;static-file.exclude-extensions = ( &quot;.php&quot;, &quot;.pl&quot;, &quot;.fcgi&quot;, &quot;.py&quot;, &quot;.db&quot;)&lt;br /&gt;&lt;br /&gt;######### Options that are good to be but not neccesary to be changed #######&lt;br /&gt;&lt;br /&gt;## bind to port (default: 80)&lt;br /&gt;#server.port                = 81&lt;br /&gt;&lt;br /&gt;## bind to localhost (default: all interfaces)&lt;br /&gt;#server.bind                = &quot;127.0.0.1&quot;&lt;br /&gt;&lt;br /&gt;## error-handler for status 404&lt;br /&gt;#server.error-handler-404   = &quot;/error-handler.html&quot;&lt;br /&gt;#server.error-handler-404   = &quot;/error-handler.php&quot;&lt;br /&gt;&lt;br /&gt;## to help the rc.scripts&lt;br /&gt;server.pid-file            = &quot;/var/run/lighttpd/lighttpd.pid&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;###### virtual hosts&lt;br /&gt;##&lt;br /&gt;##  If you want name-based virtual hosting add the next three settings and load&lt;br /&gt;##  mod_simple_vhost&lt;br /&gt;##&lt;br /&gt;## document-root =&lt;br /&gt;##   virtual-server-root + virtual-server-default-host + virtual-server-docroot&lt;br /&gt;## or&lt;br /&gt;##   virtual-server-root + http-host + virtual-server-docroot&lt;br /&gt;##&lt;br /&gt;#simple-vhost.server-root   = &quot;/srv/http/vhosts/&quot;&lt;br /&gt;#simple-vhost.default-host  = &quot;www.example.org&quot;&lt;br /&gt;#simple-vhost.document-root = &quot;/htdocs/&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;##&lt;br /&gt;## Format: &lt;errorfile-prefix&gt;&lt;status-code&gt;.html&lt;br /&gt;## -&gt; ..../status-404.html for &#39;File not found&#39;&lt;br /&gt;#server.errorfile-prefix    = &quot;/usr/share/lighttpd/errors/status-&quot;&lt;br /&gt;#server.errorfile-prefix    = &quot;/srv/http/errors/status-&quot;&lt;br /&gt;server.errorfile-prefix     =   &quot;/home/lighttpd/templates/status&quot;&lt;br /&gt;&lt;br /&gt;## virtual directory listings&lt;br /&gt;#dir-listing.activate       = &quot;enable&quot;&lt;br /&gt;&lt;br /&gt;## enable debugging&lt;br /&gt;#debug.log-request-header   = &quot;enable&quot;&lt;br /&gt;#debug.log-response-header  = &quot;enable&quot;&lt;br /&gt;#debug.log-request-handling = &quot;enable&quot;&lt;br /&gt;#debug.log-file-not-found   = &quot;enable&quot;&lt;br /&gt;&lt;br /&gt;### only root can use these options&lt;br /&gt;#&lt;br /&gt;# chroot() to directory (default: no chroot() )&lt;br /&gt;#server.chroot              = &quot;/&quot;&lt;br /&gt;&lt;br /&gt;## change uid to &lt;uid&gt; (default: don&#39;t care)&lt;br /&gt;server.username            = &quot;lighttpd&quot;&lt;br /&gt;&lt;br /&gt;## change uid to &lt;uid&gt; (default: don&#39;t care)&lt;br /&gt;server.groupname           = &quot;lighttpd&quot;&lt;br /&gt;&lt;br /&gt;#### compress module&lt;br /&gt;compress.cache-dir         = &quot;/var/cache/lighttpd/compress/&quot;&lt;br /&gt;compress.filetype          = (&quot;text/plain&quot;, &quot;text/html&quot;)&lt;br /&gt;&lt;br /&gt;#### proxy module&lt;br /&gt;## read proxy.txt for more info&lt;br /&gt;#proxy.server               = ( &quot;.php&quot; =&gt;&lt;br /&gt;#                               ( &quot;localhost&quot; =&gt;&lt;br /&gt;#                                 (&lt;br /&gt;#                                   &quot;host&quot; =&gt; &quot;192.168.0.101&quot;,&lt;br /&gt;#                                   &quot;port&quot; =&gt; 80&lt;br /&gt;#                                 )&lt;br /&gt;#                               )&lt;br /&gt;#                             )&lt;br /&gt;&lt;br /&gt;#### fastcgi module&lt;br /&gt;## read fastcgi.txt for more info&lt;br /&gt;## for PHP don&#39;t forget to set cgi.fix_pathinfo = 1 in the php.ini&lt;br /&gt;fastcgi.server = ( &quot;.py&quot;  =&gt;&lt;br /&gt;        ((  &quot;socket&quot;    =&gt;  &quot;/tmp/fastcgi.socket&quot;,&lt;br /&gt;            &quot;bin-path&quot;  =&gt;  &quot;/home/lighttpd/index.py&quot;,&lt;br /&gt;            &quot;max-procs&quot; =&gt;  1,&lt;br /&gt;            &quot;bin-environment&quot;   =&gt;  (&lt;br /&gt;                &quot;index.py&quot;  =&gt;  &quot;&quot;&lt;br /&gt;                                    )&lt;br /&gt;         ))&lt;br /&gt;)&lt;br /&gt;#fastcgi.server             = ( &quot;.php&quot; =&gt;&lt;br /&gt;#                               ( &quot;localhost&quot; =&gt;&lt;br /&gt;#                                 (&lt;br /&gt;#                                   &quot;socket&quot; =&gt; &quot;/var/run/lighttpd/php-fastcgi.socket&quot;,&lt;br /&gt;#                                   &quot;bin-path&quot; =&gt; &quot;/usr/bin/php-cgi&quot;&lt;br /&gt;#                                 )&lt;br /&gt;#                               )&lt;br /&gt;#                            )&lt;br /&gt;&lt;br /&gt;#### CGI module&lt;br /&gt;#cgi.assign                 = ( &quot;.pl&quot;  =&gt; &quot;/usr/bin/perl&quot;,&lt;br /&gt;#                               &quot;.cgi&quot; =&gt; &quot;/usr/bin/perl&quot; )&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;#### SSL engine&lt;br /&gt;#ssl.engine                 = &quot;enable&quot;&lt;br /&gt;#ssl.pemfile                = &quot;/etc/ssl/private/lighttpd.pem&quot;&lt;br /&gt;&lt;br /&gt;#### status module&lt;br /&gt;#status.status-url          = &quot;/server-status&quot;&lt;br /&gt;#status.config-url          = &quot;/server-config&quot;&lt;br /&gt;&lt;br /&gt;#### auth module&lt;br /&gt;## read authentication.txt for more info&lt;br /&gt;#auth.backend               = &quot;plain&quot;&lt;br /&gt;#auth.backend.plain.userfile = &quot;lighttpd.user&quot;&lt;br /&gt;#auth.backend.plain.groupfile = &quot;lighttpd.group&quot;&lt;br /&gt;&lt;br /&gt;#auth.backend.ldap.hostname = &quot;localhost&quot;&lt;br /&gt;#auth.backend.ldap.base-dn  = &quot;dc=my-domain,dc=com&quot;&lt;br /&gt;#auth.backend.ldap.filter   = &quot;(uid=$)&quot;&lt;br /&gt;&lt;br /&gt;#auth.require               = ( &quot;/server-status&quot; =&gt;&lt;br /&gt;#                               (&lt;br /&gt;#                                 &quot;method&quot;  =&gt; &quot;digest&quot;,&lt;br /&gt;#                                 &quot;realm&quot;   =&gt; &quot;download archiv&quot;,&lt;br /&gt;#                                 &quot;require&quot; =&gt; &quot;user=jan&quot;&lt;br /&gt;#                               ),&lt;br /&gt;#                               &quot;/server-config&quot; =&gt;&lt;br /&gt;#                               (&lt;br /&gt;#                                 &quot;method&quot;  =&gt; &quot;digest&quot;,&lt;br /&gt;#                                 &quot;realm&quot;   =&gt; &quot;download archiv&quot;,&lt;br /&gt;#                                 &quot;require&quot; =&gt; &quot;valid-user&quot;&lt;br /&gt;#                               )&lt;br /&gt;#                             )&lt;br /&gt;&lt;br /&gt;#### url handling modules (rewrite, redirect, access)&lt;br /&gt;url.rewrite-once = (&lt;br /&gt;        &quot;^/favicon.ico$&quot;    =&gt;  &quot;/static/favicon.ico&quot;,&lt;br /&gt;        &quot;^/static/(.*)$&quot;    =&gt;  &quot;/static/$1&quot;,&lt;br /&gt;        &quot;^/(.*)$&quot;           =&gt;  &quot;/index.py/$1&quot;&lt;br /&gt;)&lt;br /&gt;#url.rewrite                = ( &quot;^/$&quot;             =&gt; &quot;/server-status&quot; )&lt;br /&gt;#url.redirect               = ( &quot;^/wishlist/(.+)&quot; =&gt; &quot;http://www.123.org/$1&quot; )&lt;br /&gt;#### both rewrite/redirect support back reference to regex conditional using %n&lt;br /&gt;#$HTTP[&quot;host&quot;] =~ &quot;^www\.(.*)&quot; {&lt;br /&gt;#  url.redirect            = ( &quot;^/(.*)&quot; =&gt; &quot;http://%1/$1&quot; )&lt;br /&gt;#}&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# define a pattern for the host url finding&lt;br /&gt;# %% =&gt; % sign&lt;br /&gt;# %0 =&gt; domain name + tld&lt;br /&gt;# %1 =&gt; tld&lt;br /&gt;# %2 =&gt; domain name without tld&lt;br /&gt;# %3 =&gt; subdomain 1 name&lt;br /&gt;# %4 =&gt; subdomain 2 name&lt;br /&gt;#&lt;br /&gt;#evhost.path-pattern        = &quot;/srv/http/vhosts/%3/htdocs/&quot;&lt;br /&gt;&lt;br /&gt;#### expire module&lt;br /&gt;#expire.url                 = ( &quot;/buggy/&quot; =&gt; &quot;access 2 hours&quot;, &quot;/asdhas/&quot; =&gt; &quot;access plus 1 seconds 2 minutes&quot;)&lt;br /&gt;&lt;br /&gt;#### ssi&lt;br /&gt;#ssi.extension              = ( &quot;.shtml&quot; )&lt;br /&gt;&lt;br /&gt;#### rrdtool&lt;br /&gt;#rrdtool.binary             = &quot;/usr/bin/rrdtool&quot;&lt;br /&gt;#rrdtool.db-name            = &quot;/var/lib/lighttpd/lighttpd.rrd&quot;&lt;br /&gt;&lt;br /&gt;#### setenv&lt;br /&gt;#setenv.add-request-header  = ( &quot;TRAV_ENV&quot; =&gt; &quot;mysql://user@host/db&quot; )&lt;br /&gt;#setenv.add-response-header = ( &quot;X-Secret-Message&quot; =&gt; &quot;42&quot; )&lt;br /&gt;&lt;br /&gt;## for mod_trigger_b4_dl&lt;br /&gt;# trigger-before-download.gdbm-filename = &quot;/var/lib/lighttpd/trigger.db&quot;&lt;br /&gt;# trigger-before-download.memcache-hosts = ( &quot;127.0.0.1:11211&quot; )&lt;br /&gt;# trigger-before-download.trigger-url = &quot;^/trigger/&quot;&lt;br /&gt;# trigger-before-download.download-url = &quot;^/download/&quot;&lt;br /&gt;# trigger-before-download.deny-url = &quot;http://127.0.0.1/index.html&quot;&lt;br /&gt;# trigger-before-download.trigger-timeout = 10&lt;br /&gt;&lt;br /&gt;## for mod_cml&lt;br /&gt;## don&#39;t forget to add index.cml to server.indexfiles&lt;br /&gt;# cml.extension               = &quot;.cml&quot;&lt;br /&gt;# cml.memcache-hosts          = ( &quot;127.0.0.1:11211&quot; )&lt;br /&gt;&lt;br /&gt;#### variable usage:&lt;br /&gt;## variable name without &quot;.&quot; is auto prefixed by &quot;var.&quot; and becomes &quot;var.bar&quot;&lt;br /&gt;#bar = 1&lt;br /&gt;#var.mystring = &quot;foo&quot;&lt;br /&gt;&lt;br /&gt;## integer add&lt;br /&gt;#bar += 1&lt;br /&gt;## string concat, with integer cast as string, result: &quot;www.foo1.com&quot;&lt;br /&gt;#server.name = &quot;www.&quot; + mystring + var.bar + &quot;.com&quot;&lt;br /&gt;## array merge&lt;br /&gt;#index-file.names = (foo + &quot;.php&quot;) + index-file.names&lt;br /&gt;#index-file.names += (foo + &quot;.php&quot;)&lt;br /&gt;&lt;br /&gt;#### include&lt;br /&gt;#include /etc/lighttpd/lighttpd-inc.conf&lt;br /&gt;## same as above if you run: &quot;lighttpd -f /etc/lighttpd/lighttpd.conf&quot;&lt;br /&gt;#include &quot;lighttpd-inc.conf&quot;&lt;br /&gt;&lt;br /&gt;#### include_shell&lt;br /&gt;#include_shell &quot;echo var.a=1&quot;&lt;br /&gt;## the above is same as:&lt;br /&gt;#var.a=1&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/5543670236361096510/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=5543670236361096510&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/5543670236361096510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/5543670236361096510'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/07/lighttpd.html' title='lighttpd'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24469559.post-5252840149456088498</id><published>2008-04-26T18:03:00.000+08:00</published><updated>2008-04-26T18:05:42.103+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux使用"/><title type='text'>Arch下用鏡頭仔</title><content type='html'>不知何解，Arch下鏡頭不能直接使用&lt;br /&gt;要安裝&lt;span style=&quot;font-style: italic;&quot;&gt;gspcav1&lt;/span&gt;這個包&lt;br /&gt;但我裝完也不能直接用&lt;br /&gt;重啟後拔出來再插上幾次才可以&lt;br /&gt;真夠奇怪&lt;br /&gt;不知是不是有Bug</content><link rel='replies' type='application/atom+xml' href='http://psp-jupiter.blogspot.com/feeds/5252840149456088498/comments/default' title='發佈留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24469559&amp;postID=5252840149456088498&amp;isPopup=true' title='0 則留言'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/5252840149456088498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24469559/posts/default/5252840149456088498'/><link rel='alternate' type='text/html' href='http://psp-jupiter.blogspot.com/2008/04/arch.html' title='Arch下用鏡頭仔'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00115047154442422976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>