Using the Red Hat Package Manager
The install mode, as its name suggests, is used to install RPM packages onto your system. Installing a package is accomplished with the -i option:
# rpm -i penguin-3.26.i386.rpm
Before installing the package, RPM performs several checks. First, it makes sure the package you are trying to install isn't already installed. RPM won't let you install a package on top of itself. It also checks that you are not installing an older version of the package. Next, RPM does a dependency check. Some packages depend on other packages being installed first. In this example, you have just downloaded the latest RPM version of Penguin utilities and now want to install it.
# rpm -i penguin-3.26.i386.rpm failed dependencies: iceberg >= 7.1 is needed by penguin-3.26.i386.rpmThis error indicates the penguin package failed to install because it requires the iceberg package with a version equal to or greater than 7.1. You'll have to find and install the iceberg package, and any packages iceberg requires.
Finally, RPM checks to see if any configuration files would be overwritten by the installation of this package. RPM tries to make intelligent decisions about what to do with conflicts. If RPM replaces an existing configuration file with one from the new package, a warning will be printed to the screen.
# rpm -I penguin-3.26.i386.rpm warning: /etc/someconfig saved as /etc/someconfig.rpmsave
It's up to you to look at both files and determine what modifications, if any, need to be made.
The -u switch is used to upgrade existing packages. For example, if Penguin Utilities version 3.25 is already installed, issuing the command
# rpm -u penguin-3.26.i386.rpm
will replace the old version of the package with the new one. In fact, one of the quirks of RPM's upgrade mode is that the older package doesn't have to exist in the first place: -u works identically to -i in this case.
The rpm -e command removes a package from your system. Like Install mode, RPM does some housekeeping before it will let you remove a package. First, it does a dependency check to make sure no other packages depend on the package you are removing. If you have modified any of the configuration files, RPM makes a copy of the file, appends .rpmsave onto the end of it, then erases the original. Finally, after removing all files from your system and the RPM database, it removes the package name from the database.
Be very careful about which packages you remove from your system. Like most Linux utilities, RPM assumes omniscience and will silently let you shoot yourself in the foot. Removing the passwd or kernel package would be devastating.
This has been a basic introduction to the idea of packages and basic package management. You should now have a fairly good idea of how to query, install, upgrade and remove packages from your Linux system.
Kirk Rafferty has been a UNIX System Administrator for twelve years and has been using and maintaining Linux systems for the last five. His hobbies include paintball, gaming and making the best home brew in Colorado. He can be reached for comment at firstname.lastname@example.org.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Tech Tip: Really Simple HTTP Server with Python
- Doing for User Space What We Did for Kernel Space
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide