====== Setup ====== ===== Server Setup ===== * Login to the server via SSH as root * Install sudo, create the main user, and add him to the sudoers group# apt install sudo adduser sudo * (VPS) change the machine name:sudo hostnamectl set-hostname sudo edit /etc/hosts * enable //force_color_prompt=yes// in file ''~/.bashrc'' * copy ''/home/user/.bashrc'' to ''/root'' and modify PS1 prompt color (//32m// --> //31m//) ===== Tuning ===== * [[deb13:tuning#swap_behavior|Swap behavior]] ===== Network ===== * In a minimal install without GUI is no NetworkManager present. Configure the static ip address first to be able to access the host. * Modify ''/etc/network/interfaces'':auto enp0s3 iface enp0s3 inet static address 192.168.3.150/24 gateway 192.168.3.1 dns-nameservers 192.168.3.1 * Add the nameserver to ''/etc/resolv.conf'':nameserver 192.168.3.1 * Reboot with either of the following commands:sudo reboot sudo shutdown -r now * Don't forget to bridge the interface if it is a VirtualBox virtual machine. ===== Security ===== * Configure [[deb9:ssh|SSH Access]] * Install [[deb9:ufw|UFW Firewall]] * Disable root login by changing file ''/etc/passwd'' from line 1 to line 2root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/sbin/nologin ===== Install and configure packages ===== * Additional packages$ sudo apt update $ sudo apt install vim $ sudo apt install zip $ sudo apt install rename $ sudo apt install rsync $ sudo apt install curl * Change visudo editor$ sudo update-alternatives --config editor * Check installapt-cache policy