启动redis的后台服务

本文详细介绍如何在Linux环境下使用chkconfig、systemctl等命令管理Redis服务,包括安装、启动、停止及状态检查等操作流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

[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
 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值