0% found this document useful (0 votes)
7 views

WWW Howtoforge Com Tutorial Debian Minimal Server 2

Uploaded by

HermanJuRiq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

WWW Howtoforge Com Tutorial Debian Minimal Server 2

Uploaded by

HermanJuRiq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

English | Deutsch Log in or Sign up

Tutorials Tags Forums Linux Commands Subscribe ISPConfig News

 Tutorial search

Tutorials How to install a Debian 9 (Stretch) Minimal Server - Page 2

Ad Quickly build and launch digital campaigns with Azure Free Trial.

How to install a Debian 9 (Stretch) Minimal Server - Page 2

It might be that the following screens pop's up, depending on your install
This tutorial exists for these OS versions
media. I will do a network based installation (all additional installation
packages get downloaded from the internet), so I choose here to not
Debian 9 (Stretch)
scan any additional install disks.
Debian 8 (Jessie)
Debian 7 (Wheezy)

On this page

4 Install The SSH Server (Optional)


5 Install a shell editor (Optional)
6 Configure The Network
7 Update Your Debian Installation
8 Debian 9 VMWare server image
9 Links

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Next, you must configure apt. Because we are using the Debian Jessie Netinstall CD, which contains only a minimal set of packages, we must
use a network mirror. Select the country where the network mirror that you want to use is located (usually this is the country where your
Server system is located):

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Then select the mirror you wish to use (e.g. ftp.us.debian.org):

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Unless you use an HTTP proxy, leave the following field empty and hit Continue:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Apt is now updating its packages database:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
You can skip the package usage survey by selecting No:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
We just select Standard system utilities and SSH server (so that I can immediately connect to the system with an SSH client such as PuTTY
after the installation has finished) and hit Continue.

Some might argue that one should not install the Standard System Utilities on a minimal server but in my opinion, you will need most of the
standard utilities later anyway so I will install them on this server as part of the base setup.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The required packages are downloaded and installed on the system:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
When you're asked to Install the GRUB boot loader to the master boot record?, select Yes:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The installer might ask you in which partition Grub shall be installed. This server has just one hard disk, so I choose /dev/sda here.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Press enter and the Installer will install Grub and finishes the installation.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The base system installation is now finished. Remove the Debian Netinstall CD from the CD drive and hit Continue to reboot the system:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The first boot of the newly installed Debian 9 server: first you will see the boot screen of the Grub Boot Loader, press enter or wait a few
seconds, the boot process will continue automatically.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
A few seconds later the login prompt should show up.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Login with username "root" and the root password that you have chosen during installation. When you log in by SSH, then use the username
"administrator" as the root user is disabled for remote logins. Then run the command "su":

su

To become root user.

On to the next step...

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
4 Install The SSH Server (Optional)

If you did not install the OpenSSH server during the system installation, you could do it now:

apt-get -y install ssh openssh-server

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Debian Jessie server and follow the
remaining steps from this tutorial.

5 Install a shell editor (Optional)

I'll use nano as my favorite shell text editor, others prefer vi that is not that easy to use for beginners. With the following command I will install
both editors:

apt-get -y install vim-nox nano

(You don't have to do this if you use a different text editor such as joe or the built-in editor from mc).

6 Configure The Network

By default, network tools like ifconfig are not available. install the package with:

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
apt-get install net-tools

Because the Debian 9 installer has configured our system to get its network settings via DHCP, we have to change that now because a server
should have a static IP address. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address
192.168.1.100) (please note that I replace allow-hotplug ens33 with auto ens33; otherwise restarting the network doesn't work, and
we'd have to reboot the whole system):

nano /etc/network/interfaces

The interfaces file with DHCP enabled as created by the apt installer:

# 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 ens33
iface ens33 inet dhcp

And here the edited interfaces file with the static IP 192.168.1.100 configured.

# 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

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
auto lo
iface lo inet loopback

# The primary network interface


auto ens33
iface ens33 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Then restart your network:

service networking restart

Then edit /etc/hosts. Make it look like this:

nano /etc/hosts

127.0.0.1 localhost.localdomain localhost


192.168.1.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts


::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Now edit the hostname in case you did not select the final hostname in the installer

nano /etc/hostname

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The /etc/hostname file contains the hostname without the domain part, so in our case just "server1".

Then reboot the server to apply the hostname change:

reboot

After you logged in again, run:

hostname
hostname -f

To verify that the new hostname is set correctly. The outut should be:

root@server1:/home/administrator# hostname
server1
root@server1:/home/administrator# hostname -f
server1.example.com
root@server1:/home/administrator#

7 Update Your Debian Installation

First, make sure that your /etc/apt/sources.list contains the stretch/updates repository (this makes sure you always get the newest
updates), and that the contrib and non-free repositories are enabled.

nano /etc/apt/sources.list

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
# deb cdrom:[Debian GNU/Linux testing _Stretch_ - Official Snapshot amd64 NETINST 20170612-06:03]/ stretch
main

#deb cdrom:[Debian GNU/Linux testing _Stretch_ - Official Snapshot amd64 NETINST 20170612-06:03]/ stretch m
ain

deb http://ftp.us.debian.org/debian/ stretch main contrib non-free


deb-src http://ftp.us.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

Run

apt-get update

to update the apt package database and

apt-get upgrade

to install the latest updates (if there are any).

8 Debian 9 VMWare server image

This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual
machine image uses the following login details:

SSH / Shell Login

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Username: administrator
Password: howtoforge

Username: root
Password: howtoforge

The IP of the VM is 192.168.1.100, it can be changed in the file /etc/network/interfaces. Please change all the above passwords to secure the
virtual machine.

9 Links
Debian: http://www.debian.org/

<< Prev

view as pdf | print

Share this page:

Sub pages
How to install a Debian 9 (Stretch) Minimal Server - Page 2 - Page 1
How to install a Debian 9 (Stretch) Minimal Server - Page 2

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Suggested articles

0 Comment(s)
Add comment
Name * Email *

    

p

Submit comment
I'm not a robot
reCAPTCHA
Privacy - Terms

Comments

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
From: Till Brehm at: Reply

Tutorials How to install a Debian 9 (Stretch) Minimal Server - Page 2

Sign up now!

 Tutorial Info

Author: Till Brehm


Last updated: Jan 22, 2018
Tags: debian, linux

 VMware image download

How to install a Debian 9


(Stretch) Minimal Server as
ready to use virtual
machine image download
in ovf/ova format,
compatible with VMWare
and Virtualbox.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD

You might also like