Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to update a version of a program I have previously compiled manually to /opt. Can I just compile the new version and let it overwrite its previous install (Assuming there are no compatibility issues) or is this bad practice?

I'm doing this on a server that is completely backed up; so worst comes to worst I can reimage.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Can I just compile the new version and let it overwrite its previous install (Assuming there are no compatibility issues) or is this bad practice?

Yep, you should be just fine. Binaries get over-written all of the time, sometimes due to manually-compiled packages, but more frequently because of yum/apt/etc. binary package updates.

share|improve this answer

It really depends on the program and the differences between versions, and how it's installation process works. If, for example, you configure it with different settings, which resulted in different sets of modules being built in a program that supports external dynamic modules (Apache, heartbeat, ProFTPd, etc...), there may be modules left in the directories which are built against the old version.

Config files may also be overwritten or new config files not written, depending on the install process. This has most often bitten me with postfix, where new services are required in the master.cf, but Postfix helpfully provides a tool to fix these instances.

Personally, in the rare cases where I manually install software (rather than using distribution packages), I try to get them in a directory named based on the version, and then create a symbolic link from the generic name to the specific name. That way I can install the new version in a completely new directory. Otherwise, it's probably a good idea to move the old directory out of the way, say renaming it to ".old", and then do the reinstall.

share|improve this answer

Normally yes. The makefile might provide a "clean" option to uninstall the old binaries.

If you plan to do this often - learn how to build proper packages and use the package-install-options to install/update to new versions or releases.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.