Interview Prep/Linux/Packages, kernel and boot

You need to compile and install software from source on a server that also uses packages. How do you avoid making a mess?

IntermediateScenarioPackages, kernel and boot
Answer

Situation read → Keep source builds separate from package-managed paths.

What I'd do →

  1. Build in a separate directory and install to /opt/<name>-<version> with ./configure --prefix=/opt/tool-2.1.
  2. Symlink /opt/tool -> /opt/tool-2.1 for easy upgrades.
  3. Better: package it (fpm, rpmbuild) so it can be removed cleanly and deployed via repo.
  4. Don't install compilers on production; build in CI or a build container.

Why → make install into /usr collides with package files and can't be cleanly uninstalled.

Interview tip → Mention checkinstall or fpm for quick packaging.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot