Fish-Serv2023: Difference between revisions
From Elch-Wiki
				
				
				Jump to navigationJump to search
				
				
No edit summary  | 
				|||
| (21 intermediate revisions by the same user not shown) | |||
| Line 34: | Line 34: | ||
* DHCP Server (kea ist für Leap noch nicht verfügbar): /etc/dhcpd.conf kopiert  | * DHCP Server (kea ist für Leap noch nicht verfügbar): /etc/dhcpd.conf kopiert  | ||
* samba: /etc/samba/* kopiert und angepasst (vlan1 statt eth0)  | * samba: /etc/samba/* kopiert und angepasst (vlan1 statt eth0)  | ||
* openvpn: /etc/openvpn/* kopiert und angepasst, "systemctl enable openvpn@server" (der Service taucht NICHT im Service Manager auf)  | |||
== Zusätzliche Packete ==  | == Zusätzliche Packete ==  | ||
* pico, sensors, sysstat, tcpdump, iotop, nmap, unbound  | * pico, sensors, sysstat, tcpdump, iotop, nmap, unbound, alpine  | ||
* für Apache und PHP: gcc, gcc-c++, pcre2-devel, openssl3, libopenssl-3-devel, libnghttp2-devel, make, libxml2-devel, sqlite3-devel, libcurl-devel, libpng16-devel, gmp-devel, imap-devel, libicu-devel, oniguruma-devel, libzip-devel, autoconf, unrar  | * für Apache und PHP: gcc, gcc-c++, pcre2-devel, openssl3, libopenssl-3-devel, libnghttp2-devel, make, libxml2-devel, sqlite3-devel, libcurl-devel, libpng16-devel, gmp-devel, imap-devel, libicu-devel, oniguruma-devel, libzip-devel, autoconf, unrar, encfs, ImageMagick  | ||
* mariadb  | * mariadb  | ||
** musste group 492 in mysql umbennen  | ** musste group 492 in mysql umbennen  | ||
| Line 44: | Line 45: | ||
* für Mail: dovecot, fetchmail, opendkim, spamassassin  | * für Mail: dovecot, fetchmail, opendkim, spamassassin  | ||
* rrdtool  | * rrdtool  | ||
* für Netzwerk: dhcp server, fail2ban, samba  | * für Netzwerk: dhcp server, fail2ban, samba, openvpn  | ||
* für Elch-Radio: icecast, ices, lame, libmariadb-devel, libshout-devel  | * für Elch-Radio: icecast, ices, lame, libmariadb-devel, libshout-devel, flac  | ||
== PHP Dependencies ==  | |||
* [https://mybabey.ch/ mybabey.ch]  | |||
* [https://mybabey.ch/radio/ Elch-Radio]  | |||
* [https://romanf.ch/elch_series/edit Elch-Series]  | |||
* Diverse Cron-Jobs  | |||
* [https://www.mediawiki.org/wiki/Compatibility MediaWiki]  | |||
* [https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html Nextcloud]  | |||
* [https://piwigo.org/guides/install/requirements Piwigo]  | |||
= Migration =  | = Migration =  | ||
| Line 58: | Line 69: | ||
** root: kopiert  | ** root: kopiert  | ||
** roman: kopiert  | ** roman: kopiert  | ||
** cronuser: kopiert  | |||
*sudo: /etc/sudoers kopiert  | *sudo: /etc/sudoers kopiert  | ||
* Offsite Backup: /root/offsite_backup/* kopiert  | * Offsite Backup: /root/offsite_backup/* kopiert  | ||
| Line 65: | Line 77: | ||
* News: OK  | * News: OK  | ||
* mp3info: Damit ich nicht das ganze GTK Zeugs brauche, hab ich die [https://ibiblio.org/mp3info/ Source] geholt und gemäss INSTALL mittels "make mp3info" nur die CMD-Version kompiliert.  | * mp3info: Damit ich nicht das ganze GTK Zeugs brauche, hab ich die [https://ibiblio.org/mp3info/ Source] geholt und gemäss INSTALL mittels "make mp3info" nur die CMD-Version kompiliert.  | ||
* offsite_backup: /root/.ssh/id* kopiert, cronjob schon kopiert  | |||
* donkey: /usr/src/mldonkey, /etc/systemd/system/donkey.service kopiert  | |||
* sensors: war 'n gebastel, musste noch rrd und raphfs via pecl de- und wieder installieren  | |||
* Log reduzieren: [https://access.redhat.com/solutions/1564823] und systemctl log-level warning  | |||
* Web-Counter: /usr/local/apache2/cgi-bin/Counter.cgi und /usr/local/etc/Counter kopiert  | |||
= Notes =  | = Notes =  | ||
| Line 74: | Line 91: | ||
Feb 15 21:25:41 fish-serv2023 systemd-xdg-autostart-generator[13935]: Exec binary '/usr/bin/owncloud' does not exist: No such file or directory  | Feb 15 21:25:41 fish-serv2023 systemd-xdg-autostart-generator[13935]: Exec binary '/usr/bin/owncloud' does not exist: No such file or directory  | ||
Feb 15 21:25:41 fish-serv2023 systemd-xdg-autostart-generator[13935]: Not generating service for XDG autostart app-ownCloud@autostart.service, error parsing Exec= line: No such file or directory  | Feb 15 21:25:41 fish-serv2023 systemd-xdg-autostart-generator[13935]: Not generating service for XDG autostart app-ownCloud@autostart.service, error parsing Exec= line: No such file or directory  | ||
* Piwigo bug with Imagick:  | |||
** Edit i.php as suggested in [https://github.com/Piwigo/Piwigo/issues/268] => define('PHPWG_ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR . './');  | |||
** Edit /etc/ImageMagick-7-SUSE/policy.xml as suggested in [https://stackoverflow.com/questions/77578848/imagemagick-throws-width-or-height-exceeds-when-converting-svg-to-png-with-ver]  | |||
** Edit admin/include/image.class.php  | |||
*** static function is_imagick() -> always returns false to pretend imagick isn't there  | |||
*** static function is_ext_imagick() -> always returns false to pretend imagic isn't there  | |||
= Wechsel von UPC auf Sunrise =  | |||
* Datum: 31.01.2025  | |||
* Modem hat keinen Bridge-Mode -> Tip von der Hotline den Bastion-Host als DMZ einzutragen. DMZ = der ganze incoming traffic wird an diesen Host weitergeleitet:  | |||
** DMZ auf 192.168.1.254 gesetzt, eth0 fix mit dieser IP konfiguriert  | |||
** musste VLAN2 auf 192.168.100.0/24 zügeln  | |||
** DHCP, fw_nat, unbound.conf anpassen  | |||
** unbound mit Split-DNS konfiguriert, weil traffic von intern auf IP vom Modem irgendwie nicht ankommt (obwohl ping geht)  | |||
= ToDo =  | = ToDo =  | ||
*   | * /var/mail -> migrieren in user home  | ||
Latest revision as of 19:26, 28 September 2025
Hinweis: Files, PDFs, ... sind im archive/fish-serv2023 zu finden
Hardware
Grösstenteils Empfehlung von Efan, leicht angepasst an aktuelle Liefersituation (Board, Gehäuse, HDD).
- CPU: AMD Ryzen 5 5600G (AM4, 3.90 GHz, 6 -Core)
 - Mainboard: MSI MAG B550 TOMAHAWK (AM4, AMD B550, ATX)
 - RAM: Corsair Vengeance LPX (2 x 16GB, 3200 MHz, DDR4-RAM, DIMM)
 - SDD: WD Red SN700 (250 GB, M.2 2280)
 - HDD: WD Red Pro (8 TB, 3.5", CMR)
 - Case: Cooler Master Force 500 (mATX, ATX)
 - Power: be quiet! Straight power 11 (750 W)
 - Kosten: CHF 1134.29
 - Stromverbrauch: ~37W idle
 
Software
OS
- OpenSuse 15.4 ab USB installiert, Optionen gemäss Foto
 - sda mit BTRFS, md0 mit EXT4 formatiert
 - passwd/shadow von fish-serv kopiert
 - /etc/environment diese Zeilen hinzugefügt:
- LANG=en_US.utf-8
 - LC_ALL=en_US.utf-8
 
 
Netzwerk
- 1.0 GB port (unten) -> eth0 => Internet, DHCP
 - 2.5 GB port (oben) -> eth1 => trunk, no ip
 - vlan1 -> fix ip: 192.168.0.3, parent=eth1
 - vlan2 -> fix ip: 192.168.1.3, parent=eth1
 - fw_nat: /etc/systemd/system/fw_nat.service und /root/fw_nat.sh kopiert und angepasst, cronjob eingefügt (TEMP DEACTIVATED)
 - unbound: /etc/unbound/* kopiert
 - IP6: /etc/systemd/system/ipv6.service und /root/ipv6_start.sh kopiert, neuen HE-Tunnel aufgesetzt
 - fail2ban: /etc/fail2ban/* kopiert
 - DHCP Server (kea ist für Leap noch nicht verfügbar): /etc/dhcpd.conf kopiert
 - samba: /etc/samba/* kopiert und angepasst (vlan1 statt eth0)
 - openvpn: /etc/openvpn/* kopiert und angepasst, "systemctl enable openvpn@server" (der Service taucht NICHT im Service Manager auf)
 
Zusätzliche Packete
- pico, sensors, sysstat, tcpdump, iotop, nmap, unbound, alpine
 - für Apache und PHP: gcc, gcc-c++, pcre2-devel, openssl3, libopenssl-3-devel, libnghttp2-devel, make, libxml2-devel, sqlite3-devel, libcurl-devel, libpng16-devel, gmp-devel, imap-devel, libicu-devel, oniguruma-devel, libzip-devel, autoconf, unrar, encfs, ImageMagick
 - mariadb
- musste group 492 in mysql umbennen
 - danach /usr/bin/mysql_secure_installation ausgeführt und neues root pw gesetzt
 - service auf start on boot gesetzt
 
 - für Mail: dovecot, fetchmail, opendkim, spamassassin
 - rrdtool
 - für Netzwerk: dhcp server, fail2ban, samba, openvpn
 - für Elch-Radio: icecast, ices, lame, libmariadb-devel, libshout-devel, flac
 
PHP Dependencies
- mybabey.ch
 - Elch-Radio
 - Elch-Series
 - Diverse Cron-Jobs
 - MediaWiki
 - Nextcloud
 - Piwigo
 
Migration
- rsync -av --progress --exclude 'macros/backup' --delete root@fish-serv:/data/ /data
 - DB: mysql -> mariadb: my.cnf teilweise angepasst
 - Apache: httpd.conf, ssl.conf, vhosts.conf kopiert und teilweise angepasst, neues start-script in /etc/system.d/system -> apache.service
 - /usr/src/getssl ohne Änderungen kopiert
 - php: /usr/local/lib64/php.ini kopiert und symlink in /etc angelegt
 - postfix: /etc/postfix kopiert
 - opendkim: /etc/opendkim kopiert
 - cronjobs
- root: kopiert
 - roman: kopiert
 - cronuser: kopiert
 
 - sudo: /etc/sudoers kopiert
 - Offsite Backup: /root/offsite_backup/* kopiert
 - Elch-Radio: systemd service definition von icecast angepasst und für elch_radio neu gemacht. Starten nun separat!
 - PhpMyAdmin: OK
 - Wiki: OK
 - News: OK
 - mp3info: Damit ich nicht das ganze GTK Zeugs brauche, hab ich die Source geholt und gemäss INSTALL mittels "make mp3info" nur die CMD-Version kompiliert.
 - offsite_backup: /root/.ssh/id* kopiert, cronjob schon kopiert
 - donkey: /usr/src/mldonkey, /etc/systemd/system/donkey.service kopiert
 - sensors: war 'n gebastel, musste noch rrd und raphfs via pecl de- und wieder installieren
 - Log reduzieren: [1] und systemctl log-level warning
 - Web-Counter: /usr/local/apache2/cgi-bin/Counter.cgi und /usr/local/etc/Counter kopiert
 
Notes
- apache.service: Ignoring invalid environment assignment 'if test "x$LD_LIBRARY_PATH" !=x; then': /usr/local/apache2/bin/envvars
 
Feb 15 21:24:07 fish-serv2023 chronyd[1759]: Wrong owner of /var/run/chrony (GID != 478) Feb 15 21:24:07 fish-serv2023 chronyd[1759]: Disabled command socket /var/run/chrony/chronyd.sock
Feb 15 21:25:41 fish-serv2023 systemd-xdg-autostart-generator[13935]: Exec binary '/usr/bin/owncloud' does not exist: No such file or directory Feb 15 21:25:41 fish-serv2023 systemd-xdg-autostart-generator[13935]: Not generating service for XDG autostart app-ownCloud@autostart.service, error parsing Exec= line: No such file or directory
- Piwigo bug with Imagick:
- Edit i.php as suggested in [2] => define('PHPWG_ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR . './');
 - Edit /etc/ImageMagick-7-SUSE/policy.xml as suggested in [3]
 - Edit admin/include/image.class.php
- static function is_imagick() -> always returns false to pretend imagick isn't there
 - static function is_ext_imagick() -> always returns false to pretend imagic isn't there
 
 
 
Wechsel von UPC auf Sunrise
- Datum: 31.01.2025
 - Modem hat keinen Bridge-Mode -> Tip von der Hotline den Bastion-Host als DMZ einzutragen. DMZ = der ganze incoming traffic wird an diesen Host weitergeleitet:
- DMZ auf 192.168.1.254 gesetzt, eth0 fix mit dieser IP konfiguriert
 - musste VLAN2 auf 192.168.100.0/24 zügeln
 - DHCP, fw_nat, unbound.conf anpassen
 - unbound mit Split-DNS konfiguriert, weil traffic von intern auf IP vom Modem irgendwie nicht ankommt (obwohl ping geht)
 
 
ToDo
- /var/mail -> migrieren in user home