Skip to content

Install Operating System

Gary Cornell edited this page Dec 25, 2020 · 18 revisions

Install Ubuntu 18 \ 20 Server

  • Ok now the easy part :>, install your OS. We are installing Ubuntu Server 18.04
  1. In the Hyper-V Manager your newly created virtual container will be in the off position, simply right click and choose start. This will boot up the server into the Ubuntu image file and start the install.

  • On the bottom left of the hyper-V manager there is a small console box, double click on this to open it and interact with the install.

  1. Configuration:
  • Choose language
  • Choose install Ubuntu Server
  • Choose keyboard settings, if its English/US then just click away for defaults. For the most part all the defaults are fine.
  • Network will be configured automatically using the Virtual Switch we created earlier
  • Add a hostname. Now this is IMPORTANT! This will be the name you access your site in browser, SSH, and FTP. I am using "testserver" for this example. So I can access my site via http://testserver:8080 and the host for SSH and FTP will be testserver

  • Choose sudo username and password
  • Encrypt home directory, I selected no cause Im not concerned about access. Your choice but its not important unless you feel your files are in danger of being stolen...lol
  • Choose your location
  • partitioning. You can use a guided, raid or any of the other options there but I always do my partitioning manually this way I know whats what so to speak. You may want to create multiple partitions for different user roots or whatever your needs are but I am going to do a standard partition for root (/), swap, /boot, and /home thats all you need to run a full fledged server. If using the UEFI boot you will need to create and additional efi boot partition for this.

Partitioning

Note: Im not going to get into Logical partitions, beginning and end and the rest, just giving users a straight forward setup. if you have the experience and know how then feel free to customize your own partitions.

  • Choose the Free Space of the selected disk

  1. Create New Partition
  2. **30GB (Important you must allow at least for 30GB for the root, going lower can be dangerous once your server begins to get populated by more programs and files. (This is the absolute minimum for a efficient server under Ubuntu)
  3. Primary
  4. At Beginning
  5. Choose root / for mount point - EXT4 file system - Label sda2 - You can choose other options for mount options but default is fine can always be changed later if need be. So except for the format partition (I am reinstalling the OS for this tutorial) it would look something like this

  • Click done setting up partition
  1. Select the free space again for the next partition
  2. Set your SWAP partition, Personally I set SWAP above the RAM for better performance. You should provide minimal SWAP depending on your RAM as follows:
  • 2 GB or less = At least double the RAM so 2x Total RAM + 1GB would be optimal
  • 2 GB to 8 GB = Match plus two so Total RAM + 2GB would be optimal
  • 8 GB to 64 GB = Match lower end plus 2GB -- higher end (over 32GB) half RAM + 2Gb would be optimal
  • 64 GB or more = At least half the RAM plus 2GB - Total RAM / 2 + 2GB would be optimal

I have 32Gb RAM so I will do 16GB + 4GB = 20GB (I like having room on my SWAP for resource intensive applications.

  • So Primary - Beginning - use as: SWAP

  1. /boot partition used to be good at 120MB in Ubuntu 12 even 14 but now Grub2 has all these new files and configs so in order not to get errors when installing a new kernel we need at least 500MB to be confident of no errors such as No disk space available. If you make this partition to low you will start pulling out the hair you have left because its a pain in the ass to deal with. So be smart and always allow ample space.
  • Choose /boot for mount point - EXT4 file system - Label sda1 - bootable Flag ON!

  1. And finally the rest for /home or whatever you want to use for your application/user path. I use the standard /home/$USER/public_html structure. But if you want say /var/www then you should partition accordingly by upping the root (/) partition.
  • Choose /home for mount point - EXT4 file system - Label sda4

  1. Finish and Write changes to disk...

  • System will now install. You will be prompted if you need to setup an HTTP Proxy (leave blank continue) unless you need it.
  • No automatic updates
  • Install software: all you need is the Open SSH server so you can access via ssh. Keep system utilities checked.
  • It seems that this is the only OS..... Yes
  • Finish setup

Your Ubunutu server is setup and will reboot automatically

We can move on to Login to Server...