In this short series, we'll go over package management - an essential tool for both beginner Linux users and the more seasoned system adminstrators. Package management will help you seamlessly install, upgrade and maintain software. This series will cover Debian (Ubuntu) package management for now, but we will also include lessons for Red Hat in a future lesson.
Long ago when software wasn't as abundant as it is today, package management was nonexistent. This meant that users had to individually download and compile source code when installing software, a process that was redundant as it was time consuming. Additionally, software that required other dependencies had to be installed separately, making the process of installing large software systems incredibly tedious. With the number of software in a person's computer increasing, so did their complexity of management, as upgrading systems had to be performed manually.
Nowadays, almost all platforms come with a designated package management system. Package managements allow you to install, upgrade, configure and remove software packages from your computer's system. At the heart of this system is a database that contains information about your softwares' last-upgrade dates, dependencies, version number, and more. Package managers allow you to conveniently manage all the software without a sweat.
Not only has package management allowed for users to easily download and maintain software, but it has also forced developers to uphold a strict convention as to how their software is structured.
Furthermore, we now have software available in packages, with information about dependencies, and version numbers. This allows us to keep track of bug information and whether it is necessary to download security patches.
Depending on your Linux distribution, (Debian, Red Hat or SUSE), or platform (OS X), we have different package management software and tools.
For the Debian distribution, which includes Linux Mint, Ubuntu, Debian, and Linspire, packages come in .deb files, and use tools like
Red Hat, which includes CentOS, Fedora, Mandrivia and OpenSuSE, use packaging tools
For OS X, you can use Homebrew.
From the perspective of a package management system, a package file contains all the data files and programs that support the software. This is where all the metadata is found, including a description of its contents, version number and more. This also includes scripts that run before and after the installion is performed.
Dependencies are additional packages required by the principal package in order to function propertly. In short, it is a piece of software that is required for another to run. For example, if the year were 2004 and I wanted to watch a funny animation on the web, I would have to first install Adobe Flash Player. Thus, Adobe Flash Player serves as a dependency to flash animation videos.
Package managers maintain dependency information, allowing the system to know whether it needs to pull anything other programs in.
Libraries are software components that can be shared by many different programs. This allows a reduction in disk space and memory requirements, as multiple programs are allowed to access the same files.
The package management system uses checksums to validate and verify installed software. Checksums allows the computer to check for disk errors or accidental overwrites of files.
To use any commands that have to deal with package management, you'll need to be signed in as root. To do so, use the
sudo -s command, and put in your system's password when prompted.
This book approaches system administration in a practical way and is an invaluable reference for both new administrators and experienced professionals. It details best practices for every facet of system administration, including storage management, network design and administration, email, web hosting, scripting, and much more.$ Check price
This book synthesizes the most effective techniques and must-know principles into clear, pragmatic guidance. No matter what your experience level, development environment, or project size, this book will inform and stimulate your thinking - and help you build the highest quality code.$ Check price