[root@localhost redis-4.0.2]# cd utils/
[root@localhost utils]# ./install_server.sh
查看启动的redis服务
[root@localhost utils]# chkconfig --list | grep redis
注意:该输出结果只显示 SysV 服务,并不包含原生 systemd 服务。SysV 配置数据可能被原生 systemd 配置覆盖。
如果您想列出 systemd 服务,请执行 'systemctl list-unit-files'。
欲查看对特定 target 启用的服务请执行
'systemctl list-dependencies [target]'。
redis_6379 0:关 1:关 2:开 3:开 4:开 5:开 6:关
查看服务
[root@localhost utils]# systemctl status redis_6379
[root@localhost utils]# ps -ef | grep redis
root 55926 37423 0 23:14 pts/2 00:00:01 redis-server 127.0.0.1:6379
root 63029 56077 0 23:32 pts/0 00:00:00 grep --color=auto redis
关闭服务
[root@localhost utils]# systemctl stop redis_6379
[root@localhost utils]# ps -ef | grep redis
root 55926 37423 0 23:14 pts/2 00:00:01 redis-server 127.0.0.1:6379
root 63135 56077 0 23:32 pts/0 00:00:00 grep --color=auto redis
启动服务
[root@localhost utils]# systemctl start redis_6379
[root@localhost utils]# ps -ef | grep redis