Quantcast
Viewing all articles
Browse latest Browse all 1124

Redis

Training here http://try.redis.io/
To install:

yum install redis
vi /etc/redis.conf
comment out the "bind 127.0.0.1" line
/usr/sbin/redis-server /etc/redis.conf

ps -ef | grep redis
root 4092 1 0 21:27 ? 00:00:00 /usr/sbin/redis-server /etc/redis.conf


/usr/bin/redis-cli ping
PONG

netstat -an | grep 6379

tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN


if in /etc/redis.conf you specify a "bind IP" (IP=10.0.2.159 then you have to use the -h option:
/usr/bin/redis-cli -h 10.0.2.15 shutdown

you can issue several commands:
set key value
get key
incr key


Viewing all articles
Browse latest Browse all 1124

Trending Articles