If you already did it, just jump to the Server packages chapter. Any server needs a static IP address. Lets configure ours. Editing /etc/network/interfaces file [remoteos][command] root@debian:~# vi /etc/network/interfaces
Below it is how the file comes as default. As you can see we have only one ethernet card declared here, ens3, my server has only one network card, because it isn’t going to be a router, it is going to be just a remote boot server running in the local network.
[whole][file content][/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
allow-hotplug ens3 iface ens3 inet dhcp
And below it is how the file is after our changes [whole][file content][/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
allow-hotplug ens3 iface ens3 inet static address 192.168.70.5 netmask 255.255.255.0 gateway 192.168.70.1
As listed at the beginning of the tutorial, the server IPv4 address is 192.168.70.5, its network is 192.168.70.0/24 and the network gateway is 192.168.70.1. Now we are going to set your hostname up.
[remoteos][command] root@debian:~# hostnamectl set-hostname remoteos
or
[remoteos][command] root@debian:~# hostnamectl set-hostname remoteos.mylocaldomain.com
The second command, if you have a domain in your local network and want to set a Fully Qualified Domain Name to your server. And now, just to make sure your server can resolve names properly check your resolv.conf file to see what DNS server is set.
[remoteos][command] root@remoteos:~# vi /etc/resolv.conf
[file content] nameserver 8.8.8.8 nameserver 8.8.4.4
The two lines above are the content of my /etc/resolv.conf file. They are DNS servers from Google, if your server isn't reaching names on Internet, just replace your file’s content to match my file’s content and you will be fine. After all those changes we need to restart network service or reboot the server. The command to restart network in Debian 9 is:
[remoteos][command] root@debian:~# systemctl restart networking
The command above should restart the server network service and apply the new network configurations. In my experiences it didn't work thus I had to reboot the server, if it also doesn’t work for you, just reboot the server.