微型 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 後再依循以上步驟安裝。

參考資料

234 comments

  1. What i do not realize is in truth how you’re now not actually a lot more neatly-preferred than you might be right now.
    You’re so intelligent. You already know thus considerably when it comes to this topic, produced me in my view consider it from numerous various angles.

    Its like women and men don’t seem to be involved except it is one thing to accomplish with
    Woman gaga! Your own stuffs excellent. All the time take care of it up!

  2. First off I would like to say fantastic blog! I had a quick question that I’d like
    to ask if you do not mind. I was interested to
    know how you center yourself and clear your head before
    writing. I’ve had difficulty clearing my mind in getting my ideas out there.
    I do enjoy writing however it just seems like the first 10 to 15 minutes are generally wasted just trying to figure
    out how to begin. Any suggestions or hints? Thanks!

  3. We are a gaggle of volunteers and opening a brand new scheme in our community.
    Your web site offered us with helpful info to work
    on. You’ve done a formidable activity and our entire group will likely be grateful to you.

  4. Unquestionably consider that which you stated. Your favorite reason appeared to
    be on the net the simplest factor to remember of.
    I say to you, I certainly get irked even as other people think about issues
    that they plainly do not realize about. You managed to hit the nail upon the highest as well as
    outlined out the whole thing with no need side effect
    , people could take a signal. Will likely be again to get more.
    Thanks

  5. Hi there, I found your blog by way of Google while looking for a related matter, your web site got here
    up, it appears good. I’ve bookmarked it in my google bookmarks.

    Hi there, simply was alert to your blog via Google, and found that it’s really informative.
    I am going to be careful for brussels. I’ll appreciate when you continue
    this in future. A lot of people will be benefited out of your writing.
    Cheers!

  6. I’m curious to find out what blog system you happen to
    be working with? I’m experiencing some small security issues with
    my latest blog and I would like to find something more safeguarded.
    Do you have any solutions?

  7. You actually make it seem really easy along with your presentation but I find this topic to
    be actually something that I believe I might never understand.

    It kind of feels too complex and extremely broad for me.
    I am taking a look forward for your subsequent publish,
    I will attempt to get the hold of it!

  8. Having read this I thought it was very enlightening.
    I appreciate you spending some time and energy to put this
    content together. I once again find myself personally spending way too much time both reading and commenting.

    But so what, it was still worthwhile!

  9. Hi there would you mind letting me know which
    hosting company you’re using? I’ve loaded your blog in 3 completely different web browsers
    and I must say this blog loads a lot faster then most.
    Can you suggest a good internet hosting provider at a honest price?
    Cheers, I appreciate it!

  10. I know this if off topic but I’m looking into starting my own blog
    and was wondering what all is required to get setup? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% sure.
    Any tips or advice would be greatly appreciated.
    Thank you

  11. Hi there, just became aware of your blog through Google, and found that it
    is truly informative. I’m gonna watch out for brussels.
    I will appreciate if you continue this in future. Lots
    of people will be benefited from your writing.

    Cheers!

  12. I simply could not depart your website before suggesting that I extremely enjoyed the usual information an individual
    supply on your guests? Is gonna be again frequently to check out new posts

  13. Please let me know if you’re looking for a article author for your blog.
    You have some really great articles and I feel I would be a
    good asset. If you ever want to take some of
    the load off, I’d absolutely love to write some articles for your blog in exchange for a link
    back to mine. Please shoot me an email if interested. Regards!

  14. You really make it appear really easy together with your presentation however I find this matter
    to be really one thing that I think I’d never
    understand. It seems too complex and very huge for me.
    I’m taking a look forward on your subsequent post, I will try
    to get the hang of it!

發表迴響

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

*