Download the latest Redis version from https://redis.io/download. Unzip the tar.gz file, enter the redis directory, and compile Redis using the make command, as follows:
cd redis-4.0.9make
After installing it, use the following shell command to initialize the Redis server:
src/redis-server
You should see an output that ends with the following lines:
# Server initialized* Ready to accept connections
By default, Redis runs on port 6379. You can specify a custom port using the --port flag, for example, redis-server --port 6655.
Keep the Redis server running and open another shell. Start the Redis client with the following command:
src/redis-cli
You will see the Redis client shell prompt like this:
127.0.0.1:6379>
The Redis client ...