# iPKG (DSM 6)



### Installer iPKG:

Se connecter en root:

```bash
ssh bruno@192.168.1.7
#puis
bruno@DS916:~ $ sudo -i
root@DS916:~#
```

Télécharger et installer le bootstrap correspondant au processeur du NAS:

- Pour le DS414 → MARVELL Armada XP MV78230 → processeur ARM v7 avec FPU → ARMv7 EABI hardfloat


- Pour le DS916 → INTEL Pentium N3710


[Optware-ng](https://github.com/Optware/Optware-ng)

```bash
DiskStation> cd /volume1/@tmp

# DS414
DiskStation> wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh | sh
# DS916
DiskStation> wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-i686-bootstrap.sh | sh

DiskStation> chmod +x buildroot-armeabihf-bootstrap.sh
DiskStation> sh buildroot-armeabihf-bootstrap.sh
```

```bash
./data.tar.gz
./
./opt/
./opt/bin/
./opt/bin/ipkg-static
./opt/bin/ipkg
./opt/bin/update-alternatives
./opt/var/
./opt/var/lock/
./opt/share/
./opt/share/man/
./opt/share/man/man1/
./opt/share/man/man1/opkg-cl.1
./opt/share/opkg/
./opt/share/opkg/intercept/
./opt/share/opkg/intercept/update-modules
./opt/share/opkg/intercept/depmod
./opt/share/opkg/intercept/ldconfig
./opt/etc/
./opt/etc/ipkg/
./opt/etc/ipkg/ipkg.conf
./opt/etc/ipkg.conf
Bootstraping done
Installing glibc-locale package to generate needed /opt/lib/locale/locale-archive
```

Une fois l'installation terminée:

```bash title="Mettre à jour la liste des packages"
DiskStation> /opt/bin/ipkg update
```



```bash title="Nettoyer le dossier d'installation"
DiskStation> cd /volume1/@tmp
DiskStation> rm buildroot-armeabihf-bootstrap.sh
```



### Principales commandes



```bash title="Afficher la liste des packages"
/opt/bin/ipkg list
```

```bash title="Afficher la liste des packages installés"
/opt/bin/ipkg list-installed
```

```bash title="Installer une application"
/opt/bin/ipkg install pkg
```

```bash title="Mettre à jour les packages"
/opt/bin/ipkg upgrade
```

```bash title="Supprimer un package"
/opt/bin/ipkg remove pkg
```



### Mettre à jour iPKG:

Se connecter sous un compte admin:

```bash
ssh bruno@192.168.0.8
```

Mettre à jour les paquets installés:

```bash
DiskStation> /opt/bin/ipkg update
DiskStation> /opt/bin/ipkg upgrade
```



### Désinstaller iPKG:

```bash
rm -rf /volume1/@optware
rm -rf /usr/lib/ipkg
```



### Rajouter /opt/bin dans le PATH:

```bash
DiskStation> cd /root
DiskStation> /opt/bin/nano .profile

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/opt/bin
```