Compiling Server Software From Source

One of the benefits of using Linux on a dedicated server is the ability to manage all software from a central, trusted software repository. Whenever new updates are published in the repository, you can usually update all of the installed software on your server with a single command.

For most situations, your software repository will be enough. In rare cases, you may need to add third-party repositories for hard-to-find software. In the most extreme circumstances, it may be necessary to compile software from source.

Software that is not very popular or is relatively new may not be available in your Linux distribution’s repository. They cannot include everything, so even very useful software that is simply not widely used may not make the cut. When that happens, you may be able to get binary files from the software’s creator, but in all likelihood, you will have to build the software from source code.

The build process itself is usually pretty easy. It may only involve three commands:
make install

The only time you will need to be concerned is when one of the commands produces an error. When that happens, you may be missing necessary dependencies. While your package manager will automatically install dependencies, compiling software from source means you have to find them yourself.

First, check that you have the development versions of the software you need installed (usually with the extension -dev or -devel). Next, make sure you have all of the required building software (i.e. gcc, automake, and so on). Finally, retry until it works. You may have to find additional software in your repository or even compile software depdencies before you can actually install the program you want.