ubuntu:airsonic
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| ubuntu:airsonic [2021/10/10 10:45] – [Java JRE] 11 Sebastian Hetzel | ubuntu:airsonic [2021/10/30 16:50] (aktuell) – [Transcoder] angelegt Sebastian Hetzel | ||
|---|---|---|---|
| Zeile 34: | Zeile 34: | ||
| OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10) | OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10) | ||
| OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode) | OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode) | ||
| + | </ | ||
| + | |||
| + | ==== Transcoder ==== | ||
| + | |||
| + | < | ||
| + | # aptitude install ffmpeg | ||
| + | </ | ||
| + | |||
| + | Falls der Ordner noch nicht vorhanden sein sollte, bitte anlegen: | ||
| + | |||
| + | < | ||
| + | # mkdir / | ||
| + | </ | ||
| + | |||
| + | Nachsehen, wo die ffmpeg liegt: | ||
| + | |||
| + | < | ||
| + | # whereis ffmpeg | ||
| + | ffmpeg: / | ||
| + | </ | ||
| + | |||
| + | Nun geben wir der Applikation Zugriff auf den Transcoder: | ||
| + | |||
| + | < | ||
| + | # cd / | ||
| + | # ln -s / | ||
| + | # chown -h airsonic.airsonic ffmpeg | ||
| </ | </ | ||
| ==== Optionale Tools ==== | ==== Optionale Tools ==== | ||
| Zeile 57: | Zeile 84: | ||
| # chown -R airsonic: | # chown -R airsonic: | ||
| </ | </ | ||
| + | |||
| + | Nun die Verzeichnisse für die Musiksammlung: | ||
| + | |||
| + | < | ||
| + | # cd /srv | ||
| + | # mkdir PLAYLISTS | ||
| + | # chown -R airsonic.airsonic PLAYLISTS/ | ||
| + | # mkdir ALBEN | ||
| + | # chown -R airsonic.airsonic ALBEN/ | ||
| + | </ | ||
| + | ==== Die Anwendung als Dienst implementieren ==== | ||
| + | |||
| + | Bei Airsonic: | ||
| + | |||
| + | < | ||
| + | # wget https:// | ||
| + | # wget https:// | ||
| + | # wget -c https:// | ||
| + | # cp airsonic.war / | ||
| + | # systemctl daemon-reload | ||
| + | # systemctl start airsonic.service | ||
| + | # systemctl enable airsonic.service | ||
| + | </ | ||
| + | |||
| + | |||
| + | Bei Airsonic Advanced: | ||
| + | |||
| + | < | ||
| + | # wget https:// | ||
| + | # wget https:// | ||
| + | # wget -c https:// | ||
| + | # cp airsonic.war / | ||
| + | # systemctl daemon-reload | ||
| + | # systemctl start airsonic.service | ||
| + | # systemctl enable airsonic.service | ||
| + | </ | ||
| + | |||
| + | Innerhalb der airsonic.service muss der Pfad für '' | ||
| + | |||
| + | <file |bash / | ||
| + | [Unit] | ||
| + | Description=Airsonic Media Server | ||
| + | After=remote-fs.target network.target | ||
| + | AssertPathExists=/ | ||
| + | |||
| + | [Service] | ||
| + | Type=simple | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | EnvironmentFile=-/ | ||
| + | ExecStart=/ | ||
| + | $JAVA_OPTS \ | ||
| + | -Dairsonic.home=${AIRSONIC_HOME} \ | ||
| + | -Dserver.servlet.context-path=${CONTEXT_PATH} \ | ||
| + | -Dserver.port=${PORT} \ | ||
| + | -jar ${JAVA_JAR} $JAVA_ARGS | ||
| + | User=airsonic | ||
| + | Group=airsonic | ||
| + | |||
| + | # See https:// | ||
| + | # for details | ||
| + | DevicePolicy=closed | ||
| + | NoNewPrivileges=yes | ||
| + | PrivateDevices=yes | ||
| + | PrivateTmp=yes | ||
| + | PrivateUsers=yes | ||
| + | ProtectControlGroups=yes | ||
| + | ProtectKernelModules=yes | ||
| + | ProtectKernelTunables=yes | ||
| + | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 | ||
| + | RestrictNamespaces=yes | ||
| + | RestrictRealtime=yes | ||
| + | SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap | ||
| + | ReadWritePaths=/ | ||
| + | |||
| + | # You can change the following line to `strict` instead of `full` | ||
| + | # if you don't want airsonic to be able to | ||
| + | # write anything on your filesystem outside of AIRSONIC_HOME. | ||
| + | ProtectSystem=full | ||
| + | |||
| + | # You can uncomment the following line if you don't have any media | ||
| + | # in /home/…. This will prevent airsonic from ever reading/ | ||
| + | # | ||
| + | |||
| + | # You can uncomment the following line if you're not using the OpenJDK. | ||
| + | # This will prevent processes from having a memory zone that is both writeable | ||
| + | # and executeable, | ||
| + | # | ||
| + | |||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | </ | ||
| + | |||
| + | ===== Reverse Proxy ===== | ||
| + | |||
| + | Airsonic Advanced nutzt Websockets. Entsprechend muss der Proxy dies unterstützen! | ||
| + | ==== Apache ==== | ||
| + | |||
| + | === Installation === | ||
| + | |||
| + | < | ||
| + | # aptitude install apache2 | ||
| + | # a2enmod proxy proxy_http headers proxy_wstunnel rewrite ssl | ||
| + | # a2dismod status | ||
| + | </ | ||
| + | |||
| + | === Virtuelle Hosts anlegen === | ||
| + | |||
| + | < | ||
| + | # cd /var/www | ||
| + | # mkdir airsonic | ||
| + | # mkdir -p airsonic/ | ||
| + | # mkdir -p airsonic/ | ||
| + | </ | ||
| + | |||
| + | <file | / | ||
| + | < | ||
| + | ServerName domain.de | ||
| + | ServerAlias www.domain.de v3.domain.de | ||
| + | DocumentRoot / | ||
| + | Redirect 301 / https:// | ||
| + | |||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerName domain.rocks | ||
| + | ServerAlias www.domain.rocks v3.domain.rocks | ||
| + | DocumentRoot / | ||
| + | Redirect 301 / https:// | ||
| + | |||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerName domain.net | ||
| + | ServerAlias www.domain.net v3.domain.net | ||
| + | DocumentRoot / | ||
| + | Redirect 301 / https:// | ||
| + | |||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Nun für HTTPS. Ich bereite die Konfiguration vor, noch bevor LE diese erstellt. | ||
| + | |||
| + | <file | / | ||
| + | < | ||
| + | SSLStaplingCache shmcb:/ | ||
| + | < | ||
| + | ServerName domain.de | ||
| + | ServerAlias v3.domain.de www.domain.de | ||
| + | DocumentRoot / | ||
| + | |||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | |||
| + | ProxyPass / http:// | ||
| + | ProxyPassReverse / http:// | ||
| + | RequestHeader | ||
| + | |||
| + | #websocket proxying | ||
| + | RewriteEngine on | ||
| + | RewriteCond %{HTTP: | ||
| + | RewriteCond %{HTTP: | ||
| + | RewriteRule ^/?(.*) " | ||
| + | |||
| + | |||
| + | Header always unset X-Frame-Options | ||
| + | |||
| + | Include / | ||
| + | Header always set Strict-Transport-Security " | ||
| + | SSLUseStapling on | ||
| + | SSLCertificateFile | ||
| + | SSLCertificateKeyFile / | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Virtuellen Host aktivieren: | ||
| + | |||
| + | < | ||
| + | # a2ensite airsonic | ||
| + | </ | ||
| + | |||
| + | Damit der Server SSL sprechen kann, muss der Cerbot von Let's Encrypt installiert werden. Eine Anleitung habe ich hier bereits hinterlegt: | ||
| + | > | ||
ubuntu/airsonic.1633855534.txt.gz · Zuletzt geändert: von Sebastian Hetzel
