Installing Packages from Source Code

Sometimes it's necessary to install a package from source code. Perhaps the package you need is only available in source code. Perhaps you need the package installed with a configuration that's not available as an RPM. You can download the source code, compile it on your own computer, and install it.

Instructions for installing are available on the package home Web site and included in the package. In general, the procedure for installing from source code is:

1.
Download the source code file. Filenames are packagename.version.tar.gz. For example, the source code file for PHP could be named php-5.0.2.tar.gz. The directory /src or /local/src is often used to store source code.
2.
Unpack the tarball.
 cd /local/src ...

Get Spring Into Linux® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.