Schritt-für-Schritt Anleitung zur Installation und Konfiguration eines ArchLinux Servers
loadkeys de-latin1
ping archlinux.org
timedatectl set-ntp true
lsblk
cfdisk /dev/sda
Empfohlene Partitionierung:
# EFI Partition
mkfs.fat -F32 /dev/sda1
# Swap Partition
mkswap /dev/sda2
swapon /dev/sda2
# Root Partition
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base linux linux-firmware nano dhcpcd
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
# Datei bearbeiten
nano /etc/locale.gen
# Entkommentiere diese Zeilen:
# en_US.UTF-8 UTF-8
# de_DE.UTF-8 UTF-8
# Dann ausführen:
locale-gen
echo "LANG=de_DE.UTF-8" > /etc/locale.conf
echo "KEYMAP=de" > /etc/vconsole.conf
echo "mein-arch-server" > /etc/hostname
nano /etc/hosts
Füge hinzu:
127.0.0.1 localhost
::1 localhost
127.0.1.1 mein-arch-server.localdomain mein-arch-server
passwd
useradd -m -G wheel -s /bin/bash tobias
passwd tobias
pacman -S sudo
EDITOR=nano visudo
# Entkommentiere die Zeile:
# %wheel ALL=(ALL) ALL
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable dhcpcd
exit
umount -R /mnt
reboot
Entferne den USB-Stick beim Neustart!
sudo pacman -Syu
# Basis-Tools
sudo pacman -S base-devel git wget curl
# SSH Server
sudo pacman -S openssh
sudo systemctl enable sshd
sudo systemctl start sshd
# Firewall
sudo pacman -S ufw
sudo systemctl enable ufw
sudo ufw enable
sudo pacman -S samba
mkdir /home/tobias/Freigabe
sudo nano /etc/samba/smb.conf
Füge am Ende hinzu:
[Freigabe]
path = /home/tobias/Freigabe
read only = no
browsable = yes
sudo systemctl enable smb nmb
sudo systemctl start smb nmb
sudo smbpasswd -a tobias
sudo ufw allow samba
Herzlichen Glückwunsch! Du hast ArchLinux erfolgreich installiert!
Falls du Probleme hast, melde dich bei mir auf:
Discord: Tobi1506
💡 Tipp:
ArchLinux ist ein Rolling-Release-System. Führe regelmäßig sudo pacman -Syu aus, um dein System aktuell zu halten!