Operations 17 min read

Master CentOS Software Installation: From Source Tarballs to RPM and Yum

This guide walks you through installing software on CentOS using three primary methods—source/tarball compilation, RPM packages, and Yum—demonstrating each approach with real‑world examples such as Redis, RabbitMQ, and Nginx, and covering essential concepts, commands, and configuration steps.

Raymond Ops
Raymond Ops
Raymond Ops
Master CentOS Software Installation: From Source Tarballs to RPM and Yum

Preface

We target CentOS systems. CentOS software management includes three main methods: source/tarball, RPM, and Yum.

During the explanation of each installation method, we will install example software commonly used in development: source installation of Redis, RPM installation of RabbitMQ, and Yum installation of Nginx.

Key terms for source and tarball installation

Before installing, define a few terms that developers should already know.

Open source : source code written in a programming language, not directly executable by the system.

Compilation : translating source code into machine‑readable language.

gcc : the standard C compiler on Linux, maintained by the GNU project.

Executable file: the binary produced after compilation that the machine can run.

Function library: reusable code packaged as either a dynamic library (

.so

) or a static library (

.a

). Dynamic libraries are linked at runtime, while static libraries are merged into the executable at build time.

Diagram of the gcc compilation process.

Compilation diagram
Compilation diagram

Tarball: a compressed archive that usually contains the source code, a configure script, and documentation such as README or INSTALL files.

Tarball installation of Redis – practical steps

Basic steps:

Download the source tarball to

/usr/local/src

and extract it.

Read the

install

and

README

files for instructions.

Install any required dependencies.

Run

./configure

to generate a Makefile.

Run

make clean

(optional, removes previous build artifacts).

Run

make

to compile the source.

Run

make install

to install the binaries to the target location.

Common commands explained:

./configure

: creates a Makefile based on the current system environment.

make clean

: removes old object files to ensure a fresh build.

make

: compiles the source into object files and links them.

make install

: copies the compiled binaries to their final locations.

Compilation flow diagram.

Compilation flow
Compilation flow

Redis installation screenshots (download, extract, compile, configure, start, verify).

Redis download
Redis download
Redis extraction
Redis extraction
Redis compilation
Redis compilation
Redis configuration
Redis configuration
Redis configuration 2
Redis configuration 2
Redis start
Redis start
Redis verification
Redis verification

RPM and SRPM basics

RPM (RedHat Package Manager) stores software in a package that records dependencies, version, and required configuration. Installing an RPM is fast but the target system must match the environment used to build the package.

Dependencies are similar to needing .NET for MSSQL or Erlang for RabbitMQ.

Difference between RPM and SRPM illustrated.

RPM vs SRPM
RPM vs SRPM

RPM package naming convention diagram.

RPM naming
RPM naming

Typical RPM install command:

<code># rpm -ivh package_name</code>

Options:

-i

– install.

-v

– verbose output.

-h

– show installation progress.

Installing RabbitMQ via RPM

RabbitMQ depends on Erlang, so we first install Erlang using a third‑party Yum repository.

<code># yum install epel-release</code>
<code># yum install unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-gl</code>

Install Erlang RPM (example shows a dependency error that is resolved by the previous step) and then install the RabbitMQ RPM.

<code># rpm -ivh esl-erlang_19.2~centos~7_amd64.rpm</code>
<code># rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch.rpm</code>

Start and stop RabbitMQ:

./rabbitmq-server

– start.

./rabbitmq-server -detached

– run in background.

./rabbitmqctl stop

– stop.

Open required firewall ports (15672, 25672, 5672, 4369, 5671) in

/etc/sysconfig/iptables

:

<code># vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 15672 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25672 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5672 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 4369 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5671 -j ACCEPT</code>

Enable the management plugin (run once):

<code># ./rabbitmq-plugins enable rabbitmq_management</code>

Access the management UI at

http://<server_ip>:15672

(default guest user may need to be changed).

Yum installation details

Yum simplifies dependency resolution. Example to install Nginx:

<code># yum install nginx</code>

Yum repository configuration files are located in

/etc/yum.conf

and the directory

/etc/yum.repos.d/

.

<code># ll /etc | grep yum
-rw-r--r--. 1 root root 970 11月 15 23:30 yum.conf
-rwxr-xr-x. 2 root root 4096 2月 7 20:10 yum.repos.d</code>
RedisRabbitMQNginxCentOSrpmsoftware installationyum
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.