How to install Debian 9 Linux on a home server
Ubuntu and CentOS get all of the love from Linux users when it comes to servers, but Debian Linux can hold its own in the server space as well. Debian’s ultra-focus on stability makes it the perfect candidate for a home server.
Debian 9 Linux on a home server
The biggest reason that Linux users often skip over Debian for something like Ubuntu or even CentOS rather than Debian is that the distribution doesn’t explicitly advertise themselves as a Server operating system, so many might not know that it can work as one. However, with a few quick tweaks in the standard Debian installer, you can install Debian 9 Linux on a home server.
To get a server install of Debian Linux set up, you’ll need the following things.
- USB flash drive of at least 512 MB in size. Alternatively, feel free to use a blank CD or DVD.
- A dedicated desktop PC or another type of computer that can be left on at all times for use as a server. Ideally, it should have at least 1 GB of RAM and a decent CPU as well.
- A spare PC that can be used to create the bootable Debian USB installation disk.
- A keyboard and mouse, and monitor to plug into the server to perform the installation.
Collect the items on the list and follow along to learn how to set up Debian Linux on your very own home server!
Download Debian
Debian Linux has many different release ISO images available. In this guide, we will need to get our hands on the net-installer, because it’s the easiest path to setting up Debian as a server. To get your copy of the Debian net-installer, head to Debian.org and click on the green “Download Debian” button at the top right.
Clicking on the green download button should instantly start downloading an ISO image of the latest release of Debian Stable (currently 9.8). Sit back, be patient and let the ISO file download to your computer.
When the ISO is done downloading, move on to the next step.
Make bootable USB installer
Setting up a bootable USB installer for Debian can be done in a lot of different ways. In this guide, we’ll focus on using the Etcher tool. Why? The app is cross-platform, and on Mac, Linux and Windows users get the same experience. That way, no matter what spare PC you have, the bootable USB creation process is the same.
To get a copy of Etcher, go to their official website. Once there, locate the green download button and click on it with the mouse to download the latest release of the USB imaging tool.
With the Etcher application done downloading, open it up, plug in your USB flash drive and click on the blue “Select image” button with the mouse.
Upon clicking on “Select image,” the Etcher app will show you an open-file dialog window. Using this dialog window, browse for the Debian net-installer ISO file and load it into the app to use it during the flashing process.
Assuming the Debian ISO is correctly loaded into Etcher, the app will automatically detect your USB flash drive and mount it to the app. All that’s left is to click the “Flash!” button to start the burning process.
Copying Debian to a USB flash drive with Etcher will take a few minutes. When the process is done, unplug the USB and plug it into the PC you plan to use as a home server and configure it’s BIOS to boot from USB.
Install Debian as a server
During the startup process for the Debian Linux live disk, you’ll see a menu with a few options. Select the “Graphical install” option, as it’s the most intuitive to use for our purposes.
After selecting the “Graphical install” option in the menu, Debian will load up its installer tool and present you with the language page. Using the mouse, select the language you speak. Then, click “Continue” to move to the next page.
On the next page of the installer, Debian will attempt to detect your country. If the installer fails at detecting it, choose it on the list with the mouse and click “Continue” to go to move on.
Following selecting your country, Debian will automatically detect your keyboard layout. Once again, if the installer tool fails at detecting, choose the correct layout in the list and click “Continue” to apply your choice to the new installation.
With the keyboard layout configuration taken care of, it’s time to set the hostname of your new Debian server. In the text box, write out your desired hostname. Then, click “Continue” to move to the next page so you can set up the machine’s domain name.
On the domain page, Debian asks the user to configure a domain name for the installation. Only fill out this box if you know what a domain name is. If you don’t understand what it is, it’s fine to leave it blank.
With the domain and hostname configured for Debian, you must now set up a root password for the installation. To do this, click on the “Root password” box and enter a memorable, secure password. Then, click “continue” to go to the user creation page.
On the user page, write in your full name (not your desired username), and click “Continue”. Then, on the next page, fill out your desired username and click “Continue” to move on to set the password for the new user.
When you get to the password page for your new user, write in a memorable and secure password just like you did for Root. Click the “Continue” button to apply the password to your user, once you’re satisfied with it.
After configuring your user, root password, etc, Debian will take a few seconds to apply these new settings. From there, the installer will ask you to select your timezone from a list. Do so, and click “Continue” to apply it.
Once you’ve set your timezone in the Debian installer, a partitioner window will appear. In this window, there are several partition options. Look through the list and choose “Guided – use entire disk,” to allow the installer to automatically set everything up for you.
Selecting and confirming “Guided – use entire disk,” will trigger the base installation. Sit back and let the base system install. When the process is done, move onto the package configuration part of the tutorial.
Package configuration
Now that the core Debian system is set up on your home server, we’ve come to the point of the installer where you must configure the package manager and install a few packages.
To configure the package manager, follow the steps below.
Step 1: Select “No” on the page that asks you if you’d like to insert another CD/DVD.
Step 2: On the “configure the package manager” page, you’ll be asked to select a country. This is for mirror purposes. Look through the list and choose your country.
Step 3: Select a mirror in the URL list and click “Continue” to confirm your choice.
Step 4: Fill out your proxy info on the HTTP proxy page. Or, leave it blank if you don’t use a proxy.
Step 5: Choose “No” on the popularity-contest page.
Step 6: On the software selection page, uncheck the box labeled “Debian desktop environmen”t. This will tell the installer you do not want a GUI. After that, select boxes next to “web server,” “print server,” “SSH server,” and “standard system” utilities.
Sit back and let your selected packages install to the new Debian system. When everything is done, move to the next step of this install guide.
Finishing up
Everything is almost ready to go with your new Debian server. The only thing left to do is to install the Grub bootloader. To do this, wait for the installer to bring up the “Install the Grub boot loader on a hard disk” page.
On the “Install the Grub boot loader on a hard disk” page, choose “Yes” to being the Grub installation. Then, select your server’s primary hard drive in the list (the one you installed Debian to) and click “Continue” to get Grub working.
Assuming the Grub installation is successful, you’ll see an “Installation complete” page letting you know that your new Debian system is complete. From here, click “Continue” to reboot the server. Upon startup, you’ll see a command-line prompt which you can use to log in to your new home server!