Linux server package management

Running an unmanaged server gives you the freedom to install the applications you want and maintain relative autonomy regarding resource allocation and development. But having your own server also means you are the one responsible for security updates and installing anything you want to add to it.

This does not mean you should panic. Installing and updating software with Linux is actually quite easy. The important thing to understand is how the management tools for various distributions differ. In Linux, the compressed archives that contain applications are called “packages”. For example, there is a package for Apache 2 web server software.

Each Linux distribution has its own package repository and package manager, although some may use the same package manager and also may share repositories (such as Red Hat Enterprise Linux and CentOS). Today we will look at two package managers: YUM and APT.

YUM stands for Yellowdog Updater, Modified, and as the name implies, it is based on a package manager originally created for Yellowdog Linux. YUM was created for Red Hat Linux and is now used for Red Hat Enterprise Linux, Fedora, and CentOS, all of which are common server operating systems.

To update packages with YUM, connect to your server via SSH, and login as root:

Then, enter your root password.

Next, run the following command:

yum check-update
This will return a list of packages that are available for update.

To update all currently installed packages, type:

yum update

To update a particular package, type:

yum update package-name

To search for new packages, type:

yum search keyword

And to install a new package, type:

yum install package-name

YUM will automatically find dependencies necessary to install any packages you select, and it should resolve any conflicts as well. The currency of packages depends on your distribution. Next week, we will take a look at APT, the package manager for Debian-based distributions.