What is Redis?
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”.
Install Redis 3.2 on Ubuntu
It’s very easy to install Redis 3 on Ubuntu 16, just need to add PPA repository to your OS:
add-apt-repository ppa:chris-lea/redis-server
Now you have to update your repositories list and install Redis:
apt-get update
apt-get install redis-server
You can see your Redis version by typing:
redis-server --version
Start and check your Redis server status with the following commands:
systemctl start redis-server
systemctl status redis-server.service
For testing your Redis server you can follow the instruction below:
redis-cli
> set test "HugeServer"
> get test
The answer should be “HugeServer”
Install Redis 3.2 on Debian 8
For installing Redis 3.2 you have to add Dotdeb repository to your OS:
You should open your repository list with a text editor, we are going to use “Nano”
nano /etc/apt/sources.list
Add the following two lines at the end of your file:
deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all
Now you have to fetch and install GnuPG key:
wget https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
Update your repository list and install Redis server:
apt-get update
apt-get install redis-server
Check your Redis Version:
redis-server --version
Start and check your Redis service status:
systemctl start redis-server
systemctl status redis-server
You can test your Redis service with the instruction below:
redis-cli
> set test "HugeServer"
> get test
The answer should be “HugeServer”
If you need a control panel for your Redis Server you may use Phpredmin or Redmon.
You can find out more about Redis on its official website!