redis 启动服务端和客户端

时间:2021-08-12 16:49:16

一、redis启动服务端指令
我的启动文件是放在/usr/local/bin目录下面;配置文件存放在/etc/redis/redis.conf

-rw-r--r--. 1 root root     186 Dec 17 09:36 appendonly.aof
-rw-r--r--. 1 root root 76 Dec 26 02:36 dump.rdb
-rwxr-xr-x. 1 root root 5578215 Dec 15 12:36 redis-benchmark
-rwxr-xr-x. 1 root root 22169 Dec 15 12:36 redis-check-aof
-rwxr-xr-x. 1 root root 7824270 Dec 15 12:36 redis-check-rdb
-rwxr-xr-x. 1 root root 5706924 Dec 15 12:36 redis-cli
lrwxrwxrwx. 1 root root 12 Dec 15 12:36 redis-sentinel -> redis-server
-rwxr-xr-x. 1 root root 7824270 Dec 15 12:36 redis-server
[root@hadoop bin]# pwd
/usr/local/bin

启动服务器端:
redis-server /etc/redis/redis.conf —>启动服务
redis-cli -p 6379 —->开启客户端