Y'herd thisun? 

“Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems”
-Jamie Zawinski

from comp.lang.emacs

MONO/Ubuntu part 3 - Update the OS with APT


apt-get or aptitude?

After installing the basic Ubuntu 8.10 server OS, it's a good idea to make sure that you've really got the latest stuff. In Windows this is done with a ping of WindowsUpdate, in Ubuntu server you've got aptitude and apt-get. Both tools are related to the "apt" that you might have seen during the install...

When you're looking around the net for information on installing programs you'll see apt-get and aptitude used almost interchangably. Careful though, while they are similar they aren't exactly the same.

Both of these package management and installation tools do the same thing - install software - also, they use the same software repository database that was installed along with your server (A "repository" database being a list of locations where fully-supported, partially supported and unsupported software packages physically reside).

There was a time when "apt-get remove" was the way to uninstall a program and when you used it it didn't get rid of dependancies as well as "aptitude remove" did, but a couple of Ubuntu versions back apt-get got the "autoremove" option and that cleaned the problem up.

At this point the fandom generally agrees that they're about equal with the exception of aptitude having an optional menu-driven UI that you can use for searching the database and doing your package management.

For perspective, here's the Windows2003Server version of a "repository and package manager":

Optional aptitude UI version, get to it by typing just "aptitude" on the command line with no options:

Use either apt-get or aptitude, they both have loads of fans and supporters. Might be a good idea, though, to respect the rule of thumb that if you use one you should stick with it because they may not play nice with the other's previously installed files and you might muck up or remove dependancies that the other was managing.

I lean towards "aptitude". Let's use that to do a WindowsUpdate for our brand new box... the command is:

sudo aptitude update

This command will flush out your apt source lists and get them up to date. Maybe it is done during the install instead of just using the data on the dvd so maybe this isn't required right off the bat, but it can't hurt.

After typing that you'll be prompted for your password. (And if you forgot to type "sudo", just hit your UpArrow key to bring the last command back up then backspace and type "sudo" at the beginning.)

In a few seconds the respository list will be refreshed and you'll be back at the command line.

Now, *Safely* upgrade your OS

To get the junk off your screen, 'nix has a CLS function, it's "clear", so type "clear" (no quotes) to get rid of the scrolls left over from the apt update.

Next, to get the very latest versions of your core installation, just type:

sudo aptitude safe-upgrade

Using "safe-upgrade" helps keep your machine stable because it is designed to only get verfied updates that have all of their downline dependancies also verified as stable (Well, we hope, anyway). If you're at wits end over some particular OS bug or just want to live on the edge, you can just use "sudo aptitude update" and get a lot more stuff, but it could bite you.

Once the repositories have been hit, you'll have to approve the changes with a "y". Then sit back while you're 'Non-WindowsUpdated' ;-).


Coming next: Remote access with SSH, plus managing Linux users and groups.

jump to:

  • 1: Why?
  • 2: Installation
  • 3: Update the OS with APT
  • 4: Remoting to the box with SSH
  • 5: NANO quickies for 95% of the jobs
  • 6: Firewalling Ubuntu 8.10 Server
  • 7: Installing Apache2 and MONO
  • 8: Test client host files
  • 9: Configure MONO on Apache2
  • 10: Apache default pages
  • 11: Handling Apache and Mono Errors
  • 12: Subdomains and Christian porn
  • 13: Virtual Host Tweak: unmanaged cAse sensitiviTy
  • 14: Managed cAse sensitiviTy
  • 15: Managing files and folders
  • 16: Logging Apache Accesses and Errors
  • 17: Ubuntu Task Managers
  • 18: Ubuntu Services and Service Managers
  • 19: Installing Oracle 10g XE Server
  • 20: Connecting Mono to Oracle

  • home     who is smith    contact smith     rss feed π
    Since 1997 a place for my stuff, and it if helps you too then all the better