ipkg package manager installation on Synology NAS

This page contains a short tutorial on how to set up ipkg (Itsy Package Management System) on your Synoloy NAS.

Enable SSH

Make sure you can SSH into your NAS.
Browse to your Disk Station Manager and enable the SSH service.

dsm_enable_ssh.png

Check out the following guide from the Synology wiki:

SSH into the command line interface as root, not your admin user account. Widows users can use Putty.

Install bootstrap

You can read the complete or minimal explanations on the Synology wiki or follow the somewhat shorter steps I listed below.

Look up your CPU

Your Synology model will be in this list somewhere:

Some more options for the fun of it:

~ # lscpu
Architecture:          x86_64
CPU(s):                4
Thread(s) per core:    2
Core(s) per socket:    2
CPU socket(s):         1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 54
Stepping:              1
CPU MHz:               2128.122
L1d cache:             24K
L1i cache:             32K
L2 cache:              512K
~ # uname --machine
x86_64

Download the right bootstrap file.

syno-i686-bootstrap_1.2-7_i686.xsh in my case. You can do it as follows in your terminal:

wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh

Make the script executable

chmod +x syno-i686-bootstrap_1.2-7_i686.xsh

Run the script

sh syno-i686-bootstrap_1.2-7_i686.xsh. I get the following output:

MyNAS> sh syno-i686-bootstrap_1.2-7_i686.xsh
Optware Bootstrap for syno-i686.
Extracting archive... please wait
bootstrap/
bootstrap/bootstrap.sh
bootstrap/ipkg-opt.ipk
bootstrap/ipkg.sh
1216+1 records in
1216+1 records out
bootstrap/optware-bootstrap.ipk
bootstrap/wget.ipk
Creating temporary ipkg repository...
Installing optware-bootstrap package...
Unpacking optware-bootstrap.ipk...Done.
Configuring optware-bootstrap.ipk...Modifying /etc/rc.local
Done.
Installing ipkg...
Unpacking ipkg-opt.ipk...Done.
Configuring ipkg-opt.ipk...WARNING: can't open config file: /usr/syno/ssl/openssl.cnf
Done.
Removing temporary ipkg repository...
Installing wget...
Installing wget (1.12-2) to root...
Configuring wget
Successfully terminated.
Creating /opt/etc/ipkg/cross-feed.conf...
Setup complete.

BusyBox v1.16.1 (2014-05-29 11:29:56 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

MyNAS>

Remove the script again

rm syno-i686-bootstrap_1.2-7_i686.xsh

Reboot

Reboot the NAS and log in again as root.
http://www.synology.com/en-uk/support/faq/355

Update

Update the list of available packages

/opt/bin/ipkg update

Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/Packages.gz
pathconf: Value too large for defined data type
pathconf: Value too large for defined data type
Inflating http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/cross
Successfully terminated.

Upgrade

Upgrade any ipkg installed packages to the latest versions: /opt/bin/ipkg upgrade

Note

I noticed just running ipkg failed, so uncomment the following two lines as follows in /root/.profile:

#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
#export PATH

See point 8 on http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc#How_to_install_ipkg for help.

Reload the shell after this to get ipkg working.

I also added :/opt/sbin:/opt/bin to get IPKG working for root without having to add a path in front.

Install the tools you want

ipkg install programname
http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/ lists everything available for the i686 architecture.

screen
less
tree
htop
vim

rsnapshot

A short list of the more useful 900+ ipkg packages

The following will make sure wget can handle https links too:

ipkg remove wget
ipkg install wget-ssl
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License