Hands-on Lab·LPIC-2
Building from source, and what it leaves behind
Objective 206.1 is building and installing programs from source. This guide takes GNU hello from a tarball to a running binary on a server that had no compiler, then asks the two questions the objective is really about: what does the package manager know about what you just installed, and can you put the machine back?
201: System Maintenance Guide 21 of 29 Intermediate
- OSUbuntu 26.04 LTS
- Kernel7.0.0-30-generic
- systemd259
- Block devicesone 50 GB disk
- TimeAbout 22 min
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LPIC2-A01 | 192.168.0.78 | Ubuntu 26.04 LTS | Primary service host - BIND, Apache, Samba, Postfix. Topic 204 RAID runs on loop devices; this machine has no spare disk | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when the version you need is newer than the repository's, or when a vendor ships nothing but a tarball. This matters because a compiled install is invisible to the package manager - nothing will upgrade it, nothing will patch it, and nothing will tell you it is there in two years.
- installing a toolchain on a server that had none, and reading the tarball before extracting it
- letting
configurechoose a prefix, and finding it written into the Makefile it generated - compiling, installing, and running a binary the package manager cannot account for
- running
make uninstalland finding a file still there afterwards - chasing down why purging
build-essentialleft the compiler, and removing it properly
Before you start
- the-lab-a-service-needs-a-client
-
A server with no toolchain
-
Look inside the tarball before extracting it
-
configure decides where it will live
-
make, then make install
-
The package manager has never heard of it
-
Uninstall, and the cleanup that did not clean up
-
The purge that did not remove the compiler
-
Why autoremove left them
-
Removing make would install more than it removes
-
Taking the compiler off, and what has to stay