How to install & compile Redis from source on Linux OS

Downloading the source files

The Redis source files are available on [this site's Download page]. You can verify the integrity of these downloads by checking them against the digests in the redis-hashes git repository.

To obtain the source files for the latest stable version of Redis from the Redis downloads site, run:

wget -N https://download.redis.io/redis-stable.tar.gz

Compiling Redis

To compile Redis, first, the tarball, change to the root directory, and then run make:

tar -xzvf redis-stable.tar.gz
cd redis-stable
make

If the compile succeeds, you'll find several Redis binaries in the src directory, including:

  • redis-server: the Redis Server itself
  • redis-cli is the command line interface utility to talk with Redis.

To install these binaries in /usr/local/bin, run:

make install

Starting and stopping Redis in the foreground

Once installed, you can start Redis by running

redis-server

If successful, you'll see the startup logs for Redis, and Redis will be running in the foreground.

To stop Redis, type Ctrl + C or, enter Ctrl-C.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to restrict direct root access in Linux

We can do it just in two steps. Step One: At first we will create new root user as follows (for...

How to extract .tar.gz files in Linux/UNIX OS

A tarball is a group of files that are bundled together using the tar command. Use the...

How to add welcome message when SSH start?

You need to change the contents of /etc/motd. Unfortunately, by default, /etc/motd is a link to...

How to change root password when SSH logged in

Run the following command: passwd Now type your new passwordOnce done, retype new passwordDone!...

How to install Pinguzo on any Linux/UNIX OS

Login to Pinguzo panel using Softaculous account or create an account of Pinguzo To add new...