Installation
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
make install
You can edit redis configuration by edit etc/redis/redis.conf file.
Execute and test Redis
- Execute redis server
$ redis-server
-
Test redis server
$ redis-cli ping
PONG
Work with redis in CLI
- Execute redis-cli
Add Key Value
SET key value
Get Value
GET key
Return : Value
Get list of all keys
key *
Get list of all values of All Keys
- Get list with radis-cli
echo 'keys YOURKEY*' | redis-cli | sed 's/^/get /' | redis-cli
- Get list with redis database dumper
rdd -v
Start, Stop and Restart Redis
/etc/init.d/redis-server restart
/etc/init.d/redis-server stop
/etc/init.d/redis-server start
Data Storage Type
With restart redis server, stored data will be accessibale
Reserved TCP Ports
Default Port | Description |
---|---|
6379 | Port for connecting to redis server |