Introduction:
Redis has been added to etc. At this time, the server starts redis and starts it, but it cannot connect to redis. All the following processes are followed.
(Learning video sharing: redis video tutorial)
View redis status: systemctl status redis
● redis.service - redis-server
Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Found that it was not started.
Check the status after starting: systemctl start redis
[root@VM_0_2_centos /]# systemctl status redis
● redis.service - redis-server
Loaded: loaded (/usr/ lib/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2019-03-21 08:58:08 CST; 5s ago
Process: 26556 ExecStart= /usr/local/bin/redis-server /usr/local/yangsx/redis/redis-3.0.0/redis.conf (code=exited, status=0/SUCCESS)
Main PID: 26557 (redis-server )
CGroup: /system.slice/redis.service
└─26557 /usr/local/bin/redis-server *:6379
Restart redis: systemctl restart redis.service
Related recommendations: redis database tutorial
The above is the detailed content of How to restart redis under linux. For more information, please follow other related articles on the PHP Chinese website!