Linux package management is brilliant

By apexwm, 1 October, 2010 19:11

Often times when something just works, we tend to take it for granted. I think software package management in Linux is one of those things. It just works. Time and time again I have to help people with packages in Windows, which makes me even more thankful for the solid package management system in Linux. Packages can be installed while software is currently being used, allowing changes to happen when the software is closed and reopened. Packages can also be removed/updated/installed while the user is actively using the computer, with a simple SSH connection to their PC. And, best of all, no rebooting is necessary, unless you are updating the kernel itself, which is pretty rare.

Remote package installation is very important in corporate environments. For this article, I'll focus on Fedora / Red Hat distributions, however Ubuntu and others have similar package management mechanisms. With a simple command like "rpm -i packagename.rpm", any package can be installed silently. However, using "rpm -ivh packagename.rpm" will provide the package install progress (if you are installing a whole batch of packages with a command like "rpm -ivh *.rpm"). Try this in Windows, it's nearly impossible to install in batches unless you write a custom script. Packages in Windows can be .zip files, self-extracting .exe files, and packaged by any one of several different installers like InstallShield, Wise, Microsoft Installer, and others. And what's even more frustrating is each package in Windows can have totally different options that need to be specified. Each product being installed is uniquely different. With RPM packages in Linux, the parameters are always the same, because they all use the RPM utility to install (RPM stands for Red Hat Package Manager).

The Yum (Yellowdog Updater Modified) utility gives you a link to the Linux distribution's repository, allowing you to update/install packages directly over the Internet. The really nice thing about Yum is that it decides what dependencies are needed, and downloads them all in one step automatically. Commonly with a lot of Linux packages, dependencies are needed as each component is provided as a separate package. This gives complete flexibility of your software management.

Recently I've been faced with updating Java remotely on both Windows and Linux. On the Windows systems, the MSI (Microsoft Installer) packages had to be extracted from the self-executing installation file from Oracle. Then a batch file had to be created to install Java, because no built-in mechanism was in place to silently install Java reliably. This had to be deployed across to the Windows PCs, and about 50% of the installations failed. On Linux, the RPM files were copied to the PCs, and installed with a simple "rpm -Uvh" command, and the update was done. (The -Uvh options provide instant feedback from the installation progress). Linux can also be set up to pull the packages from the JPackage repository, allowing administrators to simply run a command like "yum upgrade java" and the packages will be downloaded and installed on the fly. Adobe has a similar repository for updating Flash. Adding repositories allows Yum to find the packages automatically, and install them on the fly. Very very easy and extremely powerful.

Most distributions have a graphical utility for viewing, adding, and removing packages installed on the system. In Fedora / Red Hat / CentOS, it's called "Add/Remove Software" under the System menu. Ubuntu and other distributions have a similar application. Windows has similar functionality as well, called "Installed Programs" in Windows 7, or "Add/Remove Programs" in Windows XP. However in Windows, all packages work differently, which leads to inconsistencies. Want a file listing of a package? Just run "rpm -ql packagename" and it will list the contents and where they were placed on the filesystem. Try this in Windows, I bet it can't even be done. The RPM database on each system is a complete, clean, and efficient way to managing ALL installed software on the Linux system.

 

Talkback

I just set up yum as a cron job. Truly seamless and invisible updating!
AndyPagin 5 October, 2010 10:01
Report offensive content Reply


Hooray for package management in Linux! I use Ubuntu, and recently have stooped to the non-techno Ubuntu Software Centre, just because it's so easy to use. Linux might only have 1% of desktop market share but the package management is 10x better than the stuff in Windows :)
Jake Rayson 5 October, 2010 14:01
Report offensive content Reply


@Jake, package management is only one of the things that make Linux better than windows. In fact, I can't think of anything windows does better than Linux, except catch viruses, adware. malware, unexpected freezes, and re-boots.
ator1940 5 October, 2010 14:12
Report offensive content Reply


It amazes me that more companies don't pursue the use of Linux over Windows, due to the simple fact that it's easier and more efficient to maintain. Windows is simply a hog, both with resources and cost. You can see this by looking at the growth of Linux during the times when the economy has slumped. Remote administration in Windows is awful. It requires 3rd party addons and everything is fragmented to the point that it's more work for administrators. It's amazing at what can be done remotely on Linux with a simple SSH terminal. As I already pointed out, software can be modified, as well as other system tasks, all done while the user is working and without any rebooting necessary.

And as far as software updates, a local Yum repository can be set up (similar to Windows WSUS) so that updates are installed locally as they are approved. This enables seamless updating.

So the list goes on and on...
apexwm 5 October, 2010 17:36
Edit Delete Report offensive content Reply


So, how do I make an upgrade package for Linux that upgrades a single file? A single setting? Oh, I have to package all the files once again? Nice...

How do I repair a broken installation? By reinstalling? Nice...

How do I install an optional feature runtime? Oh, I can't? Nice...

You're mixing up two concepts here: software distribution and package management. One is what rpm/apt/etc do. The second is what is needed and they don't really do. They just copy files and run scripts and then they leave it at that.

And don't come mixing up 3rd party installation systems that too many people use. They're total crap. Remote installing MSI packages has been available for years and is no problem for others than you.
Getaclueapexwm 22 January, 2011 22:08
Report offensive content Reply


"So, how do I make an upgrade package for Linux that upgrades a single file? A single setting? Oh, I have to package all the files once again? Nice..."

I would have to ask you why you would need a package (vs. a simple script) to copy a single file. ? And yes you can compile your own RPM package from the source RPM, if you had to.

"How do I repair a broken installation? By reinstalling? Nice..."

Sure, in Windows, that is very true.

"How do I install an optional feature runtime? Oh, I can't? Nice..."

Could you elaborate?

"They just copy files and run scripts and then they leave it at that."

And that's the beauty of simplistic package management, which is what we have here. Why complicate things with bloated 3rd party installers, scripts, registry entries, like we have in Windows? If package management in Windows was so easy, then why do sites like AppDeploy become so popular?

"And don't come mixing up 3rd party installation systems that too many people use. They're total crap. Remote installing MSI packages has been available for years and is no problem for others than you."

Yes, MSI has been around for a while, but you are ignoring the fact that many vendors don't use MSI and choose 3rd party packagers. Then what? Learn each one and guess at its installation switches? That's what you essentially get. I would have to assume from your comment that you have no experience deploying software in an enterprise environment. With Linux I can ssh into any box (or use cron and/or a package repository to automate installations), and install RPM packages with a simple command line. The parameters are always the same, since the RPM package manager is always used, no 3rd party packages and inconsistencies.
apexwm 26 January, 2011 01:59
Edit Delete Report offensive content Reply