Difference between revisions of "Debian Server"

From Comprofix
Jump to: navigation, search
(Created page with "This document will guide you through the installation and configuration of [https://www.debian.org Debian/GNU Linux] base for setting up a server. == Installation == Debian...")
 
(Post-Installation)
Line 65: Line 65:
  
 
== Post-Installation ==
 
== Post-Installation ==
The next tasks will be performed from a console. We do not need to login to the desktop environment yet. Press Ctrl+Alt+F1 to open a console prompt. Login as root user.
 
  
 
=== Update repository ===
 
=== Update repository ===

Revision as of 00:33, 14 June 2018

This document will guide you through the installation and configuration of Debian/GNU Linux base for setting up a server.

Installation

Debian Linux should run on any x86_64 compatible machine with a minimum of 512 MB RAM. A working internet connection is required.

Download the installation media from your nearest Debian CD mirror - https://www.debian.org/CD/http-ftp/. Create a bootable USB or CD using this media.

Boot from your Installation USB or CD and select Install when prompted.

Select a Language

The default language is English. Select your required Language and press Enter to continue.

Select your Location

The default location is United States. Select your required location and press Enter to continue. The location is used to set your timezone.

Configure the keyboard

The default Keymap is American English. Select your required Keymap and press Enter to continue.

Configure the Network

Enter a hostname for the machine. Press Enter to continue. Enter a Domain Name. This can be left blank. Press Enter to continue.

Root Password

You can continue without entering a root password. If you do the user you create will be given sudo access.

Setup User

Enter Full name of the new user. This can be the same as the username. Press Enter to continue Enter the username you wish to use. Press Enter to continue. Enter the username's password. You will be asked for this twice.

Setup Clock

Based on your Location you selected earlier you will be presented with a time zone selection. Select your time zone and press Enter to continue.

Partition Disks

The default selection is Guided - use entire disk. This is the recommended selection. Press Enter to continue.

Select the disk to install to and press Enter to continue.

Under Partitioning scheme use All files in one partition. Using a separate partition for your home folder is not covered by this installation guide. Press Enter to continue.

Select Finish Partitioning and write changes to disk. Press Enter to continue. Select Yes to write changes to disks. Press Enter to continue.

Configure the Package manager

Select Debian archive mirror country

This will default to the location you selected earlier in the installation. If you wish to change it select a country to use its Debian mirror. Press Enter to continue.

Select your nearest mirror

Select your nearest mirror and press Enter to continue.

Proxy Access

If you need to use a Proxy to access the outside world, enter the proxy information here. Otherwise leave it blank. Press Enter to continue.

Software Selection

Select No on the Package Survey. Press Enter to continue.

Choosing a desktop environment is a personal preference. For first time users I would recommend Cinnamon as it closely resembles a Windows interface and is easy to navigate. Select the desktop Environment you wish to use. For this guide we are using the Cinnamon Desktop Environment.

Deselect print server, Select SSH Server. Press Enter to continue.

Boot Loader

Select Yes to install GRUB Boot Loader. Press Enter to continue. Select drive to install GRUB Boot Loader onto. Press Enter to continue.

Finish the Installation

Remove the installation media from your computer. Press Enter to reboot your machine.

Post-Installation

Update repository

Enable the contrib and non-free repositories.

dpkg --add-architecture i386
sed -i 's|main.*|main contrib non-free|g' /etc/apt/sources.list
apt-get update

Install System utilities

apt-get install sudo zsh vim git curl apt-transport-https gdebi build-essential linux-headers-$(uname -r) dnsutils net-tools psmisc

Setup Bash Prompt

Open a Terminal Window and select Edit --> Profile Preferences. Select the Colors Tab. Untick the box Use colors from the system theme. Select White on black from the drop down menu and click Close.

Normal User

As most of our time will be spent in a Terminal it would be nice to have colours displayed so its easy to see and use.

wget https://raw.githubusercontent.com/mckinnon81/dotfiles/master/bash/bashrc -O ~/.bashrc
wget https://raw.githubusercontent.com/mckinnon81/dotfiles/master/bash/bash_colors -O ~/.bash_colors
wget https://raw.githubusercontent.com/mckinnon81/dotfiles/master/bash/bash_aliases -O ~/.bash_aliases

After downloading the bash config files type

bash

Your users prompt will now have a colour display.

Root User

su -
wget https://raw.githubusercontent.com/mckinnon81/dotfiles/master/bash/bashrc -O ~/.bashrc
wget https://raw.githubusercontent.com/mckinnon81/dotfiles/master/bash/bash_colors -O ~/.bash_colors
wget https://raw.githubusercontent.com/mckinnon81/dotfiles/master/bash/bash_aliases -O ~/.bash_aliases

After downloading the bash config files type

bash

Your root prompt will now have a colour display.

After updating the bash prompt configuration files, reboot the computer for these changes to take effect.

Software Installation

Fonts

Installation of extra fonts helps with some software rendering.

sudo apt-get install ttf-freefont ttf-mscorefonts-installer ttf-bitstream-vera ttf-dejavu ttf-liberation fonts-octicons