[root@master redis-5.0.5]# cd bin/
[root@master bin]# ls
redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server
[root@master bin]# ./redis-server ../redis.conf
7089:C 31 Mar 2020 08:53:08.776 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7089:C 31 Mar 2020 08:53:08.776 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=7089, just started
7089:C 31 Mar 2020 08:53:08.776 # Configuration loaded
[root@master bin]# netstat -lnp | grep 6379
tcp 0 0 192.168.xxx.21:6379 0.0.0.0:* LISTEN 7090/./redis-server
6、客户端连接
[root@master bin]# ./redis-cli -h 192.168.xxx.21 -a 123456
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
192.168.xxx.21:6379> DBSIZE
(integer) 0
192.168.xxx.21:6379> select 31
OK
192.168.xxx.21:6379[31]> DBSIZE
(integer) 0
192.168.xxx.21:6379[31]> set aa AA
OK
192.168.xxx.21:6379[31]> get aa
"AA"
192.168.xxx.21:6379[31]>