Compiling and Installing Redis
This section describes how to install Redis 6.0.20 by compiling the source code. You can also refer to this section for other Redis versions.
- Download the Redis source package.
http://download.redis.io/releases/redis-6.0.20.tar.gz
If the server is connected to the Internet, run the wget command to download the Redis source code.
cd /home wget http://download.redis.io/releases/redis-6.0.20.tar.gz --no-check-certificate
- Upload the package to the /home directory on the server and decompress it.
cd /home tar -zxvf redis-6.0.20.tar.gz
- Compile Redis.
cd /home/redis-6.0.20 make -j
- Install Redis.
- Install Redis in the default path /usr/local/bin.
make install
- Or, install it in a specified directory, for example, /usr/local/redis-6.0.20.
make PREFIX=/usr/local/redis-6.0.20 install
- Install Redis in the default path /usr/local/bin.
- Check that the installed Redis version is the expected one.
redis-server -v

Parent topic: Porting Guide