Private Server Part 2: Installing the Operating System

You have a big box full of complicated-looking electronics, a monitor, a keyboard, and cords going all over the place. Now what? If hardware can be considered the body of the computer, then the operating system can be considered its soul. The operating system acts as an interpreter between you and the hardware, translating your actions into instructions that the machinery can understand. It does everything from reading the keys you type to displaying text on the screen. More importantly, it’s what turns a pile of metal and silicone into what we consider a modern computer.

The history of operating systems is long and complicated, but interesting. In the early days of computing, programmers interacted with the hardware directly using mechanical switches or punch cards. Computers relied on human operators to input the next set of instructions (or program) after the current set finished. Basic operating systems were designed to automate this process by letting the computer load the next program as soon as the current one finished. The essential software that allows a computer to manage hardware and tasks, the core of modern operating systems, is known as the kernel.

There are three main desktop/laptop operating systems available today:

  • Microsoft Windows. Used on over 90% of all desktop and laptop computers, Windows is by far the world’s most familiar operating system. If you’ve bought a desktop or laptop in the past two decades, chances are it came with a version of Windows.
  • OS X. OS X is the operating system for Apple’s Mac computers. OS X is designed to run only on Macs, making it extremely specialized but also extremely efficient.
  • GNU/Linux. Commonly known as Linux, GNU/Linux differs from the previous two operating systems in that it’s a community-driven project. Linux itself is a kernel while GNU is the set of tools, utilities, and programs that drives it. Based on this combination, groups have created various flavors or distributions of Linux, each having different software and design principles.

There are hundreds of additional operating systems created for purposes ranging from academic research to scientific study, personal use to commercialization, and running supercomputers to running compact embedded systems.

Which Do I Choose?

For the sake of this guide, we’ll use a popular distribution of Linux called Ubuntu. Ubuntu prides itself on being compatible with almost any computer, easy to use, and, best of all, completely free. When you’re ready to get started, you can download Ubuntu Server using this link. As of this writing, the recommended version of Ubuntu Server is 14.04.2.

Creating A Bootable Image

After downloading Ubuntu, you’ll end up with a large file with an .iso extension. Before we can use this file, we have to write it to our blank CD or USB drive. If you’re using a CD, you can find instructions on how to create a bootable copy of Ubuntu here. If you’re using a USB drive, you can find instructions here.

Typically your computer will automatically boot from a CD or USB drive when the device contains a bootable image. If your computer reboots into Windows or complains of a missing operating system, you might need to change its boot priority through BIOS. BIOS handles the initial startup of your computer before passing control to the operating system. BIOS settings vary for each computer, so check with your computer’s manufacturer if you run into any issues booting Ubuntu.

If you see a screen like this after your computer reboots, you’re ready to begin the installation process!

Ubuntu USB Start
Installation Process

After selecting your language using the Enter key, select “Install Ubuntu Server”. You will be prompted to select your language again, as well as your country. Ubuntu will also ask to detect your keyboard layout. If you click “No”, you’ll have to verify that the default layout is the correct one.

Ubuntu keyboard verify

Ubuntu keyboard verify 2
After your keyboard is configured, Ubuntu will begin loading files required for the installation process. If your server is connected to the Internet, the installer will automatically configure your network connection and set your timezone.

After a short while, you’ll be prompted for a hostname. A hostname is a nickname given to your computer for convenience purposes. A hostname can always be changed, so have a little fun with it.

Ubuntu hostname
The next step is to set up the initial user account. Ubuntu will prompt you for a full name, a username, and a password. Remembering your username and password is essential, since losing either will make it extremely difficult to log back into your server!

One beneficial option provided by Ubuntu is home directory encryption. Your home directory is where all of your user files are stored, and encryption makes that data completely unreadable to anyone who doesn’t know your password. Whether you encrypt your home directory depends on your security preference.

Ubuntu home dir encrypt

After your user is set up, you’ll be asked to verify your timezone. Following that, you will be asked to set up your storage.

Disk Setup

Perhaps the most confusing part of the installation process is setting up your computer’s long-term storage. When an operating system is installed to your hard drive or SSD, it splits up the storage into logical units known as partitions. Each partition typically has a different size and takes up a different portion of the disk: for example, a computer with a 500 GB drive might create a 256 MB partition for files related to the boot process, a 20 GB partition for the operating system’s core files, and a ~480 GB partition for the home directory. There are additional complications when you want to split partitions across drives, encrypt partitions, or install a second operating system alongside Ubuntu. To keep things easy, we’ll use the default “Guided – use entire disk and set up LVM.”

Ubuntu partition disks

The installer will ask you which disk you want to partition. This is a virtual machine, and the only disk available is the virtual 21.5 GB “VBOX HARDDISK.” This will vary based on the number and type of disk in your system. Selecting a disk means permanently overwriting whatever was previously on it, so please be careful!

Ubuntu disk selection
Confirm that you want to write the changes using the entire disk.

Ubuntu disk confirmation
Ubuntu disk confirmation 2
If you decide to back out, now’s the time!

Ubuntu disk confirmation 3
After this point, the actual installation process begins. The installer will partition your drives and copy the files it needs to get your system up and running. At some point, the installer will prompt you for HTTP proxy information. Unless you know your computer is sitting behind a proxy, you can just press Enter.

Ubuntu proxy
Next, select your update frequency. It’s always a good idea to install security updates automatically, especially as a beginner.

Ubuntu updates
The next screen is the base software selection screen. This allows you to select the software that your server will run out of the box.

  • OpenSSH server (recommended): allows you to remotely access your server from another computer.
  • DNS server: allows your server to map domain names to IP addresses.
  • LAMP server: allows your server to host websites.
  • Mail server: allows your server to send and receive email.
  • PostgreSQL database: creates a database on your server.
  • Print server: allows your server to provide printer access to other computers.
  • Samba file server: allows your server to share files with other computers, including Windows and OS X computers.
  • Tomcat Java server: allows your server to run Java applications designed for the web.
  • Virtual Machine host: allows your server to run virtual machines.
  • Manual package selection: allows you to manually choose which software you want to install.

For now, we’re only going to select OpenSSH server. Use the space bar to check OpenSSH server, then press enter.

Once that’s done, the installer will ask you to confirm the bootloader installation. The bootloader is what kickstarts the operating system when you boot your computer. If you have no other operating systems installed, you can safely install the bootloader to the master boot record.
Ubuntu bootloader
With that, the installation process is done! Press enter to restart your server.

Ubuntu finished
Your computer will reboot, and you should see a short prompt followed by a lot of text. After a few seconds, you should be presented with a login screen. Congratulations, you’ve just installed Ubuntu Server!

Ubuntu login

If you’re not used to the command line, this interface may seem a bit daunting. That’s fine – while you’re free to install a graphical interface at any time, you’ll find the command line extremely useful for quickly performing complicated tasks. Plus, when your server is properly set up, you’ll barely have to use it at all.

The next step is to understand how Linux works on a basic level, how to remotely access your server using SSH, and how to install and configure additional software. If you’re rearing to go, you can find additional information at any of the links below. And remember, if you need to revert back to a clean slate, you can always follow these instructions to reinstall Ubuntu and start from scratch.

If you’re itching to jump ahead, the following resources will give you additional insight into the world of Linux.

A Beginner’s Comprehensive Guide to Ubuntu Server Setup

The Complete Beginner’s Guide to Linux

Official Ubuntu Server Guide


Previous: Choosing the Right Hardware

Next: Getting Started With Linux

Share your thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s