Basic Debian Installation: Difference between revisions

From WilliamsNet Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 8: Line 8:


=== Loading software ===
=== Loading software ===
  apt install -y net-tools zsh sudo rsync mlocate wget nfs-common
  apt install -y net-tools zsh sudo rsync mlocate wget nfs-common psmisc
* the '''ssmtp''' package is not officially supported under buster
* the '''ssmtp''' package is not officially supported under buster
** download the package from stretch and install
** download the package from stretch and install

Revision as of 13:11, 8 September 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)

  • 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 -y net-tools zsh sudo rsync mlocate wget nfs-common psmisc
  • 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 -y ./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)
chsh -s /bin/zsh
chsh ewilliam -s /bin/zsh
  • 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

Non-Free Drivers

Debian's militant policy towards non-free drivers can be rather annoying. The Radeon built-in graphics controller on the motherboard for lamppost (ASUS M4A785-M) apparently needs some 'non-free' firmware, which is not detected during the install process, even though I'm using the non-free firmware installation disk image. Because the firmmware is not loaded during the install, it isn't included in the initramdisk, and therefore the device is loaded in an inoperative state. There is a firmware package available to install:

apt install firmware-amd-graphics

... but even after rebooting it doesn't load because by the time the root filesystem is mounted, the devices are already initialized. Until I find a better way, the device needs to be unloaded and reloaded after boot to enable the graphics

rmmod radeon
modprobe radeon