Databases 7 min read

Installing Redis 6.2.4 on Linux with GCC 9 and Systemd Service

This guide walks through upgrading GCC, extracting and installing Redis 6.2.4 on a Linux server, configuring a systemd service, verifying the installation, and provides basic performance tuning tips such as adjusting max connections, memory settings, data compression, and clustering.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Installing Redis 6.2.4 on Linux with GCC 9 and Systemd Service

Click the blue “DevOps Architecture Practice” to follow me.

Share to “Moments”, and every morning at 08:06 I push practical content!

GCC needs to be upgraded to version 9.0 or higher.

gcc --version

gcc (GCC) 9.3.0

Copyright (C) 2019 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

tar -zxvf redis-6.2.4.tar.gz

ll

total 2408

drwxrwxr-x 7 root root 4096 Jun 1 22:03 redis-6.2.4

-rw-r--r-- 1 root root 2457940 Jun 15 16:03 redis-6.2.4.tar.gz

make -j2 && make install

The same version is already installed, so compilation is not needed; just copy the files to the target directories.

ll /usr/local/bin/redis-*

-rwxr-xr-x 1 root root 5768728 Jun 15 16:06 /usr/local/bin/redis-benchmark

lrwxrwxrwx 1 root root 12 Jun 15 16:06 /usr/local/bin/redis-check-aof -> redis-server

lrwxrwxrwx 1 root root 12 Jun 15 16:06 /usr/local/bin/redis-check-rdb -> redis-server

-rwxr-xr-x 1 root root 5989512 Jun 15 16:06 /usr/local/bin/redis-cli

lrwxrwxrwx 1 root root 12 Jun 15 16:06 /usr/local/bin/redis-sentinel -> redis-server

-rwxr-xr-x 1 root root 11119768 Jun 15 16:06 /usr/local/bin/redis-server

redis-server --version

Redis server v=6.2.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=b60f19d9346e4f3b

mkdir -p /usr/local/redis

mkdir -p /data/redis

cd src/

cp ./redis-server /usr/local/redis/

cp ./redis-cli /usr/local/redis/

cp ../redis.conf /usr/local/redis/

Show the systemd unit file for redis-server:

[Unit]

Description=The redis-server Process Manager

After=syslog.target network.target

[Service]

Type=simple

PIDFile=/data/redis/redis.pid

ExecStart=/usr/local/redis/redis-server /usr/local/redis/redis.conf

ExecReload=/bin/kill -USR2 $MAINPID

ExecStop=/bin/kill -SIGINT $MAINPID

[Install]

WantedBy=multi-user.target

systemctl daemon-reload

systemctl start redis-server

Verify installed files:

ll

total 16

-rw-r--r-- 1 root root 92 Jun 15 17:38 dump.rdb

-rw-r--r-- 1 root root 5909 Jun 15 17:38 redis.log

-rw-r--r-- 1 root root 6 Jun 15 17:38 redis.pid

Check Redis configuration:

redis

127.0.0.1:6379> CONFIG GET maxclients

1) "maxclients"

2) "10000"

Performance tuning suggestions:

1. Adjust the system's maximum number of connections.

2. Optimize memory settings.

3. Compress data before storing it in Redis.

4. Deploy multiple clusters for distributed scaling.

----------------------end---------------------

Docker volume for data persistence

Dockerfile writing recommendations

Dockerfile best practices

Redis basic commands – practical guide

Redis data type string – basic commands

DatabaseredisPerformance Tuninglinuxinstallationgccsystemd
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

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.