Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Install Redis on your Production Ubuntu

Install deps

sudo apt-get update
sudo apt-get install -y build-essential tcl8.5

Get code



tar xzf redis-stable.tar.gz
cd redis-stable

Build from source


make test

sudo make install

Setup deamon

cd utils
sudo ./ # Choose 6392 port
sudo nano /etc/redis/6392.conf 
  # use Apple+W to search in nano
  dir /var/redis/6392 (very important step!)
  # logfile /var/log/redis_6392.log
  maxclients 10000
  maxmemory 500mb
  maxmemory-policy noeviction

Make sure log is accesable

sudo chmod 777 /var/log/redis_6392.log

Make sure the data folder exists and is available

sudo mkdir -p /var/redis/6392
sudo chmod 777 -R /var/redis/6392/

Restart service

sudo service redis_6392 stop
sudo service redis_6392 start


redis-cli -p 6392
> ping

Make sure there is a


App setup

Since this redis is local, access it via
Or just set in redis.yml

  redis: redis://localhost:6392/
  redis: redis://localhost:6392/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment