ipkg套件管理工具在embedded系統中的確是個很方便的工具,
先前有在DS207+中使用過,但以目前較新的DS209+來說要使
用其實並不困難,在Synology產品已經有很多做用ipkg的先例,
只要確定好該產品是為何種列的cpu即有可能可以對映上直接使用,
這次就是要以DS209+來安裝ipkg套件管理工具,並利用此工具在
系統增加unzip這項工具。
STEP1.
利用ssh client(ex:putty)登入DS209+(本文以NAS稱呼),
並鍵入cat /proc/cpuinfo 查詢CPU種類,依DS209+來說為
POWER PC架構之CPU,出廠為Freescale
| DSSTATION> cat /proc/cpuinfo processor : 0 cpu : e500v2 clock : 799.920000MHz revision : 2.2 (pvr 8021 0022) bogomips : 99.84 timebase : 49995000 platform : MPC8544 DS Vendor : Freescale Semiconductor PVR : 0×80210022 SVR : 0×80340011 PLL setting : 0×4 Memory : 512 MB |
STEP2.
利用wget下載ipkg安裝程序,下載完成後並下ls看檔案是否存在,
因下載完後該檔案並非可執行的屬性,所以請下chmod改變檔案屬性
以便等會兒要進行安裝
| DSSTATION> wget http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-5_powerpc.xsh –2009-04-30 01:39:11– http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-5_powerpc.xsh Resolving ipkg.nslu2-linux.org… 140.211.169.169 Connecting to ipkg.nslu2-linux.org|140.211.169.169|:80… connected. HTTP request sent, awaiting response… 200 OK Length: 237235 (232K) [text/plain] Saving to: `syno-e500-bootstrap_1.2-5_powerpc.xsh’ 100%[=================================================>] 237,235 161K/s in 1.4s 2009-04-30 01:39:14 (161 KB/s) – `syno-e500-bootstrap_1.2-5_powerpc.xsh’ saved [237235/237235] DSSTATION> ls DSSTATION> chmod 777 syno-e500-bootstrap_1.2-5_powerpc.xsh |
STEP3.
執行syno-e500-bootstrap_1.2-5_powerpc.xsh進行安裝,安裝後請重新開機後再登入進行設定update server

STEP4.
安裝正確時會在/opt/etc/目錄中發現有ipkg.conf,該檔案為設定其更新來源位址,
現在要進行編輯,將更新位址輸入,在此使用vi編輯器將之開啟!
DSSTATION> vi /opt/etc/ipkg.conf
STEP5.
開啟檔案後請在內文中增加標示紅色字串,在以後下ipkg命令時所對映搜尋
ipkg套件檔案之網址,以便尋找需要安裝之套件,新增好後請依序按下
ESC:x及enter將檔案存檔離開,vi相關操作不在本文多做介紹。
| # Uncomment one of the following package feeds or resolve your arch # by visiting http://ipkg.nslu2-linux.org/feeds/optware/ # src nslu2 http://ipkg.nslu2-linux.org/feeds/optware/nslu2/cross/stable # src fsg3 http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable # src ddwrt http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable # src xwrt http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable # src whiterussian http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable # src oleg http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable # src ts72xx http://ipkg.nslu2-linux.org/feeds/optware/ts72xx/cross/stable # src/gz openwrt-brcm24 http://ipkg.nslu2-linux.org/feeds/optware/openwrt-brcm24/cross/unst # src/gz openwrt-ixp4xx http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unst dest root / #option verbose-wget src syno-e500 http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable |
STEP6.
在此已經將ipkg套件管理工具安裝完成,可以在命令列中執行ipkg會看到下面回應字串,則可以確定套件可以使用!
| DSSTATION> ipkg ipkg: ipkg must have one sub-command argument ipkg version 0.99.163 usage: ipkg [options...] sub-command [arguments...] where sub-command is one of: Package Manipulation: Informational Commands: |
STEP7.
輸入ipkg install unzip開始安裝unzip這支程式,
看到Successfully terminated則代表安裝成功,
之後則可輸入unzip進行zip檔解壓縮,接下來整
個安裝ipkg方法已經介紹完成,想要安裝什麼套件
可以進入:
http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/Packages
觀看套件的資料,選擇您所需要的安裝!
DSSTATION> ipkg install unzip
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/unzip_5.52-3_powerpc.ipk
Configuring unzip
update-alternatives: Linking //opt/bin/unzip to /opt/bin/unzip-unzip
Successfully terminated.

