Home Cloud & Networking Mastering Ubuntu Server - Third Edition

Mastering Ubuntu Server - Third Edition

By Jay LaCroix
books-svg-icon Book
eBook $66.99 $45.99
Print $83.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $66.99 $45.99
Print $83.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Managing Users and Permissions
About this book
Ubuntu Server has taken data centers around the world by storm. Whether you're deploying Ubuntu for a large-scale project or for a small office, it is a stable, customizable, and powerful Linux distribution with innovative and cutting-edge features. For both simple and complex server deployments, Ubuntu's flexible nature can be easily adapted to meet to the needs of your organization. This third edition is updated to cover the advancements of Ubuntu 20.04 LTS and further train you to understand how to use Ubuntu Server, from initial deployment to creating production-ready resources for your network. The book begins with the concepts of user management, group management, and file system permissions. Continuing into managing storage volumes, you will learn how to format storage devices, utilize logical volume management, and monitor disk usage. Later, you will learn how to virtualize hosts and applications, which will include setting up QEMU & KVM, as well as containerization with both Docker and LXD. As the book continues, you will learn how to automate configuration with Ansible, as well as take a look at writing scripts. Lastly, you will explore best practices and troubleshooting techniques when working with Ubuntu Server that are applicable to real-world scenarios. By the end of this Ubuntu Server book, you will be well-versed in Ubuntu server’s advanced concepts and attain the required proficiency needed for Ubuntu Server administration.
Publication date:
December 2020
Publisher
Packt
Pages
702
ISBN
9781800564640

 

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

About the Author
  • Jay LaCroix

    Jeremy "Jay" LaCroix is a technologist and open-source enthusiast, specializing in Linux. He has a net field experience of 20 years across different firms as a Solutions Architect and holds a master's degree in Information Systems Technology Management from Capella University. In addition, Jay also has an active Linux-focused YouTube channel with over 250K followers and over 20M views, available at LearnLinuxTV, where he posts instructional tutorial videos and other Linux-related content. He has also written Linux Mint Essentials and Mastering Linux Network Administration, published by Packt Publishing.

    Browse publications by this author
Latest Reviews (4 reviews total)
I learned a lot of new things from this book.
Buenos libro y a la última. Muy contento.
Excellent, smooth experience !
Mastering Ubuntu Server - Third Edition
Unlock this book and the full library FREE for 7 days
Start now