linux重启redis命令_如何重启redis

linux重启redis命令_如何重启redisredis已经加入到etc下也就是服务器启动redis也启动。突然发现连不上redis所以上来看看查看redis状态:systemctlstatusredis●redis.service-redis-serverLoaded:loaded(/usr/lib/systemd/system/redis.service;disabled;vendorpreset:disabled)Active:inactive(dead)发现没启动启动后再看看状态:systemctl

redis已经加入到etc下也就是服务器启动redis 也启动。突然发现连不上redis 所以上来看看

查看redis 状态:systemctl status redis
● redis.service - redis-server
Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: inactive (dead)

发现没启动

启动后再看看状态: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

重启redis:systemctl restart redis.service或者service redis restart

架构君码字不易,如需转载,请注明出处:https://javajgs.com/archives/165748
0
 

发表评论