Skip to content

Instantly share code, notes, and snippets.

@sdorsett
Created December 30, 2017 02:37
Show Gist options
  • Save sdorsett/7da42ab805af958afccd6553a9c9e100 to your computer and use it in GitHub Desktop.
Save sdorsett/7da42ab805af958afccd6553a9c9e100 to your computer and use it in GitHub Desktop.
ubuntu 17.10 server notes
sudo vi /etc/hosts # update hostnamesudo
vi /etc/hostname # update hostname
sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo vi /etc/resolv.conf # update nameserver entries
ip a # determine network interface name
sudo vi /etc/netplan/01-netcfg.yaml # update interface name from 'ip a'
[email protected]:~# cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: no
dhcp6: no
addresses: [192.168.100.221/24]
gateway4: 192.168.100.1
nameservers:
addresses: [192.168.100.1,8.8.8.8]
sudo netplan apply # apply changes made to /etc/netplan/01-netcfg.yaml
sudo apt-get upgrade -y
sudo reboot
sudo vi /etc/ssh/sshd_config # uncomment 'PermitRootLogin prohibit-password' and change to 'PermitRootLogin yes'
sudo systemctl restart sshd # restart sshd to make changes take affect
sudo apt install zfsutils-linux # install zfs
sudo fdisk -l # create new virtual disks for zdevs and list their dev names
sudo zpool create -f videos mirror /dev/sdb /dev/sdc
sudo zpool status
sudo zpool add videos log /dev/sdd -f
sudo zpool status
sudo zfs create videos/family
sudo zfs set quota=300G /videos/family
sudo zfs create videos/adult
sudo zfs set quota=100G videos/adult
sudo zfs create videos/training
sudo zfs set quota=30G videos/training
sudo zfs list
sudo apt -y install nfs-kernel-server
sudo vi /etc/idmapd.conf # line 6: uncomment and change to your domain name
sudo echo "/videos/adult 192.168.100.0/24(rw,no_root_squash)" >> /etc/exports
sudo echo "/videos/family 192.168.100.0/24(rw,no_root_squash)" >> /etc/exports
sudo echo "/videos/training 192.168.100.0/24(rw,no_root_squash)" >> /etc/exports
sudo systemctl start nfs-server
sudo systemctl status nfs-server
sudo systemctl enable nfs-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment