Master Installing Redis, RabbitMQ, and Nginx on CentOS: Source, RPM, and YUM
This guide walks you through installing common backend services on CentOS—building Redis from source, deploying RabbitMQ via RPM, and adding Nginx with YUM—while explaining key concepts like tarballs, RPM metadata, and YUM repository configuration.
Preface
We target CentOS systems and discuss three main software management methods: source/tarball, RPM, and YUM.
Examples include installing Redis from source, installing RabbitMQ via RPM, and installing Nginx via YUM.
Key Terms for Installing Software via Source and Tarball
Open source refers to program code written in a programming language that cannot be directly executed by the system. Compilation translates this code into machine‑readable binaries.
GCC is the standard C compiler on Linux, maintained by the GNU project.
Executable files are binary programs produced by the compiler. Function libraries provide reusable code; dynamic libraries end with .so and are linked at runtime, while static libraries end with .a and are merged into the executable.
Tarball
A tarball is a compressed archive of source code, configuration scripts (e.g., configure), and documentation (README, INSTALL) distributed by developers.
Redis Installation via Tarball
Basic steps:
Download the source tarball to /usr/local/src and extract it.
Read INSTALL and README for prerequisites.
Install required dependencies.
Run ./configure to generate a Makefile.
Compile with make.
Install with make install.
Common commands: ./configure – creates Makefile after checking the environment. make clean – removes previous build artifacts. make – compiles source files using GCC. make install – copies binaries to target directories.
Images illustrate each step:
Basic Understanding of RPM and SRPM
RPM (RedHat Package Manager) stores software in a database‑style package that includes metadata about dependencies, required configuration, and version.
SRPM (Source RPM) contains the original source code and spec file used to build the binary RPM.
RPM naming convention diagram:
Installation syntax: # rpm -ivh package_name.rpm Options: -i – install -v – verbose output -h – show progress bar
Upgrade, query, verification, and rebuild database commands are also covered with illustrative images.
Practical RPM Installation of RabbitMQ
First install the Erlang runtime, which RabbitMQ depends on.
# wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.2~centos~7_amd64.rpmResolve missing dependencies by installing additional libraries via YUM:
# yum install epel-release # yum install unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-glInstall Erlang: # rpm -ivh esl-erlang_19.2~centos~7_amd64.rpm Install RabbitMQ:
# rpm -ivh rabbitmq-server-3.6.6-1.el7.noarch.rpmStart and stop the service:
Run ./rabbitmq-server to start.
Run ./rabbitmq-server -detached for background.
Run ./rabbitmqctl stop to stop.
Open firewall ports by editing /etc/sysconfig/iptables:
-A INPUT -p tcp --dport 15672 -j ACCEPT
-A INPUT -p tcp --dport 25672 -j ACCEPT
-A INPUT -p tcp --dport 5672 -j ACCEPT
-A INPUT -p tcp --dport 4369 -j ACCEPT
-A INPUT -p tcp --dport 5671 -j ACCEPTEnable the management plugin: # ./rabbitmq-plugins enable rabbitmq_management Access the management UI at http://<em>server_ip</em>:15672 (default guest user).
Detailed YUM Software Installation
YUM simplifies package installation and dependency resolution. Example installing Nginx: # yum install nginx YUM repository configuration files reside in /etc/yum.repos.d. Further customization can be explored online.
Original source: https://www.cnblogs.com/knowledgesea/p/6291085.html
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
