Basic Debian Installation: Difference between revisions

From WilliamsNet Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
Debian 10 "Buster" standard install from firmware-amd64-DVD (which includes the proprietary firmware that is supposedly not included in the other install disks)
__NOTOC__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
* normal 'Install' option from the boot menu didn't work -- hung on the network device detection
Line 17: Line 17:


=== Configuration ===
=== Configuration ===
Set up sudo for passwordless access
==== 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:
* visudo:  add 'NOPASSWD:' in front of the last 'ALL' on the line beginning with '%sudo' so that it looks like this:
*: <pre>%sudo ALL=(ALL:ALL) NOPASSWD: ALL</pre>
*: <pre>%sudo ALL=(ALL:ALL) NOPASSWD: ALL</pre>
Line 23: Line 23:
*: <pre>usermod -aG sudo ewilliam</pre>
*: <pre>usermod -aG sudo ewilliam</pre>


Set '''zsh''' as the default shell
==== Set '''zsh''' as the default shell ====
* chsh to /bin/zsh (both root and ewilliam)
* chsh to /bin/zsh (both root and ewilliam)
* copy '''ssh''' and '''zsh''' config files (both root and ewilliam)
* copy '''ssh''' and '''zsh''' config files (both root and ewilliam)
Line 30: Line 30:
scp calormen:.zlogin . </pre>
scp calormen:.zlogin . </pre>


Setup backup to central file server
==== Setup backup to central file server ====
* copy scripts from calormen
* copy scripts from calormen
<pre>scp calormen:/etc/cron.daily/backup /etc/cron.daily
<pre>scp calormen:/etc/cron.daily/backup /etc/cron.daily
Line 38: Line 38:
* run /etc/cron.daily/backup to verify proper operation
* run /etc/cron.daily/backup to verify proper operation


Enable connection to the central log server
==== Enable connection to the central log server ====
  scp calormen:/etc/rsyslog.d/99-remotelog.conf /etc/rsyslog.d ; systemctl restart rsyslog
  scp calormen:/etc/rsyslog.d/99-remotelog.conf /etc/rsyslog.d ; systemctl restart rsyslog


Load /etc/hosts
==== 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
* 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:
Empty the /etc/motd file to get rid of Debian's obnoxious political statement:
  rm /etc/motd ; touch /etc/motd
  rm /etc/motd ; touch /etc/motd


Configure SMTP relay
==== Configure SMTP relay ====
* Not the same as the ssmtp package for CentOS, even though the version numbers are very close
* Not the same as the ssmtp package for CentOS, even though the version numbers are very close
** Will not recognize aliases
** Will not recognize aliases
* Set 'hostname' in /etc/ssmtp/ssmtp.conf to 'williams.localnet' so it will send to domain instead of host
* 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 /calormen 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

Revision as of 03:07, 15 August 2019

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

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	/calormen 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