微型 Linux – Damn Small Linux 安裝 Node.js (一)

Damn Small Linux

Damn Small Linux(DSL) 世界上最流行的微型 Linux 之一,號稱僅需要 50MB 就可以跑起有圖形介面的 Linux 外,還預設配置了許多應用程式供使用,但這是以 Live CD 跑起來的模式。如果將整個系統到硬碟上最好需要 500M-1G 的空間,來做升級與安裝其他的套件。

DSL 4.11 桌面

以下內容為作者 Damn Small Linux 在安裝 Node.js 環境的記錄,如有錯誤或好方法煩請不吝賜教。

目前DSL有幾個版本

  1. DSL 3.x (linux kernel 2.4.x)
    apt來源缺少, 連apt-update都會發生錯誤
  2. DSL 4.x (linux kernel 2.4.x)
    libc6表示kernel太舊先升級kenerl才可更新
  3. DSL-n

使用心得

實際使用發現 DSL 已經許久沒有更新,主要幾個版本發布時間都在 2008 年,如果沒有使用太新的技術來說,在使用上沒有什麼太大的問題,且在系統需求依然有很大的優勢。但如要使用新技術(如: Node.js 在這次建置環境中就遇到了 linux kenerl太舊的先天問題),不如考慮另一套由 Damn Small Linux (DSL) 創始人Robert Shingledecker 所設計的 Tiny Core。

安裝DSL到硬碟

  1. F3進入boot模式
  2. 選擇輸入install, 進入安裝模式
  3. 安裝選單選擇10 Partition Tool cfdisk
  4. 系統重新啟動一樣進入安裝模式
  5. 選擇2 Install to Hard Disk

更新相關程式

Upgrade to GNU Utils

  • 在桌面選單點選右鍵
    Apps > Tools > Upgrade to GNU Utils

DSL 應用程式選單

DSL應用程式選單

Enable APT

  1. 在桌面選單點選右鍵
    Apps > Tools > Enable APT
  2. DSL延伸應用程式
    透過下節介紹方法開啟 apt-get 命令功能,在執行
    apt-get update

DSL 控制台(DSL Control Panel)

在控制台中可以將一些預設沒有開的功能開啟,如遠端SSH(SSH Server)、撥號設定、無線網路設定、FTP等等功能打開。

DSL 控制台

DSL控制台

DSL延伸應用程式(DSL myDSL Application Extensions)

在 DSL 中若使用 apt 安裝常發現相容性問題,或版本太舊的問題。此時不如選擇已經打包好的套件進行安裝。

網址:http://distro.ibiblio.org/damnsmall/mydsl/

開啟 apt-get 功能

http://distro.ibiblio.org/damnsmall/mydsl/system/dsl-dpkg.dsl
mydsl-load dsl-dpkg.dsl

安裝 Node.js

載入相關模組與函式庫

wget http://distro.ibiblio.org/damnsmall/mydsl/system/gcc1-with-libs.dsl
wget http://distro.ibiblio.org/damnsmall/mydsl/system/libc6-dev.dsl
wget http://distro.ibiblio.org/damnsmall/mydsl/system/libc6.dsl
wget http://distro.ibiblio.org/damnsmall/mydsl/system/libncurses5.dsl
wget http://distro.ibiblio.org/damnsmall/mydsl/system/libssh-0.11.dsl
wget http://distro.ibiblio.org/damnsmall/mydsl/system/openssl-0.9.7j-includes.dsl
mydsl-load gcc1-with-libs.dsl
mydsl-load libc6-dev.dsl
mydsl-load libc6.dsl
mydsl-load libncurses5.dsl
mydsl-load libssh-0.11.dsl
mydsl-load openssl-0.9.7j-includes.dsl

安裝Python

如果直接透過 apt-get 安裝後在編譯 Node.js 會出現以下錯誤,有人說可能是 Python 版本過低,因此採用手動編譯

root@box node-v0.8.14]# ./configure
File "./configure", line 355
1 if options.unsafe_optimizations else 0)
^
SyntaxError: invalid syntax

手動編譯安裝Python

wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz
tar xzf Python-3.3.0.tgz
cd Python-3.3.0
./configure --with-pth --with-dec-threads --with-signal-module --prefix=/opt/Python-3.3.0
make
make install
ln -sf /opt/Python3.3.0/bin/python3.3 /usr/bin/python
ln -sf /opt/Python3.3.0/bin/python3.3 /usr/bin/local/bin/python

安裝 Node.js

手動編譯

發現會出現某個函數找不到的狀況,判斷可能是函式庫安裝不完全,或是版本太舊。

使用套件安裝

由於 apt-get 找不到相關的來源,因此自行尋找相依的 deb 下載安裝,在 deb 安裝過程中發現,無法正常安裝原因為 Linux Kernel 太舊,因此如要正常安裝僅能升級整個 DSL Kernel 後再依循以上步驟安裝。

參考資料

340 comments

  1. I’ve been exploring for a little bit for any high-quality articles or weblog posts on this sort of space .
    Exploring in Yahoo I ultimately stumbled upon this site.
    Reading this information So i am glad to exhibit that I’ve a
    very excellent uncanny feeling I discovered just what I needed.

    I most unquestionably will make certain to don?t fail
    to remember this site and provides it a glance regularly.

  2. Right here is the right blog for anyone who wishes to understand this
    topic. You understand so much its almost hard to argue with you (not
    that I personally would want to…HaHa). You definitely put a new
    spin on a topic that has been written about
    for a long time. Wonderful stuff, just wonderful!

  3. I every time used to read piece of writing in news papers but now as I am a user of web thus
    from now I am using net for articles or reviews, thanks to web.

  4. Hmm it appears like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what
    I submitted and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m still new to everything.
    Do you have any suggestions for novice blog writers?
    I’d genuinely appreciate it.

  5. What i do not understood is in fact how you’re no longer actually much more well-preferred than you may be right now.
    You are very intelligent. You realize therefore significantly relating to this topic, produced me individually
    believe it from a lot of numerous angles. Its like women and men are not fascinated except
    it’s one thing to accomplish with Lady gaga! Your individual
    stuffs outstanding. At all times handle it up!

  6. Write more, thats all I have to say. Literally, it seems as though you relied on the video
    to make your point. You definitely know what youre talking
    about, why waste your intelligence on just posting videos to your weblog
    when you could be giving us something informative to read?

  7. Write more, thats all I have to say. Literally,
    it seems as though you relied on the video to make your point.
    You definitely know what youre talking about, why
    throw away your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?

  8. I think what you typed made a great deal of sense.
    But, think about this, what if you added a little information? I am not saying your information isn’t good,
    but what if you added a post title to possibly get a person’s attention?
    I mean 微型 Linux – Damn Small Linux 安裝 Node.js (一) –
    Taien's blog is kinda plain. You ought to peek at Yahoo’s front
    page and watch how they create post headlines to grab viewers to open the links.
    You might add a video or a related pic or two to
    grab people interested about everything’ve got to say.
    Just my opinion, it would make your posts a little livelier.

  9. Hmm it appears like your site ate my first comment (it was super long) so
    I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog writer but I’m still new to the whole thing.
    Do you have any tips and hints for newbie blog writers?
    I’d certainly appreciate it.

  10. Hello there, I do believe your website might be having
    browser compatibility problems. Whenever I take a look at your site in Safari, it
    looks fine however, if opening in IE, it’s got some overlapping issues.
    I simply wanted to give you a quick heads up!
    Other than that, great blog!

  11. I simply could not depart your web site before suggesting that I actually
    loved the standard info an individual provide in your guests?
    Is going to be again frequently in order to check up on new posts

  12. Hmm it appears like your blog ate my first comment
    (it was super long) so I guess I’ll just sum it up what
    I had written and say, I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to
    the whole thing. Do you have any points for rookie
    blog writers? I’d really appreciate it.

  13. Hey I know this is off topic but I was wondering if you knew of any widgets I could
    add to my blog that automatically tweet my
    newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe
    you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

*