Basic Debian Installation

From WilliamsNet Wiki
Revision as of 03:00, 15 August 2019 by DrEdWilliams (talk | contribs)
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)

  • normal 'Install' option from the boot menu didn't work -- hung on the network device detection
  • did 'Expert Install' from the 'Advanced' menu
  • selected basic options, one partition formatting, and only the minimal software selection
  • let it finish and reboot -- came up nicely with SSHD enabled.
  • maybe it's because I'm using the newest release disk, but no updates were available after install:
    • 'apt update ; apt full-upgrade' did nothing


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

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