linux 重启redis 命令

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

你可能感兴趣的:(java,java,后端)