Basic Debian Installation

From WilliamsNet Wiki
Revision as of 11:40, 18 August 2019 by DrEdWilliams (talk | contribs) (add the removal of network-manager)
Jump to navigation Jump to search

Debian 10 "Buster" standard install from firmware-amd64-DVD (which includes the proprietary firmware that is supposedly not included in the other install disks)

  • Do a normal 'Install' option from the boot menu
    • if that hangs on the network device detection, do the 'Expert Install' option from the 'Advanced' menu and select the default options
  • select basic options, one partition formatting, and only the minimal software selection, but make sure the 'SSHD server' option is selected
    • For a graphic workstation, select the desired desktop from the list
  • let it finish and reboot

Loading software

apt install net-tools zsh sudo rsync mlocate wget nfs-common
  • the ssmtp package is not officially supported under buster
    • download the package from stretch and install
wget http://http.us.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.64-8+b2_amd64.deb
apt install ./ssmtp_2.64-8+b2_amd64.deb

Configuration

Set up sudo for passwordless access

  • visudo: add 'NOPASSWD:' in front of the last 'ALL' on the line beginning with '%sudo' so that it looks like this:
    %sudo	ALL=(ALL:ALL) NOPASSWD: ALL
  • add user to the sudo group:
    usermod -aG sudo ewilliam

Set zsh as the default shell

  • chsh to /bin/zsh (both root and ewilliam)
  • copy ssh and zsh config files (both root and ewilliam)
scp -r calormen:.ssh .
scp calormen:.zshrc .
scp calormen:.zlogin . 

Setup backup to central file server

  • copy scripts from calormen
scp calormen:/etc/cron.daily/backup /etc/cron.daily
scp calormen:/usr/local/bin/rsync_backup.sh /usr/local/bin/ 
  • edit rsync_backup.sh, changing target directory and list of directories to backup
  • create target directory on storage1 if it doesn't exist
  • run /etc/cron.daily/backup to verify proper operation

Enable connection to the central log server

scp calormen:/etc/rsyslog.d/99-remotelog.conf /etc/rsyslog.d ; systemctl restart rsyslog

Load /etc/hosts

  • debian's localhost definitions are slightly different in /etc/hosts ... so you can't just copy the centos version from aslan over -- but you can tack it onto the end after deleting the centos localhost line

Fix /etc/motd

Empty the /etc/motd file to get rid of Debian's obnoxious political statement:

rm /etc/motd ; touch /etc/motd

Configure SMTP relay

  • Not the same as the ssmtp package for CentOS, even though the version numbers are very close
    • Will not recognize aliases
  • Set 'hostname' in /etc/ssmtp/ssmtp.conf to 'williams.localnet' so it will send to domain instead of host

Configure shared filesystem access

add these lines to the bottom of /etc/fstab

storage1:/files	/files nfs4 soft 0 0
storage1:/backup/systems/<hostname>/current	/backup	nfs4	soft 0 0

make the mount points:

mkdir /files
mkdir /backup

mount the filesystems:

mount /files
mount /backup

Fix the networking

For a graphic workstation install, you need to manually configure the network and uninstall network-manager. First, see Ethernet Device Configuration to put the right data into /etc/network/interfaces, then

apt autoremove network-manager