The Artima Developer Community
Sponsored Link

Python Buzz Forum
My APT Package Meme

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Micah Elliott

Posts: 106
Nickname: mde
Registered: Feb, 2007

Micah Elliott is a hacker-entrepreneur starting up in Portland
My APT Package Meme Posted: May 22, 2008 5:18 PM
Reply to this message Reply

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.
Latest Python Buzz Posts
Latest Python Buzz Posts by Micah Elliott
Latest Posts From Micah Elliott

Advertisement
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.)

mocushla$ dpkg --get-selections | grep -v ^lib [>/some/backed/up/place/packages.log]

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).

newbox$ sudo apt-get install build-essential screen zsh corkscrew mercurial subversion python ipython ctags vim vim-scripts sqlite3 tree ntp

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?

If you found this post interesting, you may be interested in some related book s: Linux Patch Management, and Ubuntu Hacks.

Read: My APT Package Meme

Topic: Delphi is a very useful tool (with case study) Previous Topic   Next Topic Topic: Desert Code Camp is May 31

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use