Link command
1. Do not specify a port link: redis-cli-h IP (default 6379 port)
2. Specify port Link: redis-cli-h ip-p 26379 (Redis server is open to port 26379)
3. Specify the port and password: redis-cli-h ip-p 26379-a xxxxxxxxxxxxx (the Redis server is open to Port 26379, and the Redis server is set with a password)-A for the Redis password
Start, close, restart command
Redis starts differently depending on how it is installed
Compiling the installation
Start command:./redis-server path (path means the configuration file path for Redis, default configuration if no path is used)
Close command: redis-cli-h ip-p port shutdown, you can also find the process number of the Redis (ps-a| grep redis-server), then kill the process (kill-9 ProcessID)
YUM/APT Installation
Start/restart command:/etc/init.d/redis-server start/restart
Close command:/etc/init.d/redis-server stop
Redis-related commands