start Redis service src/redis-server or Src/redis-server redis.conf
Src/redis-server redis.conf 1>log.log 2>errlog.log
1 is the standard output and 2 is the error output
randomly start vi/etc/rc.local with Redis as a Linux service , adding code:
/root/install/redis-2.4.9/src/redis-server
Client Connection SRC/REDIS-CLI
Stop Redis service: src/redis-cli shutdown
Additions and deletions to check:
keys * Remove all keys that are currently matched
> exists Larry (integer) 0
Whether the current key exists
del lv Delete current key
expire Setting the expiration time
> Expire Larry (Integer) 1
> Move Larry Ad4 (integer) 1
Move Larry Key value pair to AD4 database
> Persist LV (integer) 1 Remove the expiration time of the current key
Randomkey
Randomly returns a key
Rename Rename key
Type the data type of the return value
Type Testlist List
> ping PONG
Test whether the connection is still
>echo Name
"Larry"
Print
> Select Ad4databank OK Database switchover
> quit the connection
> Dbsize (integer) 12
Number of keys in the current database
> Info Server basic information
Monitor
Real-time dumping of received requests
config get gets the parameter configuration of the server
flushdb emptying the current database
flushall clearing all databases
Redis Common Commands