This post originated from an RSS feed registered with Python Buzz
by Micah Elliott.
Original Post: My APT Package Meme
Feed Title: Micah Elliott
Feed URL: http://feeds.feedburner.com/MicahElliott
Feed Description: Follow Micah as he makes connections around the Portland area, participates in community hacking events, explores the blogosphere, bounces ideas around, and tries to change the world by catching a big wave.
A look at automating setup for every new Ubuntu; and maybe even a meme.
Linux distros these days tend to be pretty minimal in their default install mode. Many of us used to be in the habit of checking the "Install Everything" box in the earlier Red Hat days. But then the box disappeared, and it became a pain to get everything you needed, and most people moved on to use apt or yum, or some equivalent, to get their systems to a usable state. The modern idea is that you start out with the bare minimum to simply enable yourself to boot, fumble around, and install more stuff. Then you just use apt-get, aptitude, synaptic, or whatever, to install to your particular needs. On a fresh new Ubuntu 8.04 installation I see only ~300 packages.
After some time on a machine you probably find that you've manually installed hundreds (or thousands!) of packages to satisfy all your development needs. Here's a great way to get that critical, comprehensive package list and make sure your other oft-used machines have everything you need. (You might even want this in the crontab of your primary machine; it can be helpful for recovery purposes. I'll discuss cron optimizations in a future post. And another future post will discuss why apt-get is Ubuntu's killer feature.)
The list on my primary machine shows nearly 2,000 packages now. That's a lot! Note that I'm excluding the libraries since they tend to just be dependencies. Including them can actually make an upgrade/rebuild/recovery more difficult. A Minimal Package Set
You may also find yourself needing to get onto freshly installed machines with some frequency. Maybe it's a new web host, or some lab machine you need to do some work on. For time and space reasons, it's probably not practical to start off by immediately installing your full 2,000-package set, so you'll want to come up with a minimal set which at least makes you dangerous.
As someone who regularly sits down at other people's machines, or at fresh new machines, I've found the need to have a small set of essential packages that I install, just to be productive. Here's my list (the green).
This will install some other dependencies, of course, but it's a pretty quick operation, requiring less than 100 MiB. There are various other essential packages not listed there, but they tend to be part of the basic install. Now you can just use something like "hg clone ssh://your-mocushla.com/yourhome" to pull in your well-organized, minimal $HOME setup -- but I'll talk about that in a future post.
Related tip of the day: Did you know you have tab-completion for apt-get? Try this:
newbox$ sudo apt-get install python-y
How many of those have you had to discover by searching? The Meme What's on your Minimal APT List? Or do you have a Yum List? Does it look different?