Content:: A simple Debian Netinst Installation
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.
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.
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
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
Partition
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.
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.
Software Selection
In the software selection section uncheck all of the options. We want this installation to be as minimal as possible.
In the software selection section uncheck all of the options. We want this installation to be as minimal as possible.
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.
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.
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 LessIf 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.
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
* 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 : OpenSSH.org
At this point our ability to download and retrieve things are hard.. we will use wget and dl openssh via ftp.
# wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.4p1.tar.gz
Decompress
# 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
Compile
# ./configure
# make
# make install
Create the startup script
/etc/init.d/
# nano /etc/init.d/sshd
# 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
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 : OpenSSH.org
At this point our ability to download and retrieve things are hard.. we will use wget and dl openssh via ftp.
# wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.4p1.tar.gz
Decompress
# 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
Compile
# ./configure
# make
# make install
Create the startup script
/etc/init.d/
# nano /etc/init.d/sshd
#!/bin/sh
case "$1" in
'start')
/usr/local/sbin/sshd
;;
'stop')
/bin/kill `/usr/bin/head -1 /var/run/sshd.pid`
;;
'reload')
/bin/kill -HUP `/usr/bin/head -1 /var/run/sshd.pid`
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
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
allow-hotplug eth0 iface eth0 inet dhcpwe will change this to
auto eth0 iface eth0 inet static address 192.168.1.3 netmask 255.255.255.0 gateway 192.168.1.1


