QNAP NAS is a good platform for
understanding the practices of developing embedded systems, since QNAP OS (
QTS) is a minimized Linux OS for optimizing the performance of NAS. That is you can not install any software with only one click on setup.exe, the
pre-required libraries and packages must manually installed before you can run a powerful App written with Qt for example. In Ubuntu, you are familiar with using apt-get to install packages. In QTS, you must learn how to use
ipkg.
Connect to QTS with SSH and type the command: ipkg
[/] # ipkg-sh: ipkg: command not found
By installing Optware IPKG, you open the door to installing many other software packages by many different developers. QNAP supplies Ipkg as a QPKG plugin on many of their products. This is probably the easiest way to install for most. We also give instructions on manual install.
|
Install Optware IPKG from App Center |
|
Open Optware IPKG and search packages from its Web UI |
|
In this example, search "gcc" and press "install" |
|
Optware IPKG issues command: ipkg install gcc |
Of course, you can install from command line through SSH terminal.
NOTE: if you are a native user for vi editor, try nano editor!
[/] # ipkg install gcc # install again, just check up to date!Package gcc (4.2.3-1) installed in root is up to date.Nothing to be doneSuccessfully terminated.[/] #
[/] # ipkg install nanoInstalling nano (2.2.6-1) to root...Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/nano_2.2.6-1_arm.ipkConfiguring nanoSuccessfully terminated.[/] # nano
So what is
IPKG?
ipkg, or the Itsy Package Management System, was a lightweight package management system designed for embedded devices that resembled Debian's dpkg. It was used in the Unslung operating system for the Linksys NSLU2 (Optware), in OpenWrt, Openmoko, webOS, Gumstix, the iPAQ, QNAP NASes, Synology NASes and elsewhere.
You can get all the packages supported by IPKG update now. The web search function provided by Optware IPKG merely runs linear search (grep) on this list.
Find adequate packages about your project in this list.
[/] # ipkg list9base - 4+20090827-1 - 9base is a port of a few original Plan 9 userland tools to Unix.abook - 0.5.6-2 - Abook is a text-based addressbook program designed to use with mutt mail client.ack - 1.96-1 - grep-like text finderadduser - 1.10.3-1 - a multi-call binary for login and user account administration...
[/] # ipkg list | grep "gcc"gcc - 4.2.3-1 - The GNU Compiler Collection.[/] #
[/share/Download] # ipkg list_installed > ipkg.list[/share/Download] #
Want to know what packages were installed?
[/share/Download] # ipkg list_installedbash - 3.2.49-1 - A bourne style shellbinutils - 2.19.1-1 - The GNU assembler and linker and related toolsgcc - 4.2.3-1 - The GNU Compiler Collection.ipkg-web - 7-7 - A web frontend for ipkglibc-dev - 2.5-5 - libc development files.libnsl - 2.5-4 - Network Services Libraryncurses - 5.7-3 - NCurses librariesreadline - 6.1-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they aresudo - 1.8.4.5-1 - System utility to execute commands as the superuserSuccessfully terminated.[/share/Download] # ipkg list_installed > ipkg.list[/share/Download] #
Remove packages:
[/share/Download] # ipkg remove nano Removing package nano from root...Successfully terminated.[/share/Download] #
The same with apg-get: ipkg update or ipkg upgrade
"ipkg update" will also download the newest package list
with detail metadata.
[/opt/lib/ipkg/lists] # ipkg update # Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gzInflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gzUpdated list of available packages in /opt/lib/ipkg/lists/cs08q1armelSuccessfully terminated.[/opt/lib/ipkg/lists] # ipkg upgradeNothing to be doneSuccessfully terminated.[/opt/lib/ipkg/lists] #
No comments :
Post a Comment