How to Install Debian 9 Stretch – Step by Step Tutorial with Screenshots
Debian 9 (“Stretch“) is the latest and the current version of popular server operating system from Debian team (Debian Security team and Debian LTS team). Debian 9 has been released on 17 June 2017, and you get Long Term Support for five years.
Debian team has dedicated this version (Debian 9) to the project’s founder Ian Murdock, who passed away on 2015.
What’s new:
Let’s check, what is new in the Debian 9
- MariaDB replaces MySQL variants (MySQL 5.5 or 5.6)
- Both Firefox and Thunderbird are back to Debian and replace their debranded versions Iceweasel and Icedove which were present in Debian for more than ten years.
- X display system no longer requires root privileges to run.
This Debian release includes lots of updated software packages, such as:
- Apache 2.4.45
- Chromium 59.0.3071
- Firefox 45.9
- GIMP 2.8.18
- GNOME desktop environment 3.22
More here.
This guide helps you to do the fresh installation of Debian 9 (Meaning that all your previous installation/data will be wiped out from hard disk)
You can also go for upgrading Debian to retain the data and configurations.
READ: How To Upgrade Debian 8 Jessie to Debian 9 Stretch
Download Debian 9 DVD from here, put the OS burned DVD into the DVD-ROM drive, change the boot sequence of your system so that it boots from DVD-ROM drive.
After booting DVD, choose “Graphic Install” to begin the Debian Installation in graphical mode.
![Install Debian 9 Stretch - Installer Menu](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Installer-Menu.png)
Select a language you like to use during the installation of Debian.
![Install Debian 9 Stretch - Select a Language](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Select-a-Language.png)
Select your location.
![Install Debian 9 Stretch - Select your Location](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Select-your-Location.png)
Configure your keyboard.
![Install Debian 9 Stretch - Configure your keyboard](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Configure-your-keyboard.png)
Configure the network:
Set the hostname for your system. Here, enter a host name without a domain name.
![Install Debian 9 Stretch - Set Hostname](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Set-Hostname.png)
Enter your domain name. If this server is on your home network, then leave it blank.
![Install Debian 9 Stretch - Domain Name](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Domain-Name.png)
Set root password:
Enter a password for the root account. To have a greater security over an account, make sure a password contains a mixture of letters, numbers and special characters.
![Install Debian 9 Stretch - Set root password](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Set-root-password.png)
Create a new user:
Create a new, non-root user for non-administrative activities. Enter a name.
![Install Debian 9 Stretch - Enter a Name](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Enter-a-Name.png)
Enter a user name for the above user. This name is the actual username you use to login into the system.
![Install Debian 9 Stretch - Set username](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Set-username.png)
Set a password for the user “raj“.
![Install Debian 9 Stretch - Set Password](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Set-Password.png)
Select the Timezone.
![Install Debian 9 Stretch - Select the timezone](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Select-the-timezone.png)
Partitions Creation:
Next, choose any one of the partition methods to create partitions during the installation process.
Automatic:
- Guided – use entire disk: Uses full disk and creates simple partitions (without LVM) for OS installation
- Guided – use entire disk and set up LVM: Uses full disk and creates partitions on top of LVM.
- Guided – use entire disk and set up encrypted LVM: Uses full disk and creates partitions on top encrypted LVM.
Manual:
- Manual: Use this to create partitions of your choice. This partitioning method is for advanced users. You can also use this method to retain your previous operating systems as well as your data if you partition correctly.
For this tutorial, I am choosing a second option (Guided – use entire disk and set up LVM).
![Install Debian 9 Stretch - Choose Partitioning Method](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Choose-Partitioning-Method.png)
Next, select the disk you want to partition for Debian installation.
![Install Debian 9 Stretch - Select the disk](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Select-the-disk.png)
I am choosing to have a separate partition for /home, /var, and /tmp partitions.
![Install Debian 9 Stretch - Separate partition](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Separate-partition.png)
Choose “Yes” to write changes to disk and configure LVM.
![Install Debian 9 Stretch - Configure LVM](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Configure-LVM.png)
Once the changes are written to the disk, then the final disk layout will look like below.
![Install Debian 9 Stretch - Final Disk Layout](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Final-Disk-Layout.png)
If you are happy with the partition layout, choose “Yes” to write changes to disk.
![Install Debian 9 Stretch - Write Changes to disk](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Write-Changes-to-disk.png)
Once the partition creation is done, the installer will begin the installation of the base system.
![Install Debian 9 Stretch - Installing base system](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Installing-base-system.png)
Configure the package manager:
Choose “No” to skip the scanning of another CD or DVD.
![Install Debian 9 Stretch - Scanning Another Drive](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Scanning-Another-Drive.png)
Choose “No” to use a network mirror.
![Install Debian 9 Stretch - Network Mirror](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Network-Mirror.png)
Choose “No” to Participate in the package usage survey.
![Install Debian 9 Stretch - Package survey](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Package-survey.png)
Choose the software you want to install at the time of Debian installation. Make sure you have selected “SSH server” for remote terminal access.
![Install Debian 9 Stretch - Choose Softwares](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Choose-Softwares.png)
Debian installer is now installing software for you.
![Install Debian 9 Stretch - Installing OS](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Installing-OS.png)
Choose “Yes” to install the GRUB boot loader to the master boot record.
![Install Debian 9 Stretch - Install GRUB](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Install-GRUB.png)
Select the partition or disk on which you want to install the GRUB boot loader.
![Install Debian 9 Stretch - Select the disk for GRUB](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Select-the-disk-for-GRUB.png)
The installation is now complete, click “Continue” to reboot your system.
![Install Debian 9 Stretch - Installation Complete](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Installation-Complete.png)
The login screen of Debian 9:
![Install Debian 9 Stretch - Login Screen](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Login-Screen-1024x768.png)
Debian 9 Gnome Desktop:
![Install Debian 9 Stretch - Desktop](https://www.itzgeek.com/wp-content/uploads/2017/07/Install-Debian-9-Stretch-Desktop-1024x768.png)
That’s All.