Rizwan Mansuri's Blog
Python, Django & Linux

Install and Configure Redis on Ubuntu 17.04

If you face any problem with setup and config Redis on Ubuntu, this tutorial will help you getting up and running without any trouble.

This tutorial is for Ubuntu/Debian-based distros only.

Step-by-step Guide

Redis server is supported on Ubuntu 17.04 with pre-built release, so you don’t have to build Redis from source anymore.

Let’s get started by quickly issuing the pretty familiar command,

$ sudo apt-get update && sudo apt-get install redis-server -y

You might want to omit the -y option in order to examine what packages will be installed on your machine.

That’s all done for installation. Next step is to config the server.

If you want to start Redis manually, this command comes handy for quick testing.

$ redis-server &

But for production, you might not want to do like above. Redis is installed as a service so you can activate Redis through service command:

$ service redis-server start

Okay that works! Furthermore, to automatically restart Redis server on system reboot, you will need to update the system daemon config:

$ update-rc.d redis-server enable

$ update-rc.d redis-server defaults

Additional tip: Redis, by default, binds itself to, if you want to change the address, just update the “bind” key in the config file “/etc/redis/redis.conf”


That’s all to it!