Deploying Ubuntu Server
Ubuntu Server is an extremely powerful distribution of Linux for servers and network appliances. Whether you're setting up a high-end database or a small office file server, the flexible nature of Ubuntu Server will meet and surpass your needs. In this book, we'll walk through all the common use cases to help you get the most out of this exciting platform. Ubuntu Server features a perfect mix of modern development frameworks and rock-solid stability, and its hardware support enables it to be installed on the latest server hardware.
In this chapter, I'll guide you through the process of deploying Ubuntu Server from start to finish. We'll begin with some discussion of best practices, and then we'll obtain the software and create our installation media. Next, I'll give you a step-by-step rundown of the entire installation procedure. By the end of this chapter, you'll have an Ubuntu Server installation...
Technical requirements
To follow along with the examples in this book, you'll need an Ubuntu Server installation to work with. In general, the following specifications are the estimated minimums to successfully install Ubuntu Server:
- 64-bit CPU
- 1GB RAM
- 10GB hard disk (16GB or more is recommended)
64-bit CPU support is now a requirement, as Canonical no longer makes versions of Ubuntu available for 32-bit processors (with the only exception being older models of the Raspberry Pi). While this may seem like a surprising requirement, all computers sold today support 64-bit operating systems, and consumer CPUs have been 64-bit capable since at least 2003. Even if you have an older PC lying around that you don't think is capable of running a 64-bit operating system, you'd be surprised—even the later models of the Pentium IV (which is quite old) supports this, so this requirement shouldn't be hard to meet. Don't worry...
Determining your server's role
While at this point your goal is most likely to set up an Ubuntu Server installation for the purposes of following along with the examples contained within this book, it's also important to understand how a typical server rollout is performed in the real world. Every server must have a purpose, or role. This role could be that of a database server, web server, file server, and so on. In a nutshell, the role is the value the server adds to you or your organization. Sometimes, servers may be implemented solely for the purpose of testing experimental code. And this is important too—having a test environment is a very common (and worthwhile) practice.
Once you understand the role your server plays within your organization, you can plan for its implementation. Is the system mission critical? How would it affect your organization if for some reason this server malfunctioned? Depending on the answer to this question, you may only need to...
Setting up our server
Now it's time to set up an installation of Ubuntu Server to use for the examples in this book. But before we can do that, we have to decide what to actually install it on. For the purposes of this book, there isn't a specific requirement in terms of hardware. You just need an Ubuntu Server installation of some sort, and it wouldn't hurt to set up multiple servers if you can—you don't need them all to be on the same device type. Having multiple servers will help you experiment with networking when we get to that point later on in the book. But for now, it's only a matter of utilizing whatever you have at your disposal to get an Ubuntu installation going.
In particular, the following list includes the most common devices you can consider for your Ubuntu Server installation:
- Virtual machine
- Physical server
- Virtual private server
- Spare desktop or laptop
- Raspberry Pi
Let's take a...
Obtaining installation media
It's time to get started! If you've decided to utilize a physical server, desktop, laptop, or VM as your test server, then you'll need to go through the installation process to set up Ubuntu. Don't worry—it's very easy to do and is made even easier in Ubuntu 20.04 as there are fewer overall steps in the process. If you've instead opted to use a VPS or Raspberry Pi, you won't need to go through this process, as VPS providers do this for you and Raspberry Pi has a different setup method altogether (we'll cover this later in the chapter, in the Installing Ubuntu on a Raspberry Pi section).
Assuming that you've decided to use a device that does require going through the installer, we'll need to download Ubuntu Server and then create bootable installation media to install it. How you do this largely depends on your hardware. Does your device have an optical drive? Is it able to boot from USB? Refer...
Creating a bootable flash drive
The process of creating a bootable USB flash drive with which to install Ubuntu used to vary greatly between platforms. The steps were very different depending on whether your workstation or laptop was currently running Linux, Windows, or macOS. Thankfully, a much simpler method has come about. Nowadays, I recommend the use of Etcher to create your bootable media. Etcher is fantastic in that it abstracts the method such that it is the same regardless of which operating system you use, and it distills the process to its most simple form.
Another feature I like is that Etcher is safe; it prevents you from destroying your current operating system in the process of mastering your bootable media. In the past, you'd use tools like the dd
command on Linux to write an ISO file to a flash drive. However, if you set up the dd
command incorrectly, you could effectively write the ISO file over your current operating system and wipe your entire hard drive...
Installing Ubuntu Server
At this point, we should be ready to get an installation of Ubuntu Server going. In the steps that follow, I'll walk you through the process.
Installing media
To get started, all you should need to do is insert the installation media into your server or device and follow the onscreen instructions to open the boot menu. The key you press at the beginning of the POST process differs from one machine to another, but it's quite often F10, F11, or F12. Refer to your documentation if you are unsure, though most computers and servers tell you which key to press at the beginning. You may miss this window of opportunity the first few times, and that's fine—to this day I still seem to need to restart the machine once or twice to hit the key in time.
When you first boot from the Ubuntu Server install media, you'll see an icon near the bottom that looks like the following (it will go away after a few seconds):
...Installing Ubuntu on a Raspberry Pi
The Raspberry Pi platform has become quite a valuable asset in the industry, and a useful server platform. These tiny computers, now with four cores and up to 8 GB of RAM, are extremely power efficient and their performance is good enough that you can actually transform them into actual servers. In my lab, I have several Raspberry Pis on my network, each one responsible for performing specific tasks or functions. In many cases, you wouldn't even tell that they were devices with lower-powered hardware. Perhaps even more surprising is the fact that the Raspberry Pi 4 can outperform some lower-tier cloud instances, giving you a powerful server without the monthly cost if you don't need a high-end CPU. All this, in such a small form factor—these devices are smaller than the coaster under your coffee mug!
Ubuntu Server is available for Raspberry Pi models 2, 3, and 4. To get started, all you'll need to do is visit the official...
Summary
In this chapter, we covered a couple of different installation processes in great detail. As with most Linux distributions, Ubuntu Server is scalable and able to be installed on a variety of server types. Physical devices, VMs, and even the Raspberry Pi have versions of Ubuntu available. The process of installation was covered step by step, and you should now have an Ubuntu Server instance of your own to configure as you wish. Also in this chapter, we covered determining the role of your server, the process of creating bootable media, and a walk-through of setting up Ubuntu Server on a Raspberry Pi. You're now on your way to Ubuntu Server mastery.
In the next chapter, we'll show you how to manage users. You'll be able to create them, delete them, change them, and even manage password expiration and more. We will also cover permissions so that you can determine what your users are allowed to do on your server. See you there!
Further Reading
- Install Ubuntu Server (Video Tutorial) from LearnLinuxTV:https://learnlinux.link/install_ubuntu_server