sudo apt update
:)
Install basic packages - these are my favorite: sudo apt install apt-file bind9-host colordiff dnsutils dstat git htop iotop less mlocate nginx ntp openssl python python3 python3-venv rsync screen strace sudo tree vim
Debian Wiki: How to change hostname
Change files: /etc/hostname
, /etc/hosts
, /etc/mailname
, /etc/resolv.conf
You can grep for occurrences of the old hostname in entire /etc
directory:
grep -Ri <old hostname> /etc
For faster DNS queries, install pdnsd: sudo aptitude install pdnsd
Configuration file is /etc/pdnsd.conf
. For most setups I recommend to set:
- set
uptest = none
- server(s) will not be checked whether they are live - set
preset = on
- it means that the default state of given server ison
; if it wasoff
anduptest
wasnone
, then the server state would never switch toon
and every query would fail with debug messageNo server is marked up and allowed for this domain
.
If there are any problems, you can set debug = on
and watch /var/cache/pdnsd.debug
.
If you want to have a "local domain", for example .ldev, so anything.ldev resolves to 127.0.0.1
:
rr {
name = ldev;
owner = localhost;
a = 127.0.0.1;
soa = localhost, root.localhost, 42, 86400, 900, 86400, 86400;
}
rr {
name = *.ldev;
a = 127.0.0.1;
}
echo 'tmpfs /tmp tmpfs noatime,nosuid,nodev,noexec,mode=1777 0 0' | sudo tee -a /etc/fstab
Alternative solution – I'm not sure whether it works on newest Debian versions:
$ cd /etc/systemd/system
$ sudo ln -s /usr/share/systemd/tmp.mount .
$ sudo systemctl enable tmp.mount