[Optware/Ipkg] Install any Linux app on TS-109/209/PRO (UPD)

Discussions and howtos on the installation and the use of Optware/Ipkg on all QNAP Series products. For those wonders, Ipkg in the other words - Install hundreds of Linux software applications with one line of command.

[Optware/Ipkg] Install any Linux app on TS-109/209/PRO (UPD)

Postby Misiek » Sun Oct 28, 2007 3:49 am

Open Turbostation on TS-109/209/PRO

[EDIT]
revisited 05.30.08
ipkg updated to version 0.99.163
the sit-back approach updated to installation by QPKG.

***
WARNING YOU DOING IT AT YOUR OWN RISK I TAKE NO RESPONSIBILITY FOR ERRORS AND PROBLEMS BECAUSE OF DOING THIS
***


>> The Sit Back Approach >>>>>>>>>>>>>>>>>>>>>

Instruction:

For new installation:

The installation method is even simplified by install it via QPKG.

1. First update your firmware to the latest build.
2. In your 'System Tools' -> 'QPKG' page, click on 'Get QPKG' button.
3. Download 'Optware IPKG' package that matches your model.
4. Unzip the downloaded archive then install it (.qpkg file) via the 'System Update' under your 'System Tools' page.

For migration from previous install to the QPKG'ed install, please refer to here.



>> The Hands-On Approach >>>>>>>>>>>>>>>>>>>>

Name: Optware/Ipkg self installation procedures
Who: Misiek - The originator! He wrote 95% of this howto and he wishes to make a shout to his wife *Thanks to my wife for give me time for modyfing Qnaps*
Who2: Tibus -> Re-write all to make it more clearer and more readable
who3: QNAPAndy -> For points 5 & 7 and his support in general
When: 12.01.2007


1. Check the size of the root partition !

If its more then 83% it can make problems

Firstly check what is your HD partition

Code: Select all
# df


You will see on TS-109 something like this :
Code: Select all
/dev/ram0 8.7M 8.7M 0 100% /
/dev/sda4 58.1M 46.7M 11.4M 80% /mnt/ext
/dev/sda1 509.5M 69.3M 440.2M 14% /mnt/HDA_ROOT
/dev/sda3 457.4G 167.6M 457.2G 0% /share/HDA_DATA


On TS-209 something like this :

Code: Select all
/dev/ram0 8.7M 6.9M 1.8M 79% /
/dev/sda4 58.1M 42.3M 15.8M 73% /mnt/ext
/dev/md9 509.5M 68.3M 441.1M 13% /mnt/HDA_ROOT
/dev/md0 457.4G 152.0G 305.3G 33% /share/MD0_DATA


So if your HD partition is HDA_DATA you use it everywhere bellow insted MD0_DATA

2. Prepare the directories to receive the ipkg install

Code: Select all
# mkdir -p /share/MD0_DATA/big-disk/opt
# mkdir /share/MD0_DATA/big-disk/ipkglib
# cd /; ln -sf /share/MD0_DATA/big-disk/ipkglib /usr/lib/ipkg
# rm -rf /opt
# cd /; ln -sf /share/MD0_DATA/big-disk/opt /opt


Check if /opt is symlinked to /share/MD0_DATA/big-disk/opt :
Code: Select all
# cd /
# ls -la


You should see :
Code: Select all
opt -> /share/MD0_DATA/big-disk/opt/


3. Download and "install" ipkg

First, go to big-disk to avoid messing up free space on root partition then download and "install"
Code: Select all
# cd /share/MD0_DATA/big-disk
# wget http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/unstable/ipkg-opt_0.99.163-9_arm.ipk
# tar -xOvzf ipkg-opt_*_arm.ipk ./data.tar.gz | tar -C / -xzvf -


Edit /opt/etc/ipkg.conf
Code: Select all
# vi /opt/etc/ipkg.conf


Add the line
Code: Select all
src mssii http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable


Update the package list :
Code: Select all
# /opt/bin/ipkg update


You should see :
Code: Select all
[/] # /opt/bin/ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/mssii
Successfully terminated.


If there are errors or you do not see Downloading info that means that either you did not edit ipkg.conf mentioned before or hm.

4. Install applications (mc in this example)

Change to big-disk directory cause this ipkg left some strange files which makes / partition to small, i dont know if its an error or something

(Installing mc i had some problems with slang so i needed to do it separatly)

Code: Select all
# cd /share/MD0_DATA/big-disk
# /opt/bin/ipkg update
# /opt/bin/ipkg install slang
# /opt/bin/ipkg install mc --tmp-dir=/share/MD0_DATA/


And then to run mc
Code: Select all
/opt/bin/mc


5. Mount /opt on every reboot

Code: Select all
# mount /dev/mtdblock5 -t ext2 /tmp/config
# cd /tmp/config
# vi autorun.sh

Add to the following lines to the file then save and close
rm -rf /opt
ln -sf /share/MD0_DATA/big-disk/opt /opt

Make autorun.sh executable and do not forget to unmount !
Code: Select all
# chmod 755 autorun.sh
# cd /
# umount /dev/mtdblock5


After reboot you should have everything mounted on /opt so you can use /opt/bin/<command>

6. Add /opt/bin to PATH on reboot

Code: Select all
# mount -t ext2 /dev/mtdblock5 /mnt/config
# cd /mnt/config
# vi autorun.sh

Add the following line at the bottom then save and exit vi:
echo "export PATH=/opt/bin:$PATH" >> /etc/profile

Do not forget to unmount !
Code: Select all
# cd /
# umount /mnt/config



7. Uninstall procedure:

Code: Select all
# rm -rf /usr/lib/ipkg
# rm -rf /share/MD0_DATA/big-disk
# rm -rf /opt


8. Thanks !
Last edited by Misiek on Fri Nov 02, 2007 2:41 am, edited 8 times in total.
Misiek
Cadet
 
Posts: 53
Joined: Sat Oct 20, 2007 1:41 am

Postby QNAPAndy » Sun Oct 28, 2007 6:06 pm

here you can add your own startup script but pay special attentions:

1. mount /dev/mtdblock5 -t ext2 /tmp/config
2. cd /tmp/config
2. vi autorun.sh (write your ln -s xxx xxx scripts here)
3. chmod 755 autorun.sh
4. cd /root
5. umount /dev/mtdblock5


This script runs before bash every time your system boots up
=============================================================>>>
TS-639-Pro [RAID5][Optware][MLDonkey][Hosting My Ubuntu VM via ISCSI]
TS-219-Pro [RAID1][Squeeze Center 7.3][Twonkymedia]
Buffalo WHR-HP-G54 [DD-WRT][D-Link DGS-1005D][GigaLAN]
=============================================================>>>
User avatar
QNAPAndy
Site Admin
 
Posts: 2369
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan
NAS Model: TS-509 Pro

Postby Misiek » Sun Oct 28, 2007 11:14 pm

Very helpfull thanks very much now i have my total managed web disk with apps i want you should really consider adding this tutorial to Sticky after cross checking it it will make many people stop asking many questions about it.

But write that is just for people know what linux is :)
Misiek
Cadet
 
Posts: 53
Joined: Sat Oct 20, 2007 1:41 am

Postby QNAPAndy » Mon Oct 29, 2007 7:58 am

i'll sticky it if you can add the missing parts on how to set it up permanently, maybe a more descriptive topic title and plus how to uninstall it. Apart from that, it's a great howto! :D
=============================================================>>>
TS-639-Pro [RAID5][Optware][MLDonkey][Hosting My Ubuntu VM via ISCSI]
TS-219-Pro [RAID1][Squeeze Center 7.3][Twonkymedia]
Buffalo WHR-HP-G54 [DD-WRT][D-Link DGS-1005D][GigaLAN]
=============================================================>>>
User avatar
QNAPAndy
Site Admin
 
Posts: 2369
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan
NAS Model: TS-509 Pro

Postby Misiek » Wed Oct 31, 2007 6:35 am

Now its all in howto :D
Misiek
Cadet
 
Posts: 53
Joined: Sat Oct 20, 2007 1:41 am

Postby QNAPAndy » Wed Oct 31, 2007 12:10 pm

great stuff dude, i am running it on my TS-209 too. 8)

So do u know if there's site u can search for softwares for this arm build?
=============================================================>>>
TS-639-Pro [RAID5][Optware][MLDonkey][Hosting My Ubuntu VM via ISCSI]
TS-219-Pro [RAID1][Squeeze Center 7.3][Twonkymedia]
Buffalo WHR-HP-G54 [DD-WRT][D-Link DGS-1005D][GigaLAN]
=============================================================>>>
User avatar
QNAPAndy
Site Admin
 
Posts: 2369
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan
NAS Model: TS-509 Pro

Postby QNAPAndy » Wed Oct 31, 2007 12:24 pm

didn't look properly..
i guess it's here:
Updated list of available packages in /opt/lib/ipkg/lists/mssii
=============================================================>>>
TS-639-Pro [RAID5][Optware][MLDonkey][Hosting My Ubuntu VM via ISCSI]
TS-219-Pro [RAID1][Squeeze Center 7.3][Twonkymedia]
Buffalo WHR-HP-G54 [DD-WRT][D-Link DGS-1005D][GigaLAN]
=============================================================>>>
User avatar
QNAPAndy
Site Admin
 
Posts: 2369
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan
NAS Model: TS-509 Pro

Postby Misiek » Wed Oct 31, 2007 6:08 pm

Yep its all there now, you can also look into the online source from which ipkg update the list :), Im happy that you like it, in quite few moments i will be testing it on my TS-109 Box so i will have confirmation, go or no go :D
Misiek
Cadet
 
Posts: 53
Joined: Sat Oct 20, 2007 1:41 am

Postby Misiek » Wed Oct 31, 2007 6:51 pm

I updated the source list, updated installation info for using tmp-dir on HDD and also i added information to correctly identuify mounting of HDD
Misiek
Cadet
 
Posts: 53
Joined: Sat Oct 20, 2007 1:41 am

Postby L3rd » Fri Nov 02, 2007 5:03 pm

I have a couple of comments:
if you want to make a permament link /opt/bin/<app> to /usr/bin/<app>


Instead to crete a permanent link for every app, can we add /opt/bin to the PATH?

its important cause this ipkg left some strange files which makes / partition to small, i dont know if its an error or something


Can you explain better the issue?

/opt/bin/ipkg install <pkg_foo> --tmp-dir=/share/MD0_DATA/ ex. /opt/bin/ipkg install mc --tmp-dir=/share/MD0_DATA/


Instead to specify the tmp dir everytime, can we save it as default?
Moreover why
/share/MD0_DATA/
and not
Code: Select all
/share/MD0_DATA/big-disk/tmp
L3rd
Cadet
 
Posts: 24
Joined: Thu Sep 20, 2007 8:11 pm

Next

Return to Optware / IPKG Modz

Who is online

Users browsing this forum: No registered users and 1 guest