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

參考資料

147 comments

  1. It’s perfect time to make some plans for the future and it’s
    time to be happy. I have read this post and
    if I could I desire to suggest you few interesting things or tips.
    Maybe you can write next articles referring to this article.
    I wish to read more things about it!

  2. I’m not sure why but this weblog is loading extremely slow for me.
    Is anyone else having this issue or is it a issue on my end?
    I’ll check back later on and see if the problem still exists.

  3. Hello there! I know this is kinda off topic but I’d figured I’d
    ask. Would you be interested in exchanging links or maybe guest writing a blog
    post or vice-versa? My site goes over a lot of the same subjects as
    yours and I think we could greatly benefit from each
    other. If you might be interested feel free to send me an e-mail.

    I look forward to hearing from you! Great blog by the way!

  4. I’m amazed, I have to admit. Seldom do I encounter a blog
    that’s both educative and entertaining, and without
    a doubt, you’ve hit the nail on the head. The problem is something which not enough people are speaking intelligently
    about. I’m very happy that I came across this in my hunt for something relating
    to this.

  5. Thanks , I’ve recently been searching for info approximately
    this subject for a while and yours is the greatest I have discovered till now.
    However, what about the conclusion? Are you sure in regards
    to the source?

  6. Hi there, i read your blog from time to time and i own a similar one and i was
    just curious if you get a lot of spam comments? If so how
    do you protect against it, any plugin or anything you can suggest?

    I get so much lately it’s driving me mad so any support is very much appreciated.

  7. You actually make it appear really easy together with your presentation however I to find this
    topic to be actually something which I think I’d by no means understand.
    It seems too complicated and very broad for me.
    I’m having a look forward to your next publish, I’ll
    attempt to get the grasp of it!

  8. hello there and thank you for your info – I’ve definitely picked up something new from
    right here. I did however expertise several technical points using this web site,
    since I experienced to reload the web site a lot of times previous to I could get it
    to load correctly. I had been wondering if your web host
    is OK? Not that I am complaining, but slow loading instances times will sometimes
    affect your placement in google and can damage your
    high quality score if advertising and marketing with Adwords.

    Well I’m adding this RSS to my email and could look out for much more of your respective fascinating content.
    Ensure that you update this again soon.

  9. Howdy! This is my 1st comment here so I just wanted to give a quick shout out
    and say I genuinely enjoy reading your posts. Can you recommend
    any other blogs/websites/forums that deal with the same topics?
    Thanks a lot!

  10. Hey, I think your website might be having browser compatibility issues.
    When I look at your blog site in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that,
    fantastic blog!

  11. Hi exceptional website! Does running a blog like this take a large amount of work?
    I’ve virtually no knowledge of coding however I had been hoping to start my
    own blog soon. Anyhow, should you have any ideas or techniques for new blog
    owners please share. I understand this is off topic nevertheless I simply needed to ask.
    Cheers!

  12. I think this is one of the so much significant information for me.
    And i’m happy reading your article. However want to observation on some basic things, The site style is ideal, the articles is actually nice : D.
    Excellent task, cheers

  13. Hi there every one, here every one is sharing these kinds of familiarity, thus it’s pleasant to read this
    website, and I used to pay a quick visit this website all the time.

  14. Thank you for the good writeup. It in fact was a
    amusement account it. Look advanced to far added agreeable from you!
    By the way, how can we communicate?

  15. Hi, i feel that i saw you visited my website so i
    got here to go back the favor?.I am trying to
    to find things to improve my web site!I suppose its adequate
    to make use of some of your concepts!!

  16. Howdy, i read your blog occasionally and i own a similar one
    and i was just wondering if you get a lot of spam remarks?

    If so how do you reduce it, any plugin or anything you can recommend?

    I get so much lately it’s driving me insane so any help is very much appreciated.

  17. We are a bunch of volunteers and opening a new scheme
    in our community. Your web site offered us with valuable information to work on. You have done a formidable activity and our whole group might be grateful to you.

  18. This design is spectacular! You certainly know how to keep a
    reader amused. Between your wit and your videos, I was almost moved
    to start my own blog (well, almost…HaHa!) Wonderful job.
    I really enjoyed what you had to say, and more
    than that, how you presented it. Too cool!

  19. you’re actually a excellent webmaster. The web site loading pace is amazing.
    It sort of feels that you are doing any distinctive trick.

    Moreover, The contents are masterpiece. you’ve done a fantastic task on this matter!

  20. My spouse and I stumbled over here different web address
    and thought I might check things out. I like what I see
    so i am just following you. Look forward to looking at your
    web page repeatedly.

  21. Your style is unique compared to other people
    I have read stuff from. Thanks for posting when you’ve
    got the opportunity, Guess I will just bookmark this blog.

  22. Hello there, I discovered your website by the use
    of Google while searching for a comparable subject, your web
    site came up, it looks great. I have bookmarked it in my google bookmarks.

    Hello there, simply turned into aware of your blog via Google,
    and found that it’s truly informative. I am gonna watch out for brussels.
    I will appreciate for those who proceed this in future.

    Lots of other folks shall be benefited from your writing.
    Cheers!

發表迴響

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

*