kernel version too. This is important to know because different features (and bugs!) exist in the various kernel versions. To see this information, you need to type uname ‐r at the command‐line prompt. You can also view this information via the cat /proc/version command.Finally, look at the version of the Bash shell running on the system. This is easy to accomplish with the bash ‐‐version command.
Once you've completed your checks, celebrate! You worked hard to get this Ubuntu Server distribution installed correctly.
The Bottom Line
Review needed Ubuntu server hardware resources. Determining the hardware resources required for an Ubuntu installation on a physical or virtualized server helps to ensure a successful completion of the install. It also avoids wasting time.Master It Imagine that you need to install the Ubuntu Server on a physical server that has a dual‐core 1 GHz CPU, a 200 GB hard drive, and 10 GB of RAM. Are the server's resources sufficient? Why or why not?
Determine the requirements for a virtual Ubuntu system. Installing the Ubuntu Server distribution on as a VM on a host system has different requirements than a direct installation on a physical server. It is critical to evaluate the host system so that the installation is successful.Master It Your project team is planning on installing two Ubuntu Server VMs on a host system that has a dual‐core 1 GHz CPU, a 200 GB hard drive, and 10 GB of RAM. Are the host system's resources sufficient? Why or why not?
Obtain Ubuntu Server software. To install the Ubuntu Server Linux distribution, you must have the proper ISO image file. This is true whether you are installing it directly on hardware or as a VM. Besides getting the ISO file, you need to ensure that it is not corrupted so that the installation proceeds well.Master It You've downloaded the Ubuntu Server ISO image file but are concerned that during the download process, file corruption occurred. What should you do to see whether the ISO image file is corrupt?
Conduct an installation of an Ubuntu Server. There are several steps to successfully install an Ubuntu Server, and it is critical that you complete all of them. Skipping a step can cause problems immediately, and problems later, if you can even get the system to boot.Master It Your sysadmin team has correctly installed the Ubuntu Server software from the ISO image file, and the system booted without any problems. What's the next step?
Audit the Ubuntu Server's installation. If you had some problems while booting the system, there are a few commands you can use to look at helpful boot messages. But even a successful installation still requires a few additional checks.Master It At your company, you have completed the entire Ubuntu Server installation process on a new system without any problems for the development team. The team wants to know what version of the Linux kernel is used on this new system. How do you get that information?
Chapter 3 Installing and Maintaining Software in Ubuntu
In the old days of Linux, installing software could be a painful experience. Fortunately, the Linux developers have made life a little easier for us by bundling software into prebuilt packages that are much easier to install. However, there's still a little work on your part to get the software packages installed, especially if you want to do so from the command line on a server.
IN THIS CHAPTER, YOU WILL LEARN TO
Explore different Linux software package management systems
Use Debian software packages to install software
Install applications using Debian snap containers
Install software from source code
Exploring Package Management
Before diving into the world of Linux software package management, this chapter goes through a few of the basics of how Linux manages application software. Each of the major Linux distributions utilizes some form of a package management system to control installing software applications and libraries. A package management system uses a database that keeps track of the following:
What software packages are installed on the Linux system
What files have been installed for each package
Versions of each of the software packages installed
Software packages are stored on servers, called repositories, and are accessed across the Internet via package management system utilities running on your local Linux system. You can use these utilities to search for new software packages or even updates to software packages already installed on the system.
A software package will often have dependencies, or other packages that must be installed first for the software to run properly. The package management system utilities will detect these dependencies and offer to install any additionally needed software packages before installing the desired package.
The downside to a package management system is that there isn't a single standard utility. Not all software package management systems work in all Linux distributions.
The package management system utilities and their associated commands are vastly different between the various Linux distributions. The two primary package management system base utilities commonly used in the Linux world are dpkg and rpm.
Debian‐based distributions such as Ubuntu use, at the base of their package management system utilities, the dpkg
command. This command interacts directly with the package management system on the Linux system and is used for installing, managing, and removing software packages.
The Red Hat–based distributions, such as CentOS, use the rpm
command at the base of their package management system. Similar to the dpkg
command, the rpm
command can list installed packages, install new packages, and remove existing software.
Note that these two commands are the core of their respective package management system, not the entire package management system itself. Many Linux distributions that use the dpkg
or rpm
methods have built additional specialty package management system utilities upon these base commands to make your life much easier. The following sections walk through the package management systems you'll find in Debian‐based systems, such as Ubuntu. Chapter 5, “Installing and Maintaining Software in Red Hat,” covers using the rpm package management system.
Inspecting the Debian‐Based Systems
The dpkg
command is at the core of the Debian‐based family of package management system tools. It provides options to install, update, and remove Debian package files on your Linux system.
The dpkg
command assumes you have the package file either downloaded onto your local Linux system or available as a URL. More often than not, that isn't the case. Usually you'll want to install an application package from the repository for your Linux distribution. To do that, you'll use the Advanced Package Tool (APT) suite of tools.
apt‐cache
apt‐get
apt
The apt
command is essentially a front end for both the apt‐cache
and apt‐get
commands. The nice thing about APT is that you don't need to remember which tool to use when—it covers everything you need to do with package management. The basic format for the apt
command is
apt [options] command
The command defines the action for apt
to take. If needed, you can specify one or more options to fine‐tune what happens. This section looks at how to use the APT command‐line tool