Benutzer-Werkzeuge

Webseiten-Werkzeuge


synology

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
synology [2016/07/31 22:23] – [Befehle] ollisynology [2023/02/11 11:38] (aktuell) – [nützliche Pakete] olli
Zeile 2: Zeile 2:
 NAS auf Basis von Linux NAS auf Basis von Linux
  
-===== IPKG ===== +===== Entware===== 
 +<WRAP info round> 
 +''optware'' und der Nachfolger ''optware-**ng**'' werden nicht mehr gepflegt. Hier wird daher die Installation von ''entware''  beschrieben. 
 +</WRAP>
 ==== Installation ==== ==== Installation ====
-  * Per SSH als root einloggen +  * Per SSH einloggen 
-  * CPU identifizieren: <code bash>cat /proc/cpuinfo | grep cpu</code>+  * zu ''root'' wechseln<code bash>sudo -i</code> 
 +  * permanentes Verzeichnis erstellen: <code bash>mkdir -p /volume1/@Entware/opt</code> 
 +  * <WRAP important round>Sicherstellen, dass ''/opt/'' leer ist. Das Verzeichnis wird in diesem Schritt entfernt.</WRAP>''/opt/'' entfernen und ''bind'' erstellen:<code bash>rm -rf /opt 
 +mkdir /opt 
 +mount -o bind "/volume1/@Entware/opt" /opt</code> 
 +  * CPU-Typ auszeigen: <code bash>uname -m</code>
   * Bootstrap-Skript nach CPU-Typ auswählen:   * Bootstrap-Skript nach CPU-Typ auswählen:
  
 ^CPU^ Bootstrap Skript^ ^CPU^ Bootstrap Skript^
-|ARM (armv5tejl)| http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh+|armv8 (aarch64Realtek RTD129x<code bash>wget -O - http://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/sh</code>
-|PowerPC (ppc_6xx)| http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/ds101-bootstrap_1.0-4_powerpc.xsh+|armv5|<code bash>wget -O - http://bin.entware.net/armv5sf-k3.2/installer/generic.sh | /bin/sh</code>
-|PowerPC (ppc_85xx, e500v?)| http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh+|armv7|<code bash>wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/sh</code>
-|Marvell Kirkwood 88F6281, 88F6282, 88FR131 (ARMv5TE Feroceon)| http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/syno-mvkw-bootstrap_1.2-7_arm.xsh| +|x64|<code bash>wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh</code>|
-|Intel Atom| http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh|+
  
-   Bootstrap-Skript für passende Plattform herunterladen, z.B.:<code bash>cd /volume1/@tmp && +  Unter ''DSM'' -> ''Systemsteuerung'' -> ''Aufgabenplaner'' folgendes auswählen''Erstellen'' -> ''Ausgelöste Aufgabe'' -> ''Benutzerdefiniertes Skript''
-wget http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh</code> +     Unter ''Allgemein'':<code>  
-   Skript ausführen<code bash>sh syno-e500-bootstrap_1.2-7_powerpc.xsh</code> +        VorgangEntware 
-   In /etc/profile nach den Zeilen<code bash+        Benutzerroot 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin +        EreignisHochfahren 
-export PATH</code> diese einfügen<code bash> +        Vor-Aufgabeleer lassen</code> 
-PATH=/opt/bin:/opt/sbin:$PATH +    Unter ''Aufgabeneinstellung'' -> ''Befehl ausführen'': unten stehendes Skript einfügen:<code bash>
-export PATH +
-</code> +
-In /root/.profile müssen die erstgenannten Zeilen auskommentiert sein. In DSM Version <5 galten die Änderung in /root/.profile für alle Benutzer.  +
-  * Optware-Verzeichnis umounten<code bash>umount /opt</code> +
-  Symbolischen Link anlegen: <code bash>rmdir /opt +
-ln -s /volume1/@optware /opt</code> +
-  * optware.sh unter /usr/local/etc/rc.d/optware.sh anlegen:<file bash optware.sh>+
 #!/bin/sh #!/bin/sh
-# 
-# Optware setup 
-# Alternatives Optware Startup und Shutdown Script #/usr/local/etc/rc.d/optware.sh 
-# 
-case $1 in 
-start) 
-       [ ! -h /opt -a ! -d /opt ] && ln -s /volume1/@optware /opt 
-       for i in /opt/etc/init.d/S??* ;do 
-# 
-               # Ignore dangling symlinks (if any). 
-               [ ! -f "$i" ] && continue 
-# 
-               case "$i" in 
-                  *.sh) 
-                       # Source shell script for speed. 
-                       ( 
-                               trap - INT QUIT TSTP 
-                               set start 
-                               . $i 
-                       ) 
-                       ;; 
-                  *) 
-                       # No sh extension, so fork subprocess. 
-                       $i start 
-                       ;; 
-               esac 
-       done 
-       ;; 
-# 
-stop) 
-# 
-       for i in /opt/etc/init.d/S??* ;do 
-# 
-               # Ignore dangling symlinks (if any). 
-               [ ! -f "$i" ] && continue 
-# 
-               case "$i" in 
-                  *.sh) 
-                       # Source shell script for speed. 
-                       ( 
-                               trap - INT QUIT TSTP 
-                               set stop 
-                              . $i 
-                       ) 
-                       ;; 
-                  *) 
-                       # No sh extension, so fork subprocess. 
-                       $i stop                       ;; 
-               esac 
-         done 
-         ;; 
-# 
-*) 
-         echo "Usage: $0 [start|stop]" 
-         ;; 
-esac 
-# 
-# End 
-</file> 
-  * Skript ausführbar machen: <code bash>chmod +x /usr/local/etc/rc.d/optware.sh</code> 
  
-=== Links === +# Mount/Start Entware 
-[[http://www.synology-wiki.de/index.php/IPKG|IPKG-Installation im Synology-Wiki]]+mkdir -p /opt 
 +mount -o bind "/volume1/@Entware/opt" /opt 
 +/opt/etc/init.d/rc.unslung start
  
-==== nützliche Pakete ==== +# Add Entware Profile in Global Profile 
-<code bash> +if grep  -qF  '/opt/etc/profile' /etc/profile; then 
-ipkg install nano git core-utils + echo "Confirmed: Entware Profile in Global Profile" 
-</code>+else 
 + echo "Adding: Entware Profile in Global Profile" 
 +cat >> /etc/profile <<"EOF"
  
-===== Synology als Scanserver ===== +Load Entware Profile 
-   * SANE installieren: <code bash> +. /opt/etc/profile 
-ipkg install sane-backends libusb inetutils libieee1284</code> +EOF 
-   * SANE konfigurieren\\ z.B. [[#scanner_acer_620u_fuer_diskstation|Acer 620U]] +fi
-   * eigenes Subnetz, bzwClients, die scannen dürfen in /opt/etc/sane.d/saned.conf eintragen\\ für gesamtes lokales Netz 192.168.0.1-254 z.B. 192.168.0.1/24 (nicht /29) +
-   * /etc/inetd.conf  bearbeiten:<code> +
-sane-port  stream  tcp  nowait  root  /opt/sbin/saned saned +
-</code> +
-   * /etc/services bearbeiten:<code> +
-sane-port       6566/tcp        # SANE network scanner daemon +
-</code> +
-  * inetd neustarten<code bash> +
-/usr/syno/etc/rc.d/S03inetd.sh restart+
 </code> </code>
  
-==== Debugging ==== 
-  * saned manuell (ohne inetd) mit Debuggingoutput starten:<code bash> 
-saned -d5 
-</code> 
-  * per Telnet auf Port 6566 verbinden 
  
 +=== Links ===
 +   * [[https://github.com/Optware/Optware-ng|optware-ng Homepage (veraltet)]]
 +   * [[https://gist.github.com/ffeldhaus/226f2c5743a7f631806d|Bootstrap the Synology DS215j with optware-ng (veraltet)]]
 +   * [[https://github.com/Entware/Entware/wiki/Install-on-Synology-NAS|Install entware on Synology NAS]]
  
- +==== nützliche Pakete ==== 
- +<code bash
-===== Scanner Acer 620U für Diskstation===== +opkg install nano git unzip
-Die Konfiguration ist ähnlich wie [[sane#scanner_acer_620u_unter_linux|hier]] beschrieben, lediglich die Pfade sind anders: +
-  * Firmwaredatei "u96v121.bin" aus dem Windowstreiber extrahieren. +
-  * Firmware nach /volume1/@optware/share/sane/snapscan/ verschieben +
-  * nano /volume1/@optware/etc/sane.d/snapscan.conf anpassen: <code> +
-firmware /volume1/@optware/share/sane/snapscan/u96v121.bin+
 </code> </code>
  
 ===== Unison ===== ===== Unison =====
-[[Unison]] ist nicht über ipkg erhältlich, deshalb muss man es selbst kompilieren. Unison ist in ocaml programmiert, deshalb braucht man den ocaml-Compiler. Zusätzlich gibt es noch ocamlopt, einen Optimizer, der die Ausführung beschleunigt. ocamlopt aber nicht im ocaml-Paket von ipkg enthalten+[[Unison]] ist nicht über entware erhältlich, deshalb muss man es selbst kompilieren. Unison ist in ocaml programmiert, deshalb braucht man dafür den ocaml-Compiler. Dieser ist ebenfalls nicht über entware erhältlich und muss daher auch [[synology#ocaml|selbst kompiliert]] werden. 
 +Unison ist anspruchsvoll, was die Kompatibilität zwischen verschiedenen [[unison#versionen|Versionen]] angeht.
  
-==== ohne ocamlopt ==== +  [[synology#ocaml|ocaml]] selbst kompilieren (''gcc'' und ''make'' werden dort installiert) 
-  Tools installieren<code bash> +  * [[https://github.com/bcpierce00/unison/releases|Unison Sourcen]] herunterladen und entpacken z.B. nach ''/volume1/@tmp''
-ipkg install ocaml make gcc</code> +
-  * Unison Sourcen herunterladen und entpacken z.B. nach /volume1/@tmp+
   * Kompilieren: <code bash>   * Kompilieren: <code bash>
-make UISTYLE=text NATIVE=false+make UISTYLE=text NATIVE=true 
 </code> </code>
 +  * Executable ''unison'' aus dem Verzeichnis ''src'' in ein Verzeichnis im ''PATH'' kopieren bzw. ''PATH'' entsprechend anpassen
 +
 +<WRAP info round>
 +''NATIVE=true'' erzeugt schnelleren, nativen Code. Auf manchen ARM-Architekturen führt das u.U. zu falschem Code, siehe [[https://github.com/ocaml/ocaml/pull/1411|Bugreport]].
 +Dies kann zu ''Failed to fingerprint file "/dir/file": the file keeps on changing'' [[https://unison-users.yahoogroups.narkive.com/SIOIUtJI/can-t-fingerprint-after-update-1-attachment|führen]].
 +Auch PowerPC e500v2 ist betroffen (mindestens in der Kombination Unison 2.51.5 kompiliert mit Ocaml 4.12.0).
 +Als Abhilfe kann man auf diesen Architekturen dann mit ''NATIVE=false'' zu langsameren Bytecode kompilieren.
 +</WRAP>
  
-==== mit ocamlopt ==== 
-  * Tools installieren<code bash> 
-ipkg install make gcc</code> 
-  * [[synology#ocaml|ocaml]] selbst kompilieren 
-  * Unison Sourcen herunterladen und entpacken z.B. nach /volume1/@tmp 
-  * Kompilieren: <code bash> 
-make UISTYLE=text NATIVE=true 
-</code> 
  
 ===== Ocaml =====  ===== Ocaml ===== 
-  * ipkg-Paket deinstallieren, falls installiert<code> 
-ipkg remove ocaml</code> 
   * Tools installieren<code>   * Tools installieren<code>
-ipkg install gcc make</code> +opkg install gcc make</code> 
-  * ocaml sourcen herunterladen und entpacken z.B. nach /volume1/@tmp+  * [[https://ocaml.org/releases/|ocaml Sourcen]] herunterladen und entpacken z.B. nach ''/volume1/@tmp''
   * Konfigurieren: <code>   * Konfigurieren: <code>
-./configure --prefix=/opt</code>+./configure --prefix /opt</code>
   * Kompilieren: <code>   * Kompilieren: <code>
 make world.opt</code> make world.opt</code>
-  * Installieren <code bash> +  * Installieren (als root)<code bash> 
-sudo make install</code>+make install</code>
  
 ===== rsync ===== ===== rsync =====
Zeile 174: Zeile 99:
 </code> </code>
  
-===== GIT-Server ===== +Unter DSM 7 liegt diese Einstellung unter Systemsteuerung -> Dateidienste -> rsync. 
-  * Git installieren:<code bash> + 
-ipkg install git +===== screen ===== 
-</code+[[screen]] kann über ''opkg install screen'' installiert werden. 
-  * Benutzer git anlegen + 
-  * SSH-Zugang für Benutzer git freischalten +==== Fehler "Cannot find termcap entry for 'xterm-256color'" ==== 
-  * symbolische Links anlegen (als root)<code bash>+Die Ursache für die Fehlermeldung ''Cannot find termcap entry for %%'%%xterm-256color%%'%%'' ist, dass die termcap-Datei unter ''/opt/etc/termcap'' keinen Eintrag für ''xterm-256color'' enthält, das von neueren Version von ''gnome-terminal'' (und anderen Terminals) als Standardeinstellung verwendet wird. Mögliche Abhilfen sind: 
 +  * screen mit xterm starten (''TERM=xterm screen''), dazu am besten ''alias screen=%%'%%TERM=xterm screen%%'%%'' in  ''/etc/profile'' eintragen oder 
 +  * das Paket ''ncurses-base'' (''ipkg install ncurses-base'') installieren und screen mit gesetztem TERMINFO starten (''TERMINFO=%%'%%/usr/share/terminfo/%%'%% screen''), dazu am besten ''alias screen=%%'%%TERMINFO=%%'%%/usr/share/terminfo/%%'%% screen%%'%%'' in  ''/etc/profile'' eintragen 
 + 
 +===== GIT-Server (mit gitolite)===== 
 +<WRAP info round>Annahmen: Das Paket ''perl'' ist bereits über das Paketzentrum installiert und Benutzerverzeichnisse sind über ''Systemsteuerung'' -> ''Benutzer'' -> ''Erweitert'' -> -> ''Benutzer-Basis'' -> ''Benutzer-Home-Dienst aktivieren'' aktiviert. </WRAP
 +  * Benutzer ''git'' anlegen, damit SSH-Zugriff funktioniert muss der Benutzer in der Gruppe ''administrators'' sein 
 +  * git installieren 
 +        * Möglichkeit 1: das Paket "Git Server" aus dem Paketzentrum installieren (Serverfunktionalität wird nicht genutzt, nur Benutzung der git Binaries, Vorteil kann über das Paketzenreum aktualisiert werden) 
 +        * Möglichkeit 2: Git über opkg installieren (Vorteil: manchmal aktuellere Git-Version verfügbar, muss über opkg aktualisiert werden), dazu 
 +              * dazu (als root)<code bash> 
 +opkg install git 
 +</code>        
 +              *symbolische Links anlegen (als root)<code bash>
 ln -s /opt/bin/git* /usr/bin/  ln -s /opt/bin/git* /usr/bin/ 
 </code> </code>
Zeile 186: Zeile 124:
 ssh-keygen ssh-keygen
 </code> </code>
-  * Key .ssh/id_rsa.pub auf die Diskstation kopieren (nach /volume1/homes/git/NAME.pub)+  * Key .ssh/id_rsa.pub auf die Diskstation kopieren (nach ''/volume1/homes/git/NAME.pub'')
   * Installation starten (als Benutzer git)<code bash>   * Installation starten (als Benutzer git)<code bash>
 git clone git://github.com/sitaramc/gitolite git clone git://github.com/sitaramc/gitolite
Zeile 194: Zeile 132:
 </code> </code>
  
-[[http://web.archive.org/web/20130803022500/http://www.bluevariant.com/2012/05/comprehensive-guide-git-gitolite-synology-diskstation|+  * [[http://web.archive.org/web/20130803022500/http://www.bluevariant.com/2012/05/comprehensive-guide-git-gitolite-synology-diskstation|
 Comprehensive Guide to Git and Gitolite on a Synology DiskStation (via Wayback Machine)]] Comprehensive Guide to Git and Gitolite on a Synology DiskStation (via Wayback Machine)]]
  
Zeile 204: Zeile 142:
   * NAS neustarten: <code bash>   * NAS neustarten: <code bash>
 reboot reboot
 +</code>
 +
 +===== Synology als Scanserver =====
 +<WRAP alert round>
 +Die Synology wird von mir nicht mehr als Scan-Server verwendet und daher wird dieser Abschnitt nicht mehr aktualisiert. Der folgende Stand beschreibt das Vorgehen für das mittlerweile obsolete ''optware''</WRAP>
 +   * SANE installieren: <code bash>
 +ipkg install sane-backends libusb inetutils libieee1284</code>
 +   * SANE konfigurieren\\ z.B. [[#scanner_acer_620u_fuer_diskstation|Acer 620U]]
 +   * eigenes Subnetz, bzw. Clients, die scannen dürfen in /opt/etc/sane.d/saned.conf eintragen\\ für gesamtes lokales Netz 192.168.0.1-254 z.B. 192.168.0.1/24 (nicht /29)
 +   * /etc/inetd.conf  bearbeiten:<code>
 +sane-port  stream  tcp  nowait  root  /opt/sbin/saned saned
 +</code>
 +   * /etc/services bearbeiten:<code>
 +sane-port       6566/tcp        # SANE network scanner daemon
 +</code>
 +  * inetd neustarten<code bash>
 +/usr/syno/etc/rc.d/S03inetd.sh restart
 +</code>
 +
 +==== Debugging ====
 +  * saned manuell (ohne inetd) mit Debuggingoutput starten:<code bash>
 +saned -d5
 +</code>
 +  * per Telnet auf Port 6566 verbinden
 +
 +==== Scanner Acer 620U für Diskstation====
 +Die Konfiguration ist ähnlich wie [[sane#scanner_acer_620u_unter_linux|hier]] beschrieben, lediglich die Pfade sind anders:
 +  * Firmwaredatei "u96v121.bin" aus dem Windowstreiber extrahieren.
 +  * Firmware nach ''/volume1/@optware/share/sane/snapscan/'' verschieben
 +  * ''/volume1/@optware/etc/sane.d/snapscan.conf'' anpassen: <code>
 +firmware /volume1/@optware/share/sane/snapscan/u96v121.bin
 </code> </code>
  
synology.1469996599.txt.gz · Zuletzt geändert: 2016/07/31 22:23 von olli