
- Continue reading as a webpage, or Download the complete PDF
- Have questions? Got problems? Visit the Blog for (this) topic
- Stuck on Page #1? Cant get Webmin to install? Try watching the video
- Want to setup a software Raid for your Operating System? Try watching the video
- Want to setup a ProxMox virtual machine server? Try watching the video
Page Navigation : Page1 Page2 Page3 Page4 Page5 Do more Word of Mouth
Page 1 of 5:
This how to assumes your looking to setup a Linux Server manage a Linux Server build a Linux Server, not a Linux Desktop.
For use without a monitor, keyboard or mouse. ( headless )
After setup completes you will be remotely managing it, and will not have a need for the monitor and keyboard once
you have finished the initial setup. This how-to also assumes you are connected to the internet, and have at least (2) computers
on the same network. It also assumes you will have at least (2) hard-drives in the server, one for the O.S. and one for the data.
Only one network card is needed until the optional \ advanced section.
For every download link, I offer an alternative source (from my server) so that you may follow this how-to exactly, down to the
same versions I've tested. Newer is better and you’re encouraged to upgrade after you complete this how-to. But for continuity
and flow, I provide a link to the same versions I've used and tested. Also due to upgrades some versions may no longer be
available, if you run into this just use the links to my server, or go to webmin.com and find the newer link
This how-to covers everything from the most basic setup, to a full blown dedicated server. You can choose how far to go in
this step by step how-to, even setting your Linux box up as your Router, Samba FileServer, Firewall, DNS, HTTP, HTTPS, FTP,
VMWare Server, backup solution, and more.
*Note, if your planning a FTP or SFTP server (Page 3), see this disclaimer before you begin
No table-of-contents, it is assumed you will follow this how-to, step by step, as each page builds off the previous ones. If you
skip a page, you could miss an installer or file called for later in the how-to. I hope you will find this how-to helpful. I will try
my best to respond via email at kevinthecomputerguy@woodel.com if you have questions, I will try my best to respond to
all of them, but please try my BLOG first. With any luck that will turn into a knowledge base.
My stuff will always be free for personal use, but if you would still like to contribute, you can donate money towards this, or
*Special thanks to:
Melissa E., Bill M., Mike J., Julio C., Nathan R., Tim R., James M., Peter B., ggaron, till, sammydee, Mad Professor
Mihai Marinof, Lani78, Jordan Sissel, Jerome1232, Drdos2006, and of course Jamie Cameron (Webmin \ Usermin)
Putty, Cobian Backup, Debian Linux, Ubuntu, Ubuntuforums.org, Mcgarrahancomputers.com, Tekzilla, HAK5, Proxmox.com
Berkhamsted Web Design, Go2linux.org, Protonic.com, and the millions of people that make Linux possible.
- OK... Let’s begin
Although this guide was created using Debian 5, it will also help Debian 6 and Ubuntu users. You will run into some problems with
Ubuntu’s firewall (UFW) and Ubuntu’s Network Manager. Ubuntu’s App Armor and the way Ubuntu restarts services. Ubuntu and
Debian 6 come with nano as the text editor and not vim. So you will need to install vim (apt-get install vim)
But these aren’t major problems, the work-a-rounds and differences are fairly minor and easy to overcome.
You can email me or read my blog for help. For a step-by-step install, please use Debian 6.xx
Start by downloading and burning the latest stable Debian 6 .iso from Debian.org
(32 bit PC)
http://cdimage.debian.org/debian-cd/6.0.7/i386/iso-cd/
(64 bit PC) *Dont worry that it says AMD, it also works for 64bit Intel
http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/
The links above get old and retired\archived very quickly, with each new revision.
If the links above die, simply navigate to the debian.org homepage, Stable Downloads Section , or from my server below.
i386 = 32bit
amd64 = Both Intel 64bit processors and AMD 64 bit processors.
… Or from my sever
(32 bit PC)
http://woodel.com/my-linux-how-to/debian-6.0.7-i386-netinst.iso
(64 bit PC) *Dont worry that it says AMD, it also works for 64bit Intel
http://woodel.com/my-linux-how-to/debian-6.0.7-amd64-netinst.iso
* You only need CD #1 , if there is more than one to choose from

*Again due to upgrades some versions may no longer be available, if you run into this just use
the links to my server, or go to Debian.org, find the stable section, and find the newer link.
Before you begin the install… Remove any unwanted \ unneeded hardware.
such as zip drives, sound cards, etc…
Disable any useless BIOS options, such as com ports, integrated sound cards, etc…
Disable any Keyboard or Mouse warnings
Disable any power management features
If your BIOS has an OS option, choose “Other”
Remove all hard drives except the one you’re planning on being the OS drive.
This will ensure you do not format the wrong drive, and help make this how-to a little
smaller and easier to follow.
It is assumed you only have one network card at this point. If you have more than one, you
may want to remove or disable them. The second NIC wont be used until the
optional \ advanced sections, and can interfere with the eth numbering and
firewall setup pre optional \ advanced section.
Boot the computer off the Debian install CD, and choose “Install”

Do not choose “Graphical Install” you don’t want that, just choose Install.
Everything in this how-to is case sensitive, so if I use lower-case, then use lower-case.
If you see something in capital letters, make sure to use capitals.
Basically copy it exactly as you see it.




Choose a unique name for the computer, I did deb32server1
To me that means, Debian, 32bit, Server, first one of several
Think of it as your computers first name, and on the next page we will set the last name.
You can make something up, we will be referring to this computer by its IP address anyway
so the name is somewhat meaningless, as long as the name is unique, so that you don’t have
a same name conflict with another computer on your network.
You can even use deb32server1 just like I did
This is private to your network, it doesn’t matter if you copy me exactly
it may even help make the how-to a little easier to follow.

Choose a domain name for the computer, I did diy.lan
Which to me means, Do It Yourself . Local Area Network
You can make something up. It’s almost like a last name for your computers.
It’s totally private to your network. But just like your family, you’re going to want to have all the same
last name on all your computers.
Which makes this computers full name deb32server1.diy.lan
Which to me means
Debian, 32bit, Server, first one of several, on a custom do it yourself Local Network
We will be referring to this computer by its IP address for now anyway, so this
isn’t too important at this point.

Much later on in the how-to, when we setup a Local Dynamic DNS server
(which is optional and advanced) you might find it easier to follow
the how-to, if you also use diy.lan
It doesn’t have to end with .lan you could make something up.
I just think it will help the flow of the how-to if you chose something ending in .lan

Choose your time zone

Choose “Guided – use entire disk”

If you removed all the other hard-drives pre install, you should only see one option here.

Choose “All files in one partition”



Choose a password for the account named root (choose a very strong password here)

Created a second user, so you don’t always have to login as root.
Here I used the name wood
You can use anything you want

I like to keep the username the same as the full name, this can help avoid confusion later on.

Choose a password for the account you just created
(Choose a very strong password here, this user will have more rights than a normal user)





You should be able to leave this blank, and click “Continue”
If you have a proxy, chances are you would know what to do here anyway.


Using the Space bar on your keyboard, un-check Desktop environment.
Make sure to un-check everything. With the exception of Standard system
We will install most of these things later in the how-to, don’t be tempted to click on them now.
And most importantly, do not choose Desktop environment.
This is a server how-to, not a desktop how-to.


Remove the CD, and press Continue

Did you see this screen? If not you probably didn’t remove the CD.
Make sure you are not booting off the CD anymore.

If everything goes right, you should get a lot of text on the screen
and finally a login prompt like this one.
Please ignore that mine says debian-1 at the bottom left. I am just at a different computer today.
If you were expecting that to say; deb32server1 login : you are right
I am just at a different computer today.
Your screen will say your computer name, followed by a login prompt
This won’t interrupt the flow of anything at this point

Login as username root with the password you specified during setup.
*Note, if you can’t login as root, login as your username, and type sudo before every command

Type vim /etc/apt/sources.list
Then hit the Enter key on your keyboard
(there is always a space after vim)
*Note, if you get an error, some versions of Linux dont come with vim, you can install it by typing apt-get install vim

* If you don’t see anything on the screen (the contents of that file) then you typed something wrong.
** When you see the screen above, you know you typed it correctly
Press the insert key on your keyboard to allow you to type inside the file
Use the # symbol to comment out un-wanted lines
Comment out any lines that have “cdrom” in them
When you are finished press the Esc key on your keyboard, this will take you out of insert mode
and should move your cursor to the bottom left of the screen
Then press the : key
You should see this symbol on the bottom left of your screen
Then type wq!
So that it reads :wq! In the bottom left corner of the screen

Then press the enter key
It should then save the changes to that file, and exit you back to the command prompt.
It will say something like “filename written”
You won’t need to use that vim editor very often after we complete the setup. But if you’re stuck
on it and can’t get it to work. Do a Google search on “Linux vim editor” there should be some
good examples that will help you on the previous page. Only if you’re stuck.

What that did was tell the computer to not use the CD when looking for software.
Now run apt-get update so it will both realize your cd-rom changes, and go look on
the internet for the newest software sources. This only looks for new sources
it doesn’t actually go get them.
(there is always a space after apt-get)

As long as you’re connected to the internet, you should see something like this.
This next step is optional. After an apt-get update you will almost always want to
do an apt-get upgrade
That’s the command that actually goes out and installs the newest versions.
But… if you want your screens to match mine exactly, you might want to hold off on
this step until your further into the setup and more comfortable with the screens.
I will leave this as optional right now, and rest assured we will perform one later.
Newer is better, but doing it now could put you at a version that doesn’t match this how-to.
Pick your poison :- )

If you have chosen to upgrade now, here is how.
Type apt-get upgrade and it will go get any approved updates that are available for your computer
(there is always a space after apt-get)
If it finds something, you will probably be asked to type Y or YES and hit enter.
Either way, you’re ready for the next step.
Now we are going to install some packages (software)
Type apt-get install samba samba-common-bin ssh openssl dnsutils apt-show-versions

(there is always a space after apt-get)
(there is a space between each installer above)
(this is the hard-way, later on in the how-to we will get into copying and pasting)
Type it word for word

It’s going to tell you that you need some additional installers, and it will prompt you to go get them.
When asked make sure you type Y for yes and hit enter.
*note, you do not have to specify whether you want 64 or 32 bit installers, apt-get will decide for you
based on your system. This is an excellent feature.
The install of Samba is going to ask you a few questions on screen. A GUI box will come up, without
any mouse support. So use the TAB key on your keyboard to move around it, and the enter key to
choose things like next, continue, and OK.

Enter the same name you did before.
I’m going to use diy.lan

Choose “No” to this
You are almost ready to remove the keyboard and the monitor. We just need to set a static IP address
(or reserve a DHCP one)
If you type ifconfig and hit enter, it will show your current eth0 (Ethernet) IP address
(inet addr) as well as your MAC address (HWadrr)

You should see something like this.

If you’re familiar with setting up DHCP reservations from your router, you just need the MAC address
and you will know what to do from here.
If you’re not familiar with how to do that and just want to set a local static IP address, here is how.
Note, later on in this how-to it’s assumed you have a static IP address, so you may want to setup a
static address, even if you know how to do DHCP reservations.
First chose an IP address that isn’t part of your DHCP scope. For example, if your router is handing out
IP addresses in a pool of 192.168.2.2 – through -192.168.2.100 then you wouldn’t want to use any of those
available 98 address’s in that pool (.2 through .100)
But you could safely choose anything above that pool, such as 192.168.2.101, 192.168.2.102, etc…
just as long as it isn’t in the range of the available IP addresses to the DHCP server pool of addresses.

If you don’t know how to check what IP range your router is handing out, just add 100 to the IP address
you currently have. This is sloppy, but will most likely work. For example, if you automatically got an
IP address of 192.168.2.72 it’s probably safe to set a static address of 192.168.2.172, as most address
pools are not larger than 100 (100 higher than what you currently have) This is sloppy, but should work
if this all sounds French to you.
Giving this a lot of extra thought can help with future problems, for example on my network
anything above a .100 address means it’s a server or printer of some kind. Anything above .200
means its wireless. Setting up meaning to these can be of great importance later on, as your
network starts to grow.
If all those numbers look French to you, just remember to make sure you give your Linux box an IP
address that is on your same network. For example
If you’re on a 192.168.2.xxx network
address 192.168.2.111 (replace 111 with the IP address you want)
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1
If you’re on a 192.168.1.xxx network
address 192.168.1.111 (replace 111 with the IP address you want)
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
If you’re on a 192.168.0.xxx network
address 192.168.0.111 (replace 111 with the IP address you want)
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
If you’re on a 10.10.10.xxx network
address 10.10.10.111 (replace 111 with the IP address you want)
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
gateway 10.10.10.1

To enter a static IP address type vim /etc/network/interfaces
(there is a space after vim)
You should see something like this

Find the area that says
iface eth0 inet dhcp
hit the insert button on your keyboard
Change it to say static instead of “dhcp” and add the following lines
iface eth0 inet static
address 192.168.2.111 #(the IP address you want)
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1
That’s it, you just have to tell the editor to save it
Press esc on your keyboard, this should drop your cursor to the bottom left of the screen.
Type :wq!
Press enter on your keyboard
If you did it correctly it should say something like “filename written”
And return you to the command prompt.

Once you are back at the command prompt, type reboot and hit enter on your keyboard.
Your system should reboot, and load up the new ip address.
After you login again as username root , type ifconfig and make sure eth0 is getting
the IP address you specified.

Now go to different computer, running Windows, and make sure you can ping that IP address.
Type ping 192.168.2.111 (or whatever IP address you gave it)
If you’re not familiar with ping on a Windows machine. Just click on the start button
and type cmd

In the black DOS like window, type ping 192.168.2.111

Make sure it replies back from the IP you’re pinging. If it comes back saying something like
“Destination Unreachable” go back and figure out what’s wrong.
Look for typos
Maybe your network card is eth1, and not eth0
Don’t continue with the how-to until it replies.
Now go back to the Linux box, and make sure you’re connected to the internet
try to ping www.google.com
It should reply back something like this, the numbers don’t really matter, just make sure its replying.

You can hit control + c on your keyboard to make it stop pinging
That’s the Ctrl key and the C key, hold down Ctrl and press the C key
If it replies, you’re connected to the internet
If it doesn’t reply, check your internet connection.
Make sure in your /etc/network/interfaces file, the IP address of your “gateway” is the same
IP address as your router.
If you have checked everything, and determined you are having a DNS issue.
And that your Linux box is the only computer having this issue
You can edit the file /etc/resolv.conf by typing
vim /etc/resolv.conf
And add some name servers
You should see something like this

I got these numbers from dyndns.org
http://www.dyndns.com/services/dynguide/readme.html
They provide some awesome name servers. Another good one is OpenDNS
And just like before, to save and exit its
Escape
:
wq!
Enter
Or you can use the name-servers (DNS servers) from your ISP, that you’re actually paying for.
To figure out what your name-servers are from your ISP, launch another cmd window from
your Windows computer, and type ipconfig /all
Look towards the bottom, for DNS servers, and use those IP addresses as
your nameservers in /etc/resolv.conf

Once you can ping your Linux box, and your Linux box can ping www.google.com
You can go back over to your Linux box and shutdown by typing halt –p
It will turn off, and you can remove the monitor and keyboard.
You may want to just remove the keyboard, and leave the monitor plugged in for now.
So you can watch it power on \ boot up the first time, and make sure your computer isn’t complaining
that it can’t find the keyboard. If it complains about the keyboard, go into your BIOS and tell it not to
warn about missing keyboards or mice.
Once you sure it will boot up without a keyboard, you can go ahead and remove the monitor.
Fight any temptation to plug the monitor and keyboard back in. doing so will hurt your learning
experience, as it’s no longer needed. We will be accessing and managing the computer remotely from
here on. So the rest of this how to will be completed remotely, using a Windows computer.
You will be using two forms of remote management tools to access the Linux server. Putty is one of them
and Webmin is the other. You will be using Webmin most of the time, until you get more familiar
with Putty.
You can download Putty from http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
Or from my sever http://woodel.com/my-linux-how-to/putty.exe
*Due to upgrades some versions may no longer be available, if you run into this just use the links to
my server, this will ensure matching print screens, or go to http://the.earth.li/~sgtatham/putty/latest/x86/
and find the newer link.
You have to choose save, not “run” or “open” It isn’t an installer, it’s a self contained exe, and has
to be saved to the hard drive before running.
We will use Putty to install Webmin onto the Linux box. Then you won’t need Putty again until
much later in the how-to.
Launch Putty, and enter the IP address of the Linux box.

You should see something like this

Everything else is already configured correctly, just enter the IP address of the Linux box and
click “Open”
The very first time you connect, it will ask you if you want it to remember that you trust this computer
you can say yes.
If successful you should get a black box asking you to login. Login as username root.
(We will continue to use root until the setup is complete)
You should see something like this

Once logged in, type or copy and paste the following commands
To paste into Putty Window, all you have to do is right-click
Once it is pasted into the Putty window, press the enter key on your keyboard. Your Linux box
will run the pasted or typed commands.
Say yes if prompted.
Paste in the following command, then press enter.
apt-get install apache2 vsftpd quota
Paste in the following command, then press enter.
apt-get install rssh etherwake ntpdate libio-socket-ssl-perl
Paste in the following command, then press enter.
apt-get install monit ethtool rsync
This should take awhile to complete, after it finishes
Type the following command
mkdir /options and hit enter on your keyboard

This stands for “make directory” and will make a folder called options on the root of the hard drive.
We are going to use this folder to download the webmin installer into.
Type cd /options and hit enter on your keyboard
This will put you into the options folder

Next we will use the wget command to download the webmin installer.
wget + the full path to the location of a website file, will download that file
Type or paste wget http://prdownloads.sourceforge.net/webadmin/webmin_1.620_all.deb
and hit enter on your keyboard.
(there is a space after wget)
Or from my server wget http://woodel.com/my-linux-how-to/webmin_1.620_all.deb
*Due to upgrades some versions may no longer be available, if you run into this just use the links to my server
this will ensure matching print screens, or go to webmin.com and find the newer link by right-clicking the download link, and viewing its properties.

Once you have the http path to the Webmin installer, type wget http://xxxxxxxxxxxxxxxxxxx and hit enter

You should see it start to download the file, and will show you the download progress.
You should see something like this

It will download it to the current folder that you’re in, so it just downloaded it to the /options folder
When it finishes downloading, type dpkg –i webmin_1.620_all.deb and hit enter on your keyboard. or dpkg -i webmin_x.xxx_all.deb (if new name or version)
Or dpkg –i /options/webmin_1.620_all.deb or dpkg –i /options/webmin_x.xxx_all.deb (if new name or version)
That stands for Debian Package – Install, and will install the Webmin program packaged for Debian.
If it tells you you’re missing something, just type
apt-get -f install
or
apt-get install -f
and hit enter on your keyboard. It will then go get anything it needs to finsh the install.
*If that doesnt work, try typing in everything. apt-get install “all those things above it says your missing” and hit enter on your keyboard.
It will remember you were trying to install Webmin, and will finish installing it after any missing packages are installed.
Still cant get Webmin to install? Try watching the video
You should now have Webmin installed, and can exit out of Putty
by typing exit or logout
To login to Webmin, open Internet Explorer or Firefox and type your IP address, followed by :10000
proceeded by https://
https://the-ipaddress-of your-linux-box:10000
For example if your Linux box IP address is 192.168.2.172 you would type
https://192.168.2.172:10000
*Note, If you have been following along, you probably expect my IP address to be 192.168.2.111
or 192.168.2.172 (your right)
I’m just at a different office and server today.
In the example below, this Linux box is now 192.168.2.1 so I need to type
https://192.168.2.1:10000
You would type the same thing, but with your IP address instead.

You will probably get a warning telling you not to trust the webpage. You can ignore this, it’s completely
secure. It’s just your using a self signed ssl certificate, and not a paid one. This is still completely
secure from within your internal network.
If you have problems with this later on, switch to Firefox. With Firefox you can choose to
save the certificate so you’re not always prompted. In Internet Explorer you just have to
choose “Continue to this Webpage” every time.
You should see something like this

It’s safe, just click continue
You should get to a screen that looks like this

With all of your management tools are on the left. You can do almost everything from here,
Webmin is an extremely powerful tool.
Page Navigation : Page1 Page2 Page3 Page4 Page5 Do more Word of Mouth
* This how-to is try at your own risk, with absolutely no warranty, no promises, and no guarantees. I cannot be held accountable for claims, statements, or damages of any kind. This how-to is for personal use only, and I reserve all rights.