|< Day Day Up >|
Recipe 4.4. Installing Programs from Source Code
Unpack the tarball (compressed archive), then configure, make, and install the program.
# cd /usr/src/downloads # tar zxvf joe-2.9.8.tar.gz # cd joe-2.9.8 # ls # less README # less INFO # ./configure —help # ./configure <options, if needed> # make # make install | tee joe-makeinstall
The last command stores the installation output in the text file joe-makeinstall.
# tar jxvf joe-2.9.8.tar.bz2
To uninstall a source-built program, use:
# make uninstall
Uninstalling works only if the program author included a make uninstall option. Piping the output of make install to a text file gives you a reference if you have to remove all the files manually. Or generate a list using Recipe Recipe 4.3.
The steps described in this section are the standard way of installing programs from source code. However, not all program authors follow the same procedures. Be sure to review all the program documentation first.
Studying your configure options is the most important part. Some programs, like Apache, have dozens of compile-time options. For prudent basic security, you only want to compile in support for things you really need. This is most important on servers that are exposed to untrusted networks, such as web and mail servers.
Good reasons to compile programs from source are:
The bad part:
Some servers should be built from sources. For example, an Apache web server really needs to be source-built to get full customization and optimization.
For a desktop system, forget it. They're too big and complex. Use the nice package-based Linux distributions for these.
4.4.4 See Also
|< Day Day Up >|