2. page content
Continuation
You started on the first page of the description Debian 9 (Stretch) Minimum Server Installation Guide as a continuation of this page we will complete the rest of the installation and configure the basic software so that the system is ready for use.
Installation
Configure Popularity-contest
The installer asks if we would like to participate in a statistic that sends anonymous packet information:
Here, let us decide at our discretion.
Software choice
Here we have to choose the main software and services we require to start the system:
Extract all the markings from the above sections, with only the bottom two marked. Later, we will install all the necessary packages and services ourselves.
The installer starts and puts the packages of the selected parts:
Installing a Grub Boot Loader
You can choose which partition to put in GRUB:
Here we decide according to our situation. If you have a different operating system on your machine, you can choose to use GRUB to choose which system to boot when you start your machine. But if this is the only system on the machine, then definitely master boot recordinto your computer.
Here, select the hard disk on which GRUB should be physically located. Here, only one device is now connected to the virtual machine.
Finish installation
We have reached the end of the installation process:
Remove the installation tool (bootable flash drive, installation DVD, etc.) to stop the machine from starting.
The installer will then reboot the machine.
Boot System
When you get started, the standard GRUB menu will appear, select your newly installed system here.
After that comes the access section, and log in here as root, because this is the way to do the rest.
Install and configure basic programs
Here we have a simpler thing to do than Install Debian 8 (Jessie) Minimum Server , because more are now included in the base package, so we need to install less.
What we need from the very beginning is dwarf and one SSH server. Both are already part of the core system, so we can see him getting started.
Set Sudo
Command line tasks usually log in as the default user, and we only gain root privileges when needed. This feature is a sudo command. Also, when using remotely (via SSH), root login is disabled anyway, so you can only gain root privileges with sudo. Therefore, you must configure this command.
Sudo is not part of our base system, so we need to install it APT with the package manager:
apt-get install sudo
So run the visudo command:
visudo
add the appropriate base user to the list of sudo users:
[...]
# User privilege specification
root ALL=(ALL:ALL) ALL
linuxportal ALL=(ALL:ALL) ALL
[...]
Of course, everyone inserts their own username according to the green line.
Then, if necessary, we can manage the server remotely using the sudo command via SSH, because we can only log in directly from the console as root.
If you want to use the sudo command without a password, you can find out more here.
Set up a network
Install the Network Tools Pack a net-tools package:
apt-get install net-tools
(This package includes, but is not limited to, ifconfig command, which will be useful for example when verifying our IP address.)
The basic installation DHCPwith IP addresses, so the address of the machine can change at any time. Since this is a server installation, it should be set to static so that it always gets the same address.
Edit the following file:
nano /etc/network/interfaces
Original DHCP setup included during installation:
# 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 enp0s3 iface enp0s3 inet dhcp
Let's do this as follows:
# 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 enp0s3 #iface enp0s3 inet dhcp auto enp0s3 iface enp0s3 inet static address 192.168.1.120 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
Obviously, the red lines are commented on or removed, and the green lines contain a static setting that needs to be set.
I have thickened the IP address (192.168.1.120) to indicate that I am setting up the virtual machine for this, as before for the Debian 8 base system installation. Here, instead of 120, you can enter anything from 1-255, which address is more sympathetic, or which is free, and so on.
You may also want to set an Address reservation in the router based on the MAC address of the machine or virtual machine, and then DHCP will not allow another device to the same address.
Once you're done, let's restart networking:
service networking restart
Then edit the / etc / hosts file:
nano /etc/hosts
It should look like this:
127.0.0.1 localhost 192.168.1.120 debian9.linuxportal.vm debian9 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Here's the second line: The statically configured IP address is followed by the hostname of the server with the domain name you specified during installation, and then only the hostname again.
Then look at the / etc / hostname file:
nano /etc/hostname
Here, only the hostname should be a domain name without:
debian9
If the domain name is included, remove it.
Finally, restart your entire machine to take effect on your network settings:
reboot
Upgrading and upgrading Debian repositories
Finally, we expand the repositories to get the latest packages and the ones that we wouldn't get through the basic settings we need for future server installations.
Open the list of luggage containers:
nano /etc/apt/sources.list
After my recent installation, the original file looks like this:
# # deb cdrom:[Debian GNU/Linux 9.6.0 _Stretch_ - Official amd64 NETINST 20181110-11:34]/ stretch main #deb cdrom:[Debian GNU/Linux 9.6.0 _Stretch_ - Official amd64 NETINST 20181110-11:34]/ stretch main deb http://ftp.hu.debian.org/debian/ stretch main deb-src http://ftp.hu.debian.org/debian/ stretch main deb http://security.debian.org/debian-security stretch/updates main deb-src http://security.debian.org/debian-security stretch/updates main # stretch-updates, previously known as 'volatile' deb http://ftp.hu.debian.org/debian/ stretch-updates main deb-src http://ftp.hu.debian.org/debian/ stretch-updates main
Let's expand this so that a contrib and the non-free containers should also be enabled:
# # deb cdrom:[Debian GNU/Linux 9.6.0 _Stretch_ - Official amd64 NETINST 20181110-11:34]/ stretch main #deb cdrom:[Debian GNU/Linux 9.6.0 _Stretch_ - Official amd64 NETINST 20181110-11:34]/ stretch main deb http://ftp.hu.debian.org/debian/ stretch main contrib non-free deb-src http://ftp.hu.debian.org/debian/ stretch main contrib non-free deb http://security.debian.org/debian-security stretch/updates main contrib non-free deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free # stretch-updates, previously known as 'volatile' deb http://ftp.hu.debian.org/debian/ stretch-updates main contrib non-free deb-src http://ftp.hu.debian.org/debian/ stretch-updates main contrib non-free
Save and then run the repositories and packages upgrade to apt-get commands:
apt-get update
apt-get upgrade
Installing VirtualBox Guest Additions
Finally, if you have installed the system in VirtualBox, consider a installation of guest integration services, which is optional, but provides greater hardware compatibility for our installed system, resulting in more stable performance.
Conclusion
This is how we built our base system on the Debian 9 (Stretch) line, and we will install many more later to build it into an efficient, fully functional, full-featured shared web server.
What's next?
This minimal server can be an excellent basis for example Debian 9 (Stretch) Perfect server to build a stable shared hosting web server that includes many additional features. However, if you want to set up a simpler server configuration, then the Installing Debian 9 (Stretch) LAMP Server v1.0 is.
- Debian 9 (Stretch) Download Page
- Install Debian 10 (Buster) Minimum Server
- Debian 11 (Bullseye) minimal server installation
- Make bootable flash drives with Rufus 3.3
- Make bootable flash drives with Rufus 4.3
- How to configure VirtualBox for basic systems
- Install Debian 8 (Jessie) Minimum Server
- How to install Guest Additions on Debian running VirtualBox
- HowtoForge - How to install a Debian 9 (Stretch) Minimal Server
- Ubuntu 20.04 LTS (Focal Fossa) minimal server installation
- Install a minimum server for Ubuntu 18.04 LTS (Bionic Beaver)
- Installing Debian 8 (Jessie) LAMP Server v1.0
- Installing Debian 9 (Stretch) LAMP Server v1.0
- Perfect server: Debian 9 (stretch) V1.0
Navigation
- To post registration and login required
- 1138 views