If redis is installed using apt-get or yum install, you can directly stop/start/restart redis through the following commands
/etc/init.d/redis-server stop /etc/init.d/redis-server start /etc/init.d/redis-server restart
If it is installed through source code redis, you can restart redis through the shutdown command of the redis client program redis-cli
1.redis shutdown
redis-cli -h 127.0.0.1 -p 6379 shutdown
2.redis startup
redis-server
If none of the above methods successfully stop redis, you can use the ultimate weapon kill -9
For more Redis related knowledge, please visit the Redis usage tutorial column!
The above is the detailed content of How to restart the redis process. For more information, please follow other related articles on the PHP Chinese website!