Skip to content

Instantly share code, notes, and snippets.

@andrepearce
Last active November 27, 2018 12:29
Show Gist options
  • Save andrepearce/7f3b38a113aebb34c63c097972612b18 to your computer and use it in GitHub Desktop.
Save andrepearce/7f3b38a113aebb34c63c097972612b18 to your computer and use it in GitHub Desktop.
Notes for basic setup of a minimal Linux installation

Linux Minimal Setup Notes

Configure Network

  1. nmcli d - this will list the attached network devices.
  2. nmtui - this is an interactive method to configire network.

Configure SSH Keys

  1. Generate keys for instance ssh-keygen -t rsa -b 4096 -N "" -f ./server-key
  2. Move public key to server cat ./server-key.pub | ssh username@remote_host "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
  3. Set PasswordAuthentication no in /etc/ssh/sshd_config to disable password authentication

ExFAT Type Support

CentOS 7 (epel-release is only available for 64-bit)

  1. Install epel-release - https://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/
  2. yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
  3. yum install -y exfat-utils fuse-exfat

Debian

  1. apt-get install exfat-fuse exfat-utils

Disable Lpatop Lid Suspension

  1. Edit /etc/systemd/logind.conf and make sure HandleLidSwitch=ignore
  2. systemctl restart systemd-logind

Auto Mount External Drive

  1. Use fdisk -l to get device details
  2. Add the following to /etc/fstab - /dev/sdb1 /opt/nfs-exports/buffalo exfat defaults 0 2

Update CentOS 7 Kernel to latest

  1. rpm --import http://www.elrepo.org/RPM-GPG-KEY-elrepo.org
  2. rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
  3. yum --enablerepo=elrepo-kernel install kernel-ml -y
  4. Set GRUB_DEFAULT=0 in /etc/default/grub
  5. For UEFI - grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment