Connecting to 192.168.159.12:22...start or systemd method based on
Connection established. UPSTART_JOB or NOTIFY_SOCKET environment variables
To escape to local shell, press 'Ctrl+Alt+]'. "process is ready."
# They do not enable continuous liveness pings back to your supervisor.
Last login: Tue Mar 10 14:43:20 2020
[root@centos7002 ~]# ps -ef|grep redis
root 29747 29479 0 09:37 pts/0 00:00:00 grep --color=auto redis
[root@centos7002 ~]# redis-server /myredis/redis.conf
29762:C 11 Mar 2020 09:38:56.746 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
29762:C 11 Mar 2020 09:38:56.746 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=29762, just started
29762:C 11 Mar 2020 09:38:56.746 # Configuration loaded
[root@centos7002 ~]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set key1 hello
OK
127.0.0.1:6379> get key1
"hello"
127.0.0.1:6379> exit
[root@centos7002 ~]# ps -ef|grep redis
root 29763 1 0 09:38 ? 00:00:00 redis-server 127.0.0.1:6379
root 29815 29479 0 09:43 pts/0 00:00:00 grep --color=auto redis
[root@centos7002 ~]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> shutdown
not connected> exit
[root@centos7002 ~]# redis-server /myredis/redis.conf
30558:C 11 Mar 2020 11:00:26.733 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
30558:C 11 Mar 2020 11:00:26.733 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=30558, just started
30558:C 11 Mar 2020 11:00:26.733 # Configuration loaded
[root@centos7002 ~]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> shutdown
not connected> exit
[root@centos7002 ~]# cd /usr/local/bin
[root@centos7002 bin]# ls -l
总用量 32736
-rwxr-xr-x 1 root root 4366608 3月 10 14:20 redis-benchmark
-rwxr-xr-x 1 root root 8111816 3月 10 14:20 redis-check-aof
-rwxr-xr-x 1 root root 8111816 3月 10 14:20 redis-check-rdb
-rwxr-xr-x 1 root root 4806832 3月 10 14:20 redis-cli
lrwxrwxrwx 1 root root 12 3月 10 14:20 redis-sentinel -> redis-server
-rwxr-xr-x 1 root root 8111816 3月 10 14:20 redis-server
[root@centos7002 bin]# redis-benchmark
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
Writing to socket: Connection refused
All clients disconnected... aborting.
[root@centos7002 bin]# redis-server /myredis/redis.conf
31357:C 11 Mar 2020 12:24:46.213 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
31357:C 11 Mar 2020 12:24:46.213 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=31357, just started
31357:C 11 Mar 2020 12:24:46.213 # Configuration loaded
[root@centos7002 bin]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> shutdown [NOSAVE|SAVE]
Socket error Event: 32 Error: 10053.
Connection closing...Socket close.
Connection closed by foreign host.
Disconnected from remote host(CentOS02) at 22:03:05.
Type `help' to learn how to use Xshell prompt.
[C:\~]$
Connecting to 192.168.159.12:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Last login: Wed Mar 11 12:25:22 2020 from 192.168.159.1
[root@centos7002 ~]# cd /usr/local/bin/
[root@centos7002 bin]# ls -l
总用量 32744
-rw-r--r-- 1 root root 7448 3月 11 12:28 dump.rdb
-rwxr-xr-x 1 root root 4366608 3月 10 14:20 redis-benchmark
-rwxr-xr-x 1 root root 8111816 3月 10 14:20 redis-check-aof
-rwxr-xr-x 1 root root 8111816 3月 10 14:20 redis-check-rdb
-rwxr-xr-x 1 root root 4806832 3月 10 14:20 redis-cli
lrwxrwxrwx 1 root root 12 3月 10 14:20 redis-sentinel -> redis-server
-rwxr-xr-x 1 root root 8111816 3月 10 14:20 redis-server
[root@centos7002 bin]# pwd
/usr/local/bin
[root@centos7002 bin]# redis-server /myredis/redis.conf
4869:C 12 Mar 2020 11:52:27.044 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4869:C 12 Mar 2020 11:52:27.044 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=4869, just started
4869:C 12 Mar 2020 11:52:27.044 # Configuration loaded
[root@centos7002 bin]# ping
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]
[-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
[-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
[-w deadline] [-W timeout] [hop1 ...] destination
Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
[-l preload] [-m mark] [-M pmtudisc_option]
[-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
[-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
[-W timeout] destination
[root@centos7002 bin]# redis-cli -p 6379
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> get key1
(nil)
127.0.0.1:6379> select 7
OK
127.0.0.1:6379[7]> get k1
(nil)
127.0.0.1:6379[7]> select 0
OK
127.0.0.1:6379> get key1
(nil)
127.0.0.1:6379> select 1
OK
127.0.0.1:6379[1]> get key1
(nil)
127.0.0.1:6379[1]> Dbsize
(integer) 0
127.0.0.1:6379[1]> DBsize
(integer) 0
127.0.0.1:6379[1]>
127.0.0.1:6379[1]> dbsize
(integer) 0
127.0.0.1:6379[1]> set k1 hello
OK
127.0.0.1:6379[1]> get k1
"hello"
127.0.0.1:6379[1]> dbsize
(integer) 1
127.0.0.1:6379[1]> keys *
1) "k1"
127.0.0.1:6379[1]> shutdown
not connected> exit
[root@centos7002 bin]# redis-cli 6379
Could not connect to Redis at 127.0.0.1:6379: Connection refused
[root@centos7002 bin]# redis-server /myredis/redis.conf
5139:C 12 Mar 2020 12:07:32.701 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5139:C 12 Mar 2020 12:07:32.702 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=5139, just started
5139:C 12 Mar 2020 12:07:32.702 # Configuration loaded
[root@centos7002 bin]# redis-cli 6379
(error) ERR unknown command `6379`, with args beginning with:
[root@centos7002 bin]# redis-cli -p 6379
127.0.0.1:6379> dbsize
(integer) 4
127.0.0.1:6379> shutdown
not connected> exit
[root@centos7002 bin]# redis-cli -p 6379
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected> keys *
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected> exit
[root@centos7002 bin]# redis-server /myredis/redis.conf
5185:C 12 Mar 2020 12:11:31.029 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5185:C 12 Mar 2020 12:11:31.030 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=5185, just started
5185:C 12 Mar 2020 12:11:31.030 # Configuration loaded
[root@centos7002 bin]# redis-cli -p 6379
127.0.0.1:6379> keys *
1) "myset:__rand_int__"
2) "counter:__rand_int__"
3) "mylist"
4) "key:__rand_int__"
127.0.0.1:6379> dbsize
(integer) 4
127.0.0.1:6379> keys k?
(empty list or set)
127.0.0.1:6379> keys k?
(empty list or set)
127.0.0.1:6379> dbsize
(integer) 4
127.0.0.1:6379> set k1 hello
OK
127.0.0.1:6379> keys k?
1) "k1"
127.0.0.1:6379> keys *
1) "myset:__rand_int__"
2) "key:__rand_int__"
3) "mylist"
4) "counter:__rand_int__"
5) "k1"
127.0.0.1:6379> set k2 v2
OK
127.0.0.1:6379> keys *
1) "myset:__rand_int__"
2) "k2"
3) "key:__rand_int__"
4) "mylist"
5) "counter:__rand_int__"
6) "k1"
127.0.0.1:6379> flusdb
(error) ERR unknown command `flusdb`, with args beginning with:
127.0.0.1:6379> flushdb
OK
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> set k1 v1
OK
127.0.0.1:6379> set k2 v2
OK
127.0.0.1:6379> set k3 v3
OK
127.0.0.1:6379> select k1
(error) ERR invalid DB index
127.0.0.1:6379> select 1
OK
127.0.0.1:6379[1]> set class 1122
OK
127.0.0.1:6379[1]> set k3 v333
OK
127.0.0.1:6379[1]> keys *
1) "class"
2) "k1"
3) "k3"
127.0.0.1:6379[1]> select 0
OK
127.0.0.1:6379> shutdown
not connected> exit
--------------------------------------------------------------------------------------------------------
Connecting to 192.168.159.12:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Last login: Thu Mar 12 11:54:15 2020 from 192.168.159.1
[root@centos7002 ~]# redis-server /myredis/redis.conf
11751:C 20 Mar 2020 18:05:20.878 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
11751:C 20 Mar 2020 18:05:20.878 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=11751, just started
11751:C 20 Mar 2020 18:05:20.878 # Configuration loaded
[root@centos7002 ~]# redis-cli -p 6379
127.0.0.1:6379> set k1 v1
OK
127.0.0.1:6379> set k2 v2
OK
127.0.0.1:6379> set k3 v3
OK
127.0.0.1:6379> exists k1
(integer) 1
127.0.0.1:6379> EXISTS k11
(integer) 0
127.0.0.1:6379> keys *
1) "mylist"
2) "key1"
3) "k3"
4) "k1"
5) "key:__rand_int__"
6) "k2"
7) "counter:__rand_int__"
8) "myset:__rand_int__"
127.0.0.1:6379> move k3 2
(integer) 1
127.0.0.1:6379> keys *
1) "mylist"
2) "key1"
3) "k1"
4) "key:__rand_int__"
5) "k2"
6) "counter:__rand_int__"
7) "myset:__rand_int__"
127.0.0.1:6379> select 2
OK
127.0.0.1:6379[2]> get k3
"v3"
127.0.0.1:6379[2]> keys *
1) "k3"
127.0.0.1:6379[2]> DBSIZE
(integer) 1
127.0.0.1:6379[2]> select 0
OK
127.0.0.1:6379> keys *
1) "mylist"
2) "key1"
3) "k1"
4) "key:__rand_int__"
5) "k2"
6) "counter:__rand_int__"
7) "myset:__rand_int__"
127.0.0.1:6379> ttl k1
(integer) -1
127.0.0.1:6379> EXPIRE k2 10
(integer) 1
127.0.0.1:6379> ttl k2
(integer) 3
127.0.0.1:6379> ttl k2
(integer) -2
127.0.0.1:6379> get k2
(nil)
127.0.0.1:6379> keys *
1) "mylist"
2) "key1"
3) "k1"
4) "key:__rand_int__"
5) "counter:__rand_int__"
6) "myset:__rand_int__"
127.0.0.1:6379> get k1
"v1"
127.0.0.1:6379> set k1 vi
OK
127.0.0.1:6379> get k1
"vi"
127.0.0.1:6379> type k1
string
127.0.0.1:6379> keys *
1) "mylist"
2) "key1"
3) "k1"
4) "key:__rand_int__"
5) "counter:__rand_int__"
6) "myset:__rand_int__"
127.0.0.1:6379> 1push mylist 1 2 3 4 5
(error) ERR unknown command `1push`, with args beginning with: `mylist`, `1`, `2`, `3`, `4`, `5`,
127.0.0.1:6379> lpush mylist 1 2 3 4 5
(integer) 100005
127.0.0.1:6379> MOVE mylist 2
(integer) 1
127.0.0.1:6379> keys *
1) "key1"
2) "k1"
3) "key:__rand_int__"
4) "counter:__rand_int__"
5) "myset:__rand_int__"
127.0.0.1:6379> lpush mylist 1 2 3 4 5
(integer) 5
127.0.0.1:6379> lrange mylist
(error) ERR wrong number of arguments for 'lrange' command
127.0.0.1:6379> lrange mylist 0 -1
1) "5"
2) "4"
3) "3"
4) "2"
5) "1"
127.0.0.1:6379> type mylist
list