π Redis intro
Abstract
Redis is a in-memory key-value pair cache storage that give you really fast read/writes. Many people use it to store login sessions.
Installation
sudo apt-get install redis-server
Basic commands
$ redis-server
$ redis-server --port 1234
$ redis-server /etc/redis/redis.conf
Start the redis server with redis.conf. Most likely you are changing ports away from 6379 or setting up a login password in the conf.
$ redis-cli
$ redis-cli -a password
use redis-cli to test connection
Misc
The default running port for redis is 6379. When you deploy redis you need to make sure you do the following things:
- bind redis to localhost
- firewall close 6379
- setup password for redis
- donβt run redis with root permission
Because read/write is so fast for redis that hackers can brush force guess 150,000 password per second to crack your redis. Because of some redis design properties hackers can hack redis and gain root access to your machine.
β
references:
20 Nov 2015