Debian
From Linux & Open Source @ NUS
Contents |
Installation walkthrough
-This page is in need of cleanup, I'll be doing some cleanup myself in the next few days. --Chrishenry 01:03, 14 January 2008 (SGT)
Before you begin with your Debian installation, make sure you clearly have in mind what you want to do with the installation. For example, for my server, I clearly have in mind availability of a httpd (for web server), ftp over SSL, and ssh. On another occassion, when installing a Debian on top of virtualization technology on my Mac, my target is a highly usable and flexible environment with minimal disk and memory usage.
So let's begin.
Getting installation CD/DVD
You can get the installation CD/DVD from Debian website. If you aren't really particular about security during installation, you can choose one of the small CD (100MB-200MB) and download the remaining packages from the net as the installation proceeds (at the risk of being compromised during installation, before you got your security updates). Otherwise, you can use jigdo to download the CD or DVD image (never download the whole iso of any website, they are damn slow). I suggest downloading stable version unless you want to keep updating your system every other day, in which testing is a good bet (NEVER use unstable unless you're damn sure; and there is a reason why experimental is not even one of the choices there). Using mirror.nus.edu.sg from within NUS, I downloading the packages and constructed the 4+GB DVD image with jigdo in under an hour.
Preinstallation
Make sure you have sufficient free, unpartitioned space in your harddisk (I had installed Debian in system with 2GB of space, but hey, who's so cheapskate to allocate only 2GB of space; a 5GB to 10GB space will be a good starting point). If you do not have unpartitioned space, you can resize your existing partition using GParted live CD (the last time I checked, it's here: http://gparted-livecd.tuxfamily.org/).
Installation
Reboot with your CD/DVD in the drive (those using virtualization will have superb time as most virtualization solution can virtualize a CD-ROM drive from an image).
Installation is graphical, in its own way. d: It's basically terminal style windowing. Most of the questions are straightforward. Here are the important ones:
- Partitioning
- Usually the guided partitioning will do you good if you had not have sufficient experience partitioning your own harddisk. I used the guided partitioning and modifying the resulted solution manually. If you are using huge harddisk and want to partition your harddisk extensively (one for /boot, one for /, /usr, /home, /var, /var/tmp, /tmp, etc.), consider using LVM. With LVM you can easily add and reduce the size of your logical volume. You can have a logical volume spread over different harddisk too (so your /home might take 40GB from one harddisk and 200GB from another). Basically an LVM partition can consist of one or more of physical partition.
- What to install
- If you are minimalist like me, you will simply choose none of the choices, or probably just standard-desktop (well, just the base system plus something here and there). If you opted to install a desktop environment, Gnome is installed by default, you can specify boot parameter at the beginning of installation (during the boot prompt) to give you either KDE or XFCE. I'm using XFCE, by far the fastest among the three. KDE is not bad (although I strongly suggest against KDE4 for production system as the number of bugs are expected to rise up; Debian by default ship with KDE 3.x. KDE4 must be installed from experimental or from source). Gnome, for me, is a no no. It's a bloody memory hog.
Once you have your system setup, you will end up with a non-GUI login prompt. Login and su to root. Now we can do several stuffs (using apt-get, my favourite package manager--it's used in Ubuntu-variant too, of course, since Ubuntu is based on Debian):
Install X.Org for your GUI:
# apt-get install x-windows-system
Install XFCE4 (and xfce4 terminal emulator)--you can of course install KDE/Gnome:
# apt-get install xfce4 xfce4-terminal
At this point you can start the windows environment:
# startx
If you prefer to have GUI login screen as your computer start, I would suggest xdm or kdm (xdm install far less package than kdm or gdm):
# apt-get install xdm
No web browser? Fret not, Iceweasel for the rescue (well, it's basically Firefox under different name; some issues between Mozilla and Debian on usage of icon and patching of the browser):
# apt-get install iceweasel
Prefer GUI package manager interface? Use synaptic (dselect is another GUI interface for the terminal):
# apt-get install synaptic
Well that's it! You have a good system up. Now the optionals:
Need an ssh server? Install openssh-server package. Now you can access your system from everywhere using ssh just by knowing it's IP address (you can try mysoc.net personal DNS to help you remember the IP address). Need httpd, my bet is still on apache2 (note that the PHP module will not work with the new Apache worker MPM, you've to use prefork). For FTP server, I like vsftpd. A little bit of tinkering with the configuration file, and you'll have nicely secured FTP over SSL access (with openssl package installed).
Firewall
I'm using shorewall. It's nice and easy (enough) to configure. This page will guide you through the setup: http://www.debianhelp.co.uk/shorewall.htm
To make sure your firewall is working properly, you can portscan your system from another machine. I suggest installing nmap package on another system and portscan your system:
$ nmap -A -T4 <your_system_ip_addr>
