# cd /usr/local/bin/
# /usr/local/bin/redis-server /etc/redis.conf
# ps -ef |grep redis
root 741 1 0 17:23 ? 00:00:17 /usr/local/bin/redis-server *:6379
# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 741/redis-server *:
tcp6 0 0 :::6379 :::* LISTEN 741/redis-server *:
7.测试redis
# redis-cli -h 192.168.0.168 -a 'T@S99ss:)'
Warning: Using a password with '-a' option on the command line interface may not be safe.
192.168.0.168:6379> set tony 12345
OK
192.168.0.168:6379> get tony
"12345"
192.168.0.168:6379> del tony
(integer) 1
192.168.0.168:6379>