Aller au contenu
Cheat Sheet
Linux

[Synology] Installer IPKG sur DS214

Pour pouvoir installer les outils indispensables (less, grep, …) sur la console du DiskStation, il faut installer IPKG, un gestionnaire de paquets léger.

Cette manipulation fonctionne avec le DS214.

  • Activer SSH sur le Synology.
  • S’y connecter en tant que root.
  • Créer le répertoire pour OptWare :
mkdir /volume1/@optware
mkdir /opt
mount -o bind /volume1/@optware /opt
  • On installe IPKG :
feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'`
wget $feed/$ipk_name
tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src cross $feed" > /opt/etc/ipkg/feeds.conf

(Source: http://www.nslu2-linux.org/wiki/Optware/HomePage)

  • On ajoute les chemins dans le PATH :
    • Dans le fichier /etc/profile on rajoute /opt/bin:/opt/sbin: dans la variable PATH.
    • Dans le fichier /root/.profile on rajoute /opt/bin:/opt/sbin: dans la variable PATH.
  • On ajoute un script d’initialisation /etc/rc.local qui permettra de binder automatiquement le répertoire /volume1/@optware vers /opt et déclencher les scripts de /init.d/*.
touch /etc/rc.local
chmod 755 /etc/rc.local
vi /etc/rc.local
  • On met dans ce fichier le code suivant :
#!/bin/sh

# Optware setup
[ -x /etc/rc.optware ] && /etc/rc.optware start
  • On crée le fichier rc.optware :
touch /etc/rc.optware
chmod 755 /etc/rc.optware
vi /etc/rc.optware
  • On met dans ce fichier le code suivant :
#! /bin/sh

if test -z "${REAL_OPT_DIR}"; then
# next line to be replaced according to OPTWARE_TARGET
REAL_OPT_DIR=/volume1/@optware
fi

case "$1" in
    start)
        echo "Starting Optware."
        if test -n "${REAL_OPT_DIR}"; then
            if ! grep ' /opt ' /proc/mounts >/dev/null 2>&1 ; then
                mkdir -p /opt
                mount -o bind ${REAL_OPT_DIR} /opt
            fi	
        fi
	[ -x /opt/etc/rc.optware ] && /opt/etc/rc.optware
    ;;
    reconfig)
	true
    ;;
    stop)
        echo "Shutting down Optware."
	true
    ;;
    *)
        echo "Usage: $0 {start|stop|reconfig}"
        exit 1
esac

exit 0
  • On redémarre le NAS.
  • On met à jour la liste des packages avec la commande
ipkg update
  • On installe les packages avec ipkg install. Par exemple :
ipkg install less

Sources : https://gist.githubusercontent.com/klein0r/3b200048b7bfa9806f57/raw/2d71cf541f98fef59916d045441a481341db5fa4/ds214-ipkg-install
Lien utile : https://www.tumfatig.net/20120210/improve-synology-ds409slim-shell-using-ipkg/

[Notepad++] Enchaîner les « rechercher / remplacer »
[Google Sheet] Mettre en évidence les doublons
ds214 linux synology

Articles similaires

ModuleNotFoundError: No module named ‘apt_pkg’
Héberger plusieurs sites dans des…
Héberger un site dans un…
[Linux] Réparer une installation en…
Publier un site Flask sur…
[Debian] Mettre à jour vers…
Récupérer un MP3 depuis YouTube
[Linux] Rediriger vers un fichier…
Tmux
[Linux] Compter le nombre de…

Catégories

  • Android
  • Calibre
  • Docker
  • Excel
  • Git
  • Google Sheet
  • Knime
  • Linux
  • Logiciels
  • Matériel
  • Non classé
  • Notepad++
  • PHP
  • Power BI
  • Programmation
  • Python
  • Qlik
  • Service
  • Synology
  • Visual Studio Code
  • VSCode
  • Windows
  • Word
  • WordPress

Étiquettes

adb android apache audio calibre convertion css debian docker drivers excel fichiers firefox flask google grep html kobo linux manette markdown mp3 notepad++ office php pip portable privoxy python qlik qliksense qlikview realtek selenium synology tor venv vim virtualenv vscode web windows wordpress xargs youtube

Tags

adb android apache audio calibre convertion css debian docker drivers excel fichiers firefox flask google grep html kobo linux manette markdown mp3 notepad++ office php pip portable privoxy python qlik qliksense qlikview realtek selenium synology tor venv vim virtualenv vscode web windows wordpress xargs youtube
Thème par Colorlib Propulsé par WordPress