Install Ubuntu Server
UBUNTU SERVER
Prefer older LTS (as more tested & pkgs supported)
Only command line by default, must install GUI separately
- Along with root (prefer SSD), swap, boot, home - var can also partitioned (so that logs doesn't take up normal space)
- Advantages of using LVM instead Physical partitions link //snapshots
20.04 IMAGES & Partition
- Language
- Keyboard
- Network connection
- choose network (no image as testing on machine without internet)
- Choose custom storage layout
- Consider 500GB hard disk laptop example.
- All space made as available by deleting existing partitions.
- Consider below sample with no allocation of drives
Create a volume group
Select entire disk partition for that group
Create logical volume in that group
Specify root logical volume for OS & softwares storage
- choose ext4 (linux format)
- mount to /
Specify swap volume for extra RAM shortage space
- typically 2*RAM size
- Format - swap
Similarly create my-boot volume
- typically 1 GB as per initial partition suggestion link
- choose ext4 (linux format)
- Mount it to /boot
Create my-home volume
- choose remaining space
- choose ext4 (linux format)
- Mount it to /home
Final volume look
On GPT disks as mentioned in Partition SetUp link, we have to choose a boot disk. Current laptop has EFI partition.
- Just choose the remaining specific partition & click on 'use as boot device'
- For other styles, check Partition SetUp link
click done
profile setup (same user name & password are later used for login)
- Choose SSH access
- Click Reboot now
- Remove your pen drive/ CD & hit enter (else re-initiates installation after restart)
- Login With user name & pass
Image references
DNS server
- to properly add DNS server don't change /etc/resolve.conf directly
- ref
- open file "/etc/resolvconf/resolv.conf.d/head", add following
- restart service
Ethernet Issue
(If internet not auto detected) network-configuration
- add nameserver in '/etc/resolv.conf' file
Configure ethernet in /etc/network/interfaces or /etc/netplan
In '/etc/netplan' following content
- In '/etc/netplan/01-netcfg.yaml' following content
Note : Check 'ip a' to find ethernets or 'sudo lshw -class network' for detailed ethernet
Sample dynamic ip addressing
'/etc/netplan/99_config.yaml' file
later
Sample static ip
'/etc/netplan/99_config.yaml' file
later
Sample static ip 2
'/etc/netplan/99_config.yaml' file
later
Change default ports
Note : openssh-server/ openssh-client package must be installed
- to Disable password based SSH, check command-security.md