skip navigation

Content:: A simple Debian Netinst Installation

Debian Netinst
Basic Debian "Netinst" installation

Here we will be installing the Network Installation or "netinst" version of debian. We will use the basic setup we do here for other tutorials with debian!

We will use the graphical installation for ease of use.
Debian Netinst
Host Name

The host name can be anything you want, the default is debian. This is where you can get creative with your server by giving it a great name. I've been hooked to the television series Supernatural and choose to name my servers based on some "Supernatural" based I'm naming mine "crossroads" ooh. For the domain name I left it blank. The time zone I used Pacific because thats my time zone
Debian Netinst Debian Netinst Debian Netinst

Basic installation seems to work the best for me. So thats what we'll do here. If you want to do some other type of magic with your partitioning feel free to. Choosing Guided - use entire disk Select the drive that is available. mine is IDE1 master (hda) 41.1 GB Maxtor 6E040L0 All files in on partition (recommended for new users) Finish partitioning and write changes to disk at the radio button questions Write the changes to disks? select the Yes radio button and click Continue The drive will now be formatted this may take a little bit of time. Base installation will be next.
Debian Netinst
Software Selection

In the software selection section uncheck all of the options. We want this installation to be as minimal as possible.
Debian Netinst
Boot Loader

You will eventually be prompted with a question asking you if you'd like to install grub in the master boot record. If you are not running another boot loader say yes. If you have other operating systems on the computer such as windows grub will be able to detect these systems.
Debian Netinst
Freshly Installed System

If the installation was successful you should have restarted your machine and notice a blue menu with options. This is the grub boot loader showing you a list of available systems to load. Two options should be available the current linux kernel and the current linux kernel in single user mode.
Installing C, C++, Make and Less
We're going to install a few pieces with apt, these pieces will allow us to compile C and C++ programs. We'll also install make which will allow us to easily compile programs from the source code along with less to help us view outputs and files. # apt-get install gcc
# apt-get install g++
# apt-get install make
# apt-get install less
# apt-get install zlib1g-devfor openssh otherwise it will fail on zlib apt-get install libssl-dev otherwise fail on openssl headers
Installing Secure Shell
Open SSH
* we should probably do a configure prefix with this next go around*

Secure shell will be our remote access to the system. SSH will allow us remote terminal access via command line, file transfer via SCP. Data in secure shell is encrypted and mostly safe for typing in a password and sending confidential information.
Secure shell runs off of port 22

# mkdir /root/dnld
# cd /root/dnld

Download Source :

At this point our ability to download and retrieve things are hard.. we will use wget and dl openssh via ftp.
# wget
# tar -xzf openssh-5.4p1.tar.gz
# cd openssh-5.4p1
Creating the SSH user
First create the sshd Group
# groupadd sshd Add the user to group sshd, with the comment "openssh user", point the home directory to /dev/null, disable ssh access for the user sshd.
# useradd -g sshd -c "openssh user" -d /dev/null -s /bin/false sshd
# ./configure
# make
# make install

Create the startup script
# nano /etc/init.d/sshd

case "$1" in
	/bin/kill `/usr/bin/head -1 /var/run/`
	/bin/kill -HUP `/usr/bin/head -1 /var/run/`
	echo "Usage: $0 { start | stop }"
	exit 1
exit 0

Change who can run the script (read execute)
# chmod 555 /etc/init.d/sshd
Create a symlink to our run time start up level (rc2.d)
# ln -s /etc/init.d/sshd /etc/rc2.d/S98sshd To start the ssh daemon now # /etc/init.d/sshd start
Most likely the debian installation configured itself to run off of DHCP. If you plan on making this system into a live server I'd recommend changing the settings from DHCP to a static IP. # nano /etc/network/interfaces You'll most likely see
allow-hotplug eth0
iface eth0 inet dhcp
we will change this to
auto eth0
iface eth0 inet static
Last Modified: 2010-04-11