Debian Linux (Wheezy) server is easy to install. It takes about half an hour, or two depending on what you need it for and how “special” your installation has to be. A standard installation with only one hard drive will take about 0,5-2 hours depending on your knowledge on Linux servers.
On this page I will guide you through how to do it, with screenshots and explanations on every single one.
I have choosen Debian Linux as my favorite Linux server distribution for the following reasons:
- It’s light. It only got the stuff you need and nothing more, which gives you a really small footprint (Debian can run on a computer with less than 200 Megabytes of memory easily!
- It’s reliable
- Updates are stable, no crossing fingers when updating the system hoping it will not break
- If you ever have problems with Debian, it’s really easy to find a solutions just by Googling the problem.
- It’s easy to use
- It’s fast.
I will in this guide install Debian server without any Desktop environment (no icons, no mouse. only a keyboard and a console screen) since this saves a LOT of resources (about 100-200 megabytes of memory) and the time it takes for the server to boot/startup.
Now, first you need your hardware of cause.
you can thoose any hardware you like, but i recommend at least 1 Gigabyte of memory, if you want to run something like MySQL, webserver, email or Nagios on the server. Since memory today is really cheap, you better be on the safe site and have a little extra
I run mine in a VMware virtual environment, and you can do the same too if you have this.
Or you can also rent a VPS (Virtual Private Server) at a hosting center if you don’t have access to servers at home
If you have the hardware, Virtual Machine or VPS ready, keep on reading. Else there is no point to keep going.
Download and burn the Debian iso from here http://www.debian.org/releases/wheezy/
I recommend getting the “amd64” this works for all newer intel and AMD based systems, which is what I am using in this case. But you of course have to choose the architecture you use.
Once that is downloaded, burn it to a CD or mount it to the virtual server, and boot it up on the server!
Below I am going to go through the installation with screenshots, I just booted the server on of the CD and it is ready to install.
There will be a comment bellow every screenshot explaining what to choose and why.
The starting point
This is the first you see when you just booted from the CD on your server.
Here you click the “Advanced options” that you see marked on the image.
You can navigate in the menu using the arrow-up and down keys on the keyboard, choosing an options by pressing Enter.
On this page, you have some more options. Choose the “Expert install”, since this is the one where you will have the most options and can customize your system to your liking – Dont worry, it’s not that advanced so don’t get scared.
Don’t choose the “Graphical expert install”, I never got this to work correctly and I actually think the normal “Expert install” is a little more simple to use.
The main menu
So, this is all the steps we have to go trough, starting from the top. Later on there will get more steps added to the list, but don’t worry about that for now.
“Choose language” should already be marked/highlighted, so just press Enter to choose the language.
I recommend you choose English, since this guide will show you all the options in english! Also it makes it a bit more easy later on if you have any problems, you will get more result by googling english error messages than some other language.
Just press Enter all the way, choosing default “English” and “English_US” every time until you end up at the same screen as you see on the screenshot below.
Now the “Configure the Keyboard” option should be the one that is marked/highlighted, press Enter.
Choose the keyboard layout you have connected to the computer by using the arrows up- and down on your keyboard, in my case this is Danish, then press Enter.
You are now back in the main menu again, and the option “Detect and mount CD-rom” is marked/highlighted.
Press Enter to choose it.
Loading files needed by the installer
When it says “CD-ROM detected”, press Enter to continue.
You are now back at the main menu again, and the “Load installer component from CD” options is marked/highlighted. Press Enter again.
On the next page, you will see a list of packages that are available during the installation process. An example is a ssh server, installing this makes it possible to proceed the installation from another computer using SSH access.
We don’t need any of these options, so just leave everything disabled and press Enter to continue.
It will now download some needed packages, this might take a minute or two.
When done, it will automaticly go back to the main menu again. Now you see a lot more options has been added to the list, but don’t be afraid, I will guide you through every single one of them 🙂
The options “Detect network hardware” should be marked/highlighted now. Press Enter to choose it.
After the progress bar went all the way to full, you should end up at the main menu again. now with “Configure the network” as highlighted.
Choose it by pressing Enter.
Now this part shows up, and it offers you a choice:
If you want it to set up the network automatically or not. You should know the two differences:
Yes: The server asks for a DHCP IP address from your router, or DHCP server. If you don’t need a static IP address on your server, or you are new this sort of thing, you should choose “Yes”.
No: You will have to specify a static IP address, one you choose and it has to be outside of your DHCP range (The IP addresses your router/DHCP-server is giving to devices on your local network).
In my example, I choose “Yes”, because it is probably what most of you would choose.
Choose the one you need/want, and press Enter.
Then this page shows up. The field in the middle should be filled with “3” by default, just leave it like it is and press Enter.
This is the number of seconds to wait for a response from the DHCP-server/Router for an IP address when asking for it, so changing this number won’t have much effect, unless your router or DHCP-server is extremely slow. 3 Seconds is just fine in most cases, if you have problems getting a IP address you can try and give this a higher number like 10.
After the screen flashes a couple of times, you should see this.
This is the name of your server, it is up to you what this is going to be, but you have to use letters, numbers or a dash ( – ) any special characters are not valid.
I suggest this name to be something that tells what the server is going to be doing later on. Examples:
- Mailserver-1: A server that is used for sending/recieving emails
- webserver-1: A server that is used for serving websites
I personally like to use a number after the name like in the examples above. Because if I ever need to make another one, I can just call it “-2” instead.
Two computers/servers/devices on your network may NOT have the same name, it has to be unique!
Type in your name, and press Enter. In my case I will call it “Debian-guide-1”.
After choosing a name for your server, you have to choose a domain name.
If you don’t know what a domain name is, you should probably leave this blank!
Else, type your domain name. I won’t explain a lot about domain names, since this will be a couple of hours writing, and you don’t need it, and probably don’t want to read it either.
If you want to learn about domain names, please go to http://en.wikipedia.org/wiki/Domain_name
In my case, I will leave it blank and press Enter to continue.
Users and passwords
Now you are back at the main menu again, but this time the “Set up users and passwords” is highlighted.
Press enter to continue.
Here you have to choose between using shadow passwords or not.
I highly recommend you choose Yes, since this will make your system more secure.
When choosing No, it is possible for every user on the system to read a file with all users and passwords in a hashed format, and it is not difficult to guess what the real password is when you have the hash, since computers today are so fast at it.
When choosing Yes, the system encrypts the passwords and “hides” them in a special file that only some programs are allowed to read, like the one you will be using to log in, or the one used to change your password.
Choose Yes, and press Enter to continue.
Now you have to choose if you should be able to log in as root.
What is “Root” you may ask? – Root is the “Administrator” account on a Linux based system.
I recommend choosing Yes for this, because you will need it later on and I don’t see the big security risk in doing this if you specify a good password in the next couple of steps.
Make your choice and press Enter. In my case I will choose Yes.
Now write the password for the root user. You can choose anything you like. but i recommend complex password
Type it, and press Enter.
The next page I don’t think i will need a screenshot for, just type in the same password again to verify that you can remember it/type it again without any problems.
Type it again and press Enter.
Now it asks if you want to create a normal user account.
If you choose No, you will only have the root account on your system.
If you choose yes, you will get another account that has “Normal users privileges”.
I recommend choosing yes. because it can be risky logging in as the root account every time, there are too many ways of making corrupt configurations when logged in as root, but with the normal user account your don’t have the permissions to make these mistakes.
If you are sure, and don’t need the normal user. Choose No and press enter, else choose Yes and press Enter.
In my case I will be choosing Yes.
If you chose No at the previous screen you will not get the options to specify the name for the normal user account.
This can be your personal name, or as i like to do it, just typing what you want for the username on the user.
In my example it will be “user”
Type the name you want, and press Enter to continue.
Now type the username you want for the user. If you typed in the name you want as username in the previous step, you should just type the same name again and press Enter (It might already be typed for you).
Now choose the password the user has to get, this can be the same password as you gave the root user. but it is not recommended.
Type the password you want, and press Enter.
On the next screen, type it again to verify and press Enter. (I don’t think I need to show you a screenshot of this again)
Clock and timezone
Now you are back at the main menu again, and the “Configure the clock” should be highlighted.
Press enter to Continue.
Now you get the options to choose between using a NTP (Network Time Protocol) server or not for setting the clock.
I highly recommend that you choose Yes!
When using NTP, the server ask a NTP server on the internet what time it is, and adjusts it’s own clock to the answer it gets. This will give you the most precise clock at all time.
When choosing No, you will have to set the clock manually, and it will “Go out of sync” sometimes, just like when a wall-clock is running low on batteries.
Choose what you want and press Enter. In my case this will be “Yes”.
If you chose Yes, then you will have to specify which NTP server you want to ask for the actual date and time. There should already be one typed for you: “0.debian.pool.ntp.org”, this server works just fine, so type that address if not already typed, and press Enter to continue.
Now it will ask you for the timezone you are located in.
Choose the one you need, and press Enter.
in my case, this is “Central” since I am in Denmark. If you don’t know what timezone you are in, I’m sure you can find the answer on google.
Hard drive and partitions
Now you are back at the main menu again.
But this time, the “Detect disks” options is highlighted.
Press Enter to continue.
You will shortly see a progress bar, and then the screen will return to the main menu, but now with the “Partition disks” option highlighted
Press Enter to continue.
If you did not get back to the main menu, this means there was an error in the progress of detecting your harddrive, please make sure it is connected correctly and try again until you don’t get an error.
After a few progress bars going to 100%, you should be seeing this screen.
Here you have 3 options.
- To use the entire hard drive, and make Debian set it up automaticly.
- To use the entire hard drive, and make Debian set it up with LVM
- Same as the option above, but encrypted
Since this is a guide where I don’t think many of you will have the need to use LVM (Linux Volume Manager) or encrypted LVM, I would go with option 1 (Use entire hard drive)
I do not recommend LVM (Linux Volume Manager) for beginners, it should only be used when you need more advanced partitioning on your hard drive or multiple hard drives. It has some pretty good features, but in my case and probably yours too, there is no need for this.
This guide will not cover LVM if you want to learn more about LVM, your can read about it on Wikipedia
Highlight “Guided – Use entire disk” and press Enter to continue
This screen will now be shown.
Here you have to choose the hard drive to use for your installation, in my case I only have 1 hard drive of 10,7 GigaBytes in size
If you have multiple hard drives in your server, then they will all be listed here.
Highlight the one you want to use for the operating system (Debian) and press Enter.
You will now get 3 more options.
- To place all files on a single partition
- To place all files except the folder and all subfolder/subfiles from /home in a separate partition
- Same as option 2, but with /home, /usr, /var and /tmp on each their own partition
Here I recommend choosing option number 3 (a partition for each of the folders shown above) because:
If logs and other stuff fills up your hard drive, the system will not freeze because of missing space for system operations
I got this problem on my laptop, and on a server some months back, I had a lot of files on the systems and suddenly it refused to boot, this was because there was absolutely no space left on the partition.
Since /var contains log files, /tmp contains temporary files and /home contains the users personal files there is a big chance on having this issue in a year or two (depending on the size of your hard drive) if it is all located on the same partition.
Therefore, I recommend choosing the 3 options, to have everything on their own partition.
This guide will cover options 3, but not the others.
highlight option 3 and press Enter to continue
After some progress bars did their business and went all the way to 100%, you will get this screen.
Here you see a summary of the partitions that will be created. The Debian installation made the partition sizes as what it thinks it need, and what is left goes to /home (where your personal data will be)
On my installation there are not a lot of space for each partition, since i only have 10GB in total, yours should be a little bit bigger.
Highlight the option “Finish partitioning and write changes to disk” BEWARE: THIS WILL DELETE ALL THE DATA ON THE HARD DRIVE, AND IT CAN NOT BE RECOVERED!
And press Enter to continue.
This screen is just to make sure that you want to apply the changes.
highlight the option “Yes” (press the left arrow, once) and press Enter to continue.
Finally starting to install Debian
After a little while, you should be back at the main menu. where the “Install the base system” should be highlighted.
Make sure it is highlighted and press Enter to continue.
A minute or two later, this shows up.
Here you have to choose which kernel version you want to use.
There are 3 options, two different version and “None”.
The “None” option i only for advanced users, who make their own kernel.
I recommend you take the one with the highest version number, which in this case is “linux-image-3.2.0-4-amd64” since it’s the latest.
Highlight it, and press Enter to continue
At this page, you have to choose which drivers to include. You have two options “generic” and “targeted”.
Targeted: For advanced users, who only want some specific drivers.
Generic: For everybody else, who want to make sure the system works on the hardware.
I always choose Generic, since the drivers don’t take up much space, and there is no performance drop by doing this – But you make sure you have all the drivers you need.
This guide will not cover the “Targeted” option – Choose “Generic” and press Enter to continue.
Package manager (applications, programs and updates)
A minute or two later, you are back at the main menu again, but now the “configure the package manager” option is highlighted.
Press Enter to continue.
“What is a package manager” you may ask ? – A package manager is the “Program” you use to download software and applications, install or remove them.
You are now asked if you want to download applications from a internet mirror, or to use the local CD.
Highlight Yes, and press Enter to continue. This way you are sure to always get the latest version when you install an application or update.
Here it asks you if you want to use HTTP or FTP to get content from the internet.
Unless you are behind some kind of proxy that does not allow HTTP traffic (which is really uncommon!) highlight the “http” option and press Enter to continue.
On this page, you have to choose the location closest to you.
If you choose a location far from where the server is located, you will get slow speeds when downloading updates or applications from the internet.
In my case, it is “Denmark” so i highlight it and Press enter to continue.
On this page, it want’s you to choose a server located in the country i chose at the previous screen. You have a couple of options here (or might not, depending on the how many servers there are in your country), and it does not matter which one you pick. but i like to pick the default from “debian.org” since it’s the official.
Choose the one you like, and press Enter to continue.
It now asks if you have a proxy, that you want to use for the connection when downloading an application or updating.
Some company’s, schools or other big places have a proxy that is monitoring or filtering all network traffic. But in most cases you just have to leave this one blank.
This guide does not cover proxy’s, so I choose to leave it blank and press Enter to continue.
You now have to choose if you want to allow downloading of non-free applications or not.
Some applications have restrictions in the license, and thereby are marked as non-free.
If you want to make sure, you can get everything you need later on, choose “Yes” and press Enter to continue.
In this guide I will choose “Yes” (And this is what you should do in most cases)
You are now asked if you want both security and application updates.
Leave both marked with a “*” which they should be by default, and press Enter to continue.
If you remove any of these by pressing the spacebar, you won’t get all updates for your system later on.
You are now back at the main menu, and the “Select and install software” options is highlighted, press Enter to continue.
The system will now download all the packages it needs, and install them on the hard drive.
You will be asked like this if you want to install “mpt-status”.
“mpt-status” is a program to monitor your hard drives.
If you run on a virtual machine or VPS, i recommend you remove the “*” by pressing spacebar, and press Enter to continue.
Else you can leave this on and just press Enter to continue.
This screen will show up in the progress, and ask if you want to submit anonymous data to the Debian developers to help them improve the system.
I usually choose “No” but this i up to you.
You wont feel it in performance or anything if you choose “Yes”.
Choose what you want and press Enter to continue.
This is only for advanced users, and you should just press enter to the default which is “No”
This step is important.
You have to choose some default software the system has to install.
Here you have to REMOVE the “*” from the top one called “Debian Desktop Environment” or else you will get the desktop environment that we don’t want in this guide!
When the “*” is removed using the spacebar from “Debian Desktop Environment”, remove it from “Print server” too. by using the arrows to navigate and toggling them on/off with spacebar.
Don’t worry, if you need anything later like “Mailserver” or “SSH-server” you can always install it when this guide is done using the “package manager”.
Press Enter to Continue.
You are now back at the main menu, with “Install the GRUB boot loader on a hard disk” options highlighted, I recommend you choose this one – Else if you want the boot loader called “LILO” instead, highlight it using the arrows.
A boot loader is a little piece of program that is used to tell your computer how to start the operating system (Debian). Every operating system has this, and without it the computer will not be able to boot
Select GRUB (Since that is what will be covered in this guide, and I have never had problems with it) and press Enter to continue.
You now have to choose if you want to install GRUB loader to the boot sectors of the hard drive, or some other place. since we have the boot sectors free, the answer here will be “Yes”. In most cases it will be “Yes” unless you want to install the bootloader on a different partitions which is for advanced users.
Press Enter to continue.
Finish the installation
You are now back at the main menu, and the “Finish installation” option is highlighted. Note that it skipped the “Install The LILO boot loader on a hard disk” and “Continue without a boot loader” options, it is supposed to do this since you just installed the GRUB boot loader.
Press Enter to continue.
It will now ask if your system clock is set to UTC.
In most cases this is “Yes”, so press Enter to continue when “Yes” is highlighted.
Hurrayyy! the installation is complete!
Now, remove the CD and press Enter to continue – The system will now reboot.
Starting up the system
You will see when the system start up again, that there is a lot of text scrolling over the screen, this is normal and it is actually just the system messages telling you what the server is doing and if everything are going as planned.
Not long after the screen will clear, and you now have what you see on the picture above, but with you own servername instead of “debian-guide-1”.
Here you can log in with “root” as username and the password you made doing the installation, OR the username of the normal user you made doing the installation. But since this is the first login I recommend you log in with root so you can download updates in the next step.
When you have typed your username and password, you will be presented with a welcome message, and nothing else.
You now have a cursor right after “@:~# ” where you can write commands.
You are now logged in to your system, and it is ready to use.
I recommend updating your system before you proceed with any other guides since this is the first time your start it.
To do this we will use the package manager called “Apt”
The command to update a list of all the available software is:
Write it and press enter. A lot of text will cover the screen and when it’s done you will be back with your cursor on the right side of “[username]@[servername]:~# “.
It will look something like what you see in the screenshot below:
Now you have a list of all the latest application versions on your server, now it’s the time to check if any of your applications can be updated.
I usually do this right after a fresh install, so I know everything is up-to-date before I start installing the applications i need.
Run the following command
If there are any updates available, it will ask you if you really want to upgrade your applications, and show you a list of the available upgrades (Hit enter for “Yes”)
Else, if everything is up-to-date you will see the below result:
Done, complete, finish
You are now done! and you have a fully functional and running Debian server!
Now, you just have to install applications, like apache2, MySQL-server, email or anything else that you need this server to run.
There will be other guides for this, since I don’t want to mix it all together.
Thanks for the instructions apreciate,ok i installed Debian wheezy PPC g5 from a mini cd and made most software with default exept, i unticked the descktop invironment, i want something better then gnome,mabe Xfce,Or Lxde,or KDE, i want other browser Also besides the Ice weasel, that comes with default, maybe Fire Fox 24 ,i ‘m at terminal log in and password,
how can get the best Desktop and browser what commands do i get in the terminal thanks
You can use the package manager called “apt” to install new software using the command “apt-get install [packagename]” (without ” ” and [ ], and replace the name with the package you want).
I have never tried installing xfce or lxde myself, and therefore i can’t give you any guides on how to install one of these, but if you are lucky a “apt-get install xfce” is enough, and it might do the rest for you!
Hi again Frank,
I sat here wondering how to install xfce, and found a small guide on google. I have not tested it, but it should work.:
1. Install xcfe
This will install a metapackage, which will install the core Xfce modules and scripts to get it to work.
2. Install xcfe goodies
There are many useful utilities that come with Xfce, to install these:
3. Make it autostart
Add this line at the bottom of the file ~/.xinitrc (by editing it with the command “nano ~/.zinitrc” that you have used before in this guide):
Press CTRL+O to save it, and then CTRL+X to exit nano.
That should be it, try rebooting and see if it works 🙂
Thank you guys
i installed Xfce4 But i only get very few items no internet not most of the comands no cd nothing. i’m only used to do the default install.
please be pacent with me thanks
thanks guys i install the xfce4 and xfce4 goodies per instructions and all good exept the nano thing auto reboot maybe i did some bad typing ,i ‘ll try in terminal consol,
now need internet browser i have this link about firefox install on linux can some one please help here i’m almost there apreciate.
Nano is a terminal based editor, so you have to run it in terminal/console.
So you have the desktop now? i don’t really understand your last comment.
But you should be able to install firefox using the following command in a terminal:
Great instructions on how to install Debian from a newbie perspective!
Do you plan to do similar step-by-step guide on how to setup a mail server? The “workaround” way is very complex one & requires going through several of his guides to figure this out if one wants to setup such mail server.
Steffan you seem to like challenges at least you confronted me with one offering your screen shots to follow. Now my suggestion. Turn your monitor off, turn your speakers & computer on, put in your Debian installation CD & when it stops spinning press letter S and follow Debian’s audio instructions for its installation. 🙂
If you ever decide to write your guide for a mail server installation I am sure this project will be very much appreciated.
I will not be making a guide on how to build a mail server. Since i think https://workaround.org/ispmail i really good.
If I should make a guide on how to make your own email server that is better than Workaround’s ISPmail it would be a millions miles long!
I tried following workarounds ISPmail guide myself, and it was really easy. It explains what to do and why to do it. Just don’t skip any steps and read everything he has written 🙂