Introduction
Redis is a flexible open-source, key value data store, used as a database, cache and message broker. Redis allows the user to store vast amounts of data without the limits of a relational database.
In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while or by appending each command to a log. Persistence can be optionally disabled if you just need a feature-rich, networked, in-memory cache.
We are assuming that you have root permission, otherwise, you may start commands with “sudo”.
Note: Redis 4 is not stable yet so if you know what are you doing put your gloves on.
Requirments
As you might guess we have to install Redis 4 from source so we have to install some dependencies first:
For CentOS
yum groupinstall 'Development Tools'
yum install tcl wget
For Debian and Ubuntu
apt-get install build-essential
apt-get install tcl wget
Download and Compile Redis 4
You can easily download the Redis 4 source with the command below:
wget https://codeload.github.com/antirez/redis/tar.gz/4.0-rc3
Extract the file you just downloaded with the command below:
tar xvzf 4.0-rc3
Enter the Redis directory:
cd redis-4.0-rc3/
Run the command below before start compiling:
make distclean
Now we can start compiling:
make
make test
If everything was ok, run the following command:
make install
Install your Redis-server Service:
cd utils
./install_server.sh
Now you can start and test your Redis service.
systemctl start redis_6379
systemctl status redis_6379
For testing your Redis-server you can follow the below instructions:
redis-cli
> set test 'HugeServer'
> get test
You should get “HugeServer” as output, if you get it then you can be sure that your Redis is working properly.
Check out Redis official website for more information and news!
FYI – RC3 is already out: https://www.reddit.com/r/redis/comments/66vkli/redis_40_rc3_is_out/
Thank you, The article is now updated!
Does apt-get support install redis 4 now?
I see the official wesbiste said Redis 4.0.9 is the latest stable version now.