#-Road-Map--------------------------------- # # CUPS-Server # # Datum: Jan. 2025 (Geprüft) # # Eine "Strassenkarte" ist eine simple Text-Datei, # welche die Befehle zum kopieren und einfügen # im CLI oder auf dem Desktop bereitstellt und # zusätzlich einem einen Grobablauf einer Installation aufzeigt. #------------------------------------------ #------------------------------------------ # SSH-Verbindung #------------------------------------------ ssh DEINUSER@192.168.1.X #------------------------------------------ # System-Update / -Upgrade #------------------------------------------ sudo apt update sudo apt upgrade -y sudo apt autoclean sudo apt autoremove #------------------------------------------ # Statische IP Adresse #------------------------------------------ ip addr sudo su cd /etc/netplan ls for i in $( ls ); do mv $i $i.bak; done touch /etc/netplan/01_static_ip.yaml nano /etc/netplan/01_static_ip.yaml # Adapter-Einstellungen (Ctrl + O und Ctrl + X zum speichern) network: version: 2 renderer: networkd ethernets: ens18: #Edit this line according to your network interface name. dhcp4: no addresses: - 192.168.1.150/24 gateway4: 192.168.1.1 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 netplan generate && netplan apply # Verbindung wird unterbrochen, Fenster schliessen # und erneut mit der neuen IP einloggen #------------------------------------------ # Hostnamen festlegen #------------------------------------------ ssh DEINUSER@192.168.1.X sudo hostnamectl set-hostname DEINHOSTNAME sudo nano /etc/hosts # Host-Datei (Ctrl + O und Ctrl + X zum speichern) 127.0.0.1 localhost 127.0.1.1 DEINHOSTNAME ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters sudo reboot #------------------------------------------ # Installation und Einstellungen #------------------------------------------ ssh DEINUSER@192.168.1.X sudo apt install cups -y sudo apt install cups-bsd -y sudo apt install printer-driver-gutenprint -y sudo systemctl enable cups.service sudo systemctl enable cups-browsed.service getent passwd {1000..10000} | cut -d ":" -f1 sudo usermod -a -G lpadmin DEINUSER sudo cupsctl --remote-admin sudo cupsctl --debug-logging sudo cupsctl --remote-any sudo cupsctl --share-printers sudo systemctl restart cups.service sudo systemctl restart cups-browsed.service #------------------------------------------ # Systembedienung & Wissenswertes #------------------------------------------ sudo systemctl start cups.service sudo systemctl start cups-browsed.service sudo systemctl restart cups.service sudo systemctl restart cups-browsed.service sudo systemctl restart cups.service sudo systemctl restart cups-browsed.service sudo nano /etc/cups/cupsd.conf cat /var/log/cups/error_log cat /var/log/cups/access_log sudo apt install nmap -y && nmap localhost man cups man cupsctl