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

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐