🌐
GitHub
gist.github.com › egorsmkv › 30faa3e61c185a41e89cf849737d4d4b
Build git from source code on CentOS 7 · GitHub
Build git from source code on CentOS 7 · Raw · build-git.md · Currently, the latest version is 2.18.0. Download and extract it and go to the folder of the source code: wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz tar xf git-2.18.0.tar.gz cd git-2.18.0/ yum groupinstall 'Development Tools' yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-CPAN perl-devel ·
🌐
UbuntuPIT
ubuntupit.com › home › tutorials › how to install software from source code in your linux system
How to Install Software from Source Code in Your Linux System
October 23, 2024 - Use the following YUM command-line on your terminal to install Git on Fedora, CentOS, and Red Hat Linux. ... You can go to the Tag section and find the source codes of your desired software.
🌐
The Geek Stuff
thegeekstuff.com › 2012 › 06 › install-from-source
How to Compile and Install Software from Source Code on Linux
June 21, 2012 - The following articles are few examples on how to install a software from source code. How to Install Apache 2.4.2 from Source on CentOS 6.2 with SSL
🌐
It's FOSS
itsfoss.com › install-software-from-source-code
Install Software from Source Code in Linux [Beginner's Guide]
January 20, 2025 - [itsfoss@centos node]$ /opt/node/bin/node --version v8.1.1 · Success again! You may install software from the source because you need a very specific version not available in your distribution repository or because you want to modify the program to fix a bug or add a feature.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-compile-and-install-packages-from-source-using-make-on-a-vps
How To Compile and Install Packages From Source Using Make on a VPS | DigitalOcean
August 30, 2013 - In this example we will be compiling and installing curl from source. The basics used in this example applies to the majority of packages, and can be applied in most cases. To compile sources on Linux, you will need the package called "build-essential" on Debian-based systems and "Development Tools" on CentOS, as it contains the gcc/g++ compilers and libraries required to compile packages.
🌐
The Geek Stuff
thegeekstuff.com › 2015 › 02 › rpm-build-package-example
7 Steps to Build a RPM Package from Source on CentOS / RedHat
February 4, 2015 - In that situation, you can either compile the source code and install the application from source code, or build a RPM file from source code yourself, and use the RPM file to install the application.
🌐
Unixmen
unixmen.com › home › how to compile and install a linux software from source code
How to Compile and Install a Linux Software from Source Code | Unixmen
First download a tarball (a zipped file which contains the source code). You either download directly from the website or from the command.
🌐
Kifarunix
kifarunix.com › home › howtos › compile and install programs from source code in linux
Compile and Install Programs from Source Code in Linux - kifarunix.com
March 11, 2024 - If the above step completes with no errors, proceed to compile the software by running the make command, again within the source code directory. ... Any errors encountered during compilation are shown on the console. If the compilation step completes successfully, proceed to install it. Usually, the software compiled from source code will be installed at /usr/local and its subdirectories.
🌐
Meterpreter
meterpreter.org › home › linux › [centos] how to compile and install apache from source code
[CentOS] How to compile and install Apache from source code
January 18, 2020 - Compile and install tar -zxvf httpd-2.4.41.tar.gz cd httpd-2.4.41 ./configure –prefix=/usr/local/apache –enable-vhost-alias –enable-rewrite –enable-info make make install
Find elsewhere
🌐
LinkedIn
linkedin.com › learning › linux-package-management-for-centos › install-from-source-code
Install from source code - Linux Video Tutorial | LinkedIn Learning, formerly Lynda.com
A user can install software from source code they've downloaded from the Internet. In order to do this, they need the source code itself, development tools such as compilers and profilers, as well as additional source code. Compiling from source code can allow you more flexibility in that you ...
Published   June 1, 2017
🌐
UbuntuMint
ubuntumint.com › home › debian › how to install software from source in linux
How to Install Software from Source in Linux
August 25, 2023 - $ sudo apt install build-essential [On Debian, Ubuntu & Mint] $ sudo yum groupinstall "Development Tools" [On RHEL, CentOS & Fedora] $ sudo pacman -S base-devel [On Arch & Manjaro Linux] $ sudo zypper install -t pattern devel_C_C++ [On OpenSuse]
🌐
Black Sail Division
blacksaildivision.com › php-install-from-source
PHP - install from source - complete tutorial for CentOS
March 27, 2018 - sudo yum install autoconf libtool re2c bison libxml2-devel bzip2-devel libcurl-devel libpng-devel libicu-devel gcc-c++ libmcrypt-devel libwebp-devel libjpeg-devel openssl-devel -y · Next step is downloading PHP source code. Easiest option is to download it from GitHub PHP releases.
🌐
SysTutorials
systutorials.com › home › systutorials posts › building and installing linux kernel from the source code in an existing linux os
Building and Installing Linux Kernel from the Source Code in an Existing Linux OS - SysTutorials
November 1, 2020 - However, as Linux kernel itself has much less depended tools/packages compared to other software packages, it is quite easy to compile, build and install a Linux kernel from the source code in an existing Linux OS. Building Linux kernel is needed if you need to build a specific Linux kernel or update your drivers for a kernel by yourself. This post will go through the steps for compiling and installing Linux kernel. In this post, we will use the example of building kernel 4.10.1 on CentOS 7.
🌐
HowtoForge
howtoforge.com › home › how to build nginx from source on centos 7
How to Build Nginx from source on CentOS 7
The default build configuration depends on only 3 libraries to be installed: OpenSSL/LibreSSL/BoringSSL, Zlib and PCRE. ... NOTE: Nginx can also be compiled against LibreSSL and BoringSSL crypto libraries instead of OpenSSL. A server running CentOS 7 system. A non-root user with sudo privileges. ... Download latest mainline version of Nginx source code and extract it.
🌐
Unix Tutorial
unixtutorial.org › how-to-install-kernel-source-code-in-centos-redhat
How To: Install Kernel Source Code in CentOS/RedHat | Unix Tutorial
May 17, 2019 - From time to time it’s required to compile some Linux kernel specific software on your CentOS/RedHat Linux system. Most often it’s some kind of kernel module specific to a software that requires deep integration with your operating system. You need to install two packages: kernel sources from kernel-develop and header files from kernel-headers:
🌐
WafaiCloud
wafaicloud.com › home › system administrators › linux › installing software from source in linux for beginners
Installing Software from Source in Linux for Beginners - WafaiCloud Blogs
March 11, 2025 - Linux Distribution: Ensure you have a working Linux system (Ubuntu, Fedora, CentOS, etc.). Essential Tools: You’ll need gcc, make, and other development tools. Most distributions have a package for installing these. On Debian/Ubuntu-based distributions, you can install essential build tools using: ... You can usually find the source code on the official website of the software or its repository.
🌐
GitHub
gist.github.com › rizkhanriaz › 9e7d581eda271ecf4fba7dd2636fec9f
Compile Apache from source on Centos 7 · GitHub
Compile Apache from source on Centos 7. GitHub Gist: instantly share code, notes, and snippets.
Top answer
1 of 2
5

Which one should I (would you) choose?

Use RPMs and stick with RPMs. RPMs are far simpler to use then sourcecode, are easier to update and install security updates, and will will save you time in the long term. I can update all software on my CentOS box in about 5 minutes. It would take hours and hours, perhaps days, to do the same thing when compiling from source.

In addition, since you are new to Linux systems you will want your system to be in line with what the rest of the community uses, so that examples in documentation and forum posts will match what you have available on your local system. The documentation usually assumes that you installed software via RPM. If you have a hybrid system which is built from RPM, but then have a dozen programs installed from sourcecode, debugging will be more difficult and will require more knowledge and skill.

Compiling from source is more complicated and will require you to resolve dependency issues during the compilation. Before you can compile software, you will need to install dependencies such as header files, compilers on the system, and these are often installed via RPM anyways.

However, note that RHEL and CentOS generally stick with one major version of a product (e.g. CentOS5 provides an RPM for PHP 5.3, but will never provide an RPM for 5.4). Security fixes and some feature changes are 'backported' by RedHat into the current version.

Install from source if you want a particular version of the software which is not available from CentOS or if you want to customize the source code by yourself. For starters, try to avoid this.

For ImageMagick, install the RPM provided by CentOS. If it doesn't meet your needs, then research which version you need, and install it from source.

rpm -Uvh or use yum

Use yum, which is a wrapper around RPM (the RPM libraries) and does much of the work for you. Again, this will save you time.

RPM is used to install an RPM from a local file, which means you will need to find the RPM and download it and all of it's dependencies. Yum will perform dependency checking, and will download and install the RPM for you.

will the binaries automatically go to like /usr/bin

I prefer it when sourcecode puts the binaries in /usr/local/bin and not /usr/bin . /usr/bin is for software provided by the vendor, and /usr/local/bin should be reserved for locally compiled packages. If the sourcecode installs the binaries to /usr/bin , it means that those binaries may get accidentally replaced next time you run yum update --yes.

Also see https://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux

There are other Unix variants which compile all of the software from source, but those systems tend to have good methods and good tools to keep all of those source files organized. FreeBSD is a popular operating system where admins tend to compile software from source packages called 'Ports', and it is a great way to learn about OS and sourcecode.

2 of 2
2
  • I try to stick to the distribution packages as much as possible. It tends to be a more consistent approach to software management. If you find items that are not available as RPM packages, you can build your own RPM's from source tarballs.

  • If you choose RPM, using yum is a means of pulling software from a software repository and installing via RPM. RPM is the actual package manager framework.