Skip to main content

If you don't have an IBM ID and password, register here.

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

Tip: Upgrading applications from sources

Don't be scared by new versions

Daniel Robbins (drobbins@gentoo.org), President/CEO, Gentoo Technologies, Inc
Residing in Albuquerque, New Mexico, Daniel Robbins is the President/CEO of Gentoo Technologies, Inc., the creator of Gentoo Linux, an advanced Linux for the PC, and the Portage system, a next-generation ports system for Linux. He has also served as a contributing author for the Macmillan books Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade, when he was first exposed to the Logo programming language as well as a potentially dangerous dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife, Mary, and his new baby daughter, Hadassah. You can reach Daniel Robbins at drobbins@gentoo.org.

Summary:  So, you've compiled and installed your first application from source code, and it's working great. Congratulations! But now, there's a new version of the sources available and you'd like to upgrade, but you want to make sure that everything goes smoothly. What practical steps can you take to avoid pitfalls? In this tip, I'll show you several.

Date:  01 Sep 2000
Level:  Introductory

Comments:  

Upgrading can be simple

Upgrading software from sources can be very simple, but there are several precautions you should take, especially if you're new to compiling from sources, or if you're not very familiar with the particular source archive you are installing. The top things to watch out for are listed below, but in most cases, an update is almost identical to the original compilation and install steps. That is, the steps include a tarball extraction, a possible "./configure", "make", and "make install". If these terms are not familiar to you, then check out developerWorks' tutorial on Compiling and installing software from sources, and then head back here.


Read the Changelog

After downloading the sources, familiarize yourself with any new changes to the software -- normally, these changes are itemized in the ChangeLog or README file in the main source directory. You may find that configuration file settings have changed slightly, or that new features have been added. It's best to find out about these changes from the source documentation, rather than stumbling upon them later. Not doing so is definitely a bad move -- and besides, since you're taking the time to install a new version of this particular software package, wouldn't it be a good thing to know what new features or bug fixes are included?


Upgrading critical applications

If you're upgrading an application that many users rely on (like the Apache on your busy Web server), then it pays to be extremely careful. If possible, practice installing the new version of the sources on a non-production box, and write down all the steps you performed to get the new version up and running. That way, if you run into a problem during the upgrade, no harm is done. And, when you're ready to upgrade your production box, you'll have a careful list of steps to perform -- reducing precious downtime.

In addition, if you're upgrading a critical app, it's always best to do so during off-peak hours.


Configure it the same way

One of the main mistakes that people make when upgrading an app is to specify different and incompatible options on the "./configure" line or to uncomment different lines in a configuration Makefile. If you want to perform a simple upgrade, make sure that the new version of the software is configured exactly like your current version was.

If your current version looks for its configuration files in /etc, it would be nice if the new version did too. Don't be sloppy; if you pass different options to the "./configure" command, you could easily end up with a new version that has significantly different functionality, installs into the wrong directory tree, or looks in the wrong place for its configuration or data files. If you can't remember the configure options or Makefile defines you used originally, make sure you find out before you compile and install the new sources. To make the upgrade go smoothly, you'll want to get these settings right from the start.


Back up old config files before install

For many packages, the real challenge comes not in the compilation and installation stages, but in the process of setting up an application to work properly after you've typed "make install". This normally involves spending a few good hours editing an application's config file, which is normally found in /etc, sporting the popular ".conf" suffix.

When you install a new version of a package by typing "make install", most Makefiles won't overwrite your existing configuration files sitting on disk -- but it's always better to be safe than sorry. If you're not completely sure, by all means back up those precious config files! Depending on the package, some configuration files could take days to reconstruct. If they happen to contain encrypted passwords, reconstruction may be extremely time consuming or impossible.

If you're planning on making major upgrades to your Linux system, this may be a good time to perform a full system backup. It's an especially good idea if you're going to upgrade a critical system library or tool that many other packages depend on to function properly. Full system backups are good things in their own right, and I hope you back up your system on at least a semi-regular basis.


Keep the older source handy

I don't mean to discourage you from upgrading to the latest version of your favorite program -- but it is possible that the new version simply won't work. Maybe "./configure" will bomb out, or maybe "make" will. Worst case scenario, maybe everything, including "make install", will go splendidly until you actually try to run the program. Buggy source releases do happen, and that's why it's a great idea to keep your older sources (and any installation steps) handy in case the newer sources aren't up to snuff.


Test it!

It's one thing to compile and install something, and quite another thing to make sure that the new software actually works. You'll want to make sure that you didn't just install 500 KB worth of garbage onto your root partition. Maybe the new version's config file needs slight, or even heavy, tweaking. If you're updating a daemon, make sure your configuration scripts successfully start the new version on reboot. You definitely don't want to find any problems two weeks later, when you reboot your server (and the program's configuration details are not fresh in your mind). You can follow all the advice in this article, but if you don't test your setup, you're skipping the most important step.

Now, you should be adequately equipped to upgrade your favorite app. Have fun!


Resources

About the author

Residing in Albuquerque, New Mexico, Daniel Robbins is the President/CEO of Gentoo Technologies, Inc., the creator of Gentoo Linux, an advanced Linux for the PC, and the Portage system, a next-generation ports system for Linux. He has also served as a contributing author for the Macmillan books Caldera OpenLinux Unleashed, SuSE Linux Unleashed, and Samba Unleashed. Daniel has been involved with computers in some fashion since the second grade, when he was first exposed to the Logo programming language as well as a potentially dangerous dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at SONY Electronic Publishing/Psygnosis. Daniel enjoys spending time with his wife, Mary, and his new baby daughter, Hadassah. You can reach Daniel Robbins at drobbins@gentoo.org.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in

If you don't have an IBM ID and password, register here.


Forgot your IBM ID?


Forgot your password?
Change your password


By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)


By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Linux
ArticleID=11040
ArticleTitle=Tip: Upgrading applications from sources
publish-date=09012000
author1-email=drobbins@gentoo.org
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).