Virtuelle Maschine einrichten UNIX-/Linux Netz (WebServer): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→Hosts) |
|||
| (7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
=Netzwerk= | =Netzwerk= | ||
| − | * | + | *vim /etc/network/interfaces |
<pre> | <pre> | ||
# This file describes the network interfaces available on your system | # This file describes the network interfaces available on your system | ||
| Zeile 20: | Zeile 20: | ||
gateway 10.0.1XX.1 | gateway 10.0.1XX.1 | ||
</pre> | </pre> | ||
| + | |||
=Namerserver= | =Namerserver= | ||
*cat /etc/resolv.conf | *cat /etc/resolv.conf | ||
| Zeile 26: | Zeile 27: | ||
=Hosts= | =Hosts= | ||
| − | * | + | *vim /etc/hosts |
127.0.0.1 localhost | 127.0.0.1 localhost | ||
127.0.1.1 www.lab1XX.nux | 127.0.1.1 www.lab1XX.nux | ||
| Zeile 34: | Zeile 35: | ||
ff02::1 ip6-allnodes | ff02::1 ip6-allnodes | ||
ff02::2 ip6-allrouters | ff02::2 ip6-allrouters | ||
| + | |||
=Reboot= | =Reboot= | ||
*systemctl reboot | *systemctl reboot | ||
| − | = | + | =AdminPC= |
| − | + | ||
*vi ~/.ssh/config | *vi ~/.ssh/config | ||
Host www | Host www | ||
| − | Hostname | + | Hostname 10.0.1XX.3 |
Username | Username | ||
;PubKey Übertragung | ;PubKey Übertragung | ||
*ssh-copy-id www | *ssh-copy-id www | ||
Danach könnt ihr euch mit '''ssh servername''' passswortlos einlogen | Danach könnt ihr euch mit '''ssh servername''' passswortlos einlogen | ||
| + | |||
| + | =DNS= | ||
| + | Eintrag A Record in /var/cache/bind/lab1XX.nux | ||
| + | www A 10.0.1XX.3 | ||
| + | Eintrag PTR in /var/cache/bind/1XX.0.10.in-addr.arpa | ||
| + | 3 PTR www.lab113.nux. | ||
| + | |||
| + | =Software= | ||
| + | Webserver | ||
| + | sudo apt install nginx | ||
Aktuelle Version vom 14. Mai 2025, 07:37 Uhr
Hostname
- hostnamectl set-hostname www.lab1XX.nux
Netzwerk
- vim /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto enp0s3 iface enp0s3 inet static address 10.0.1XX.3/24 gateway 10.0.1XX.1
Namerserver
- cat /etc/resolv.conf
nameserver 10.0.1XX.2 search labXX.nux
Hosts
- vim /etc/hosts
127.0.0.1 localhost 127.0.1.1 www.lab1XX.nux # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Reboot
- systemctl reboot
AdminPC
- vi ~/.ssh/config
Host www Hostname 10.0.1XX.3 Username
- PubKey Übertragung
- ssh-copy-id www
Danach könnt ihr euch mit ssh servername passswortlos einlogen
DNS
Eintrag A Record in /var/cache/bind/lab1XX.nux
www A 10.0.1XX.3
Eintrag PTR in /var/cache/bind/1XX.0.10.in-addr.arpa
3 PTR www.lab113.nux.
Software
Webserver
sudo apt install nginx