redis做成service来start和stop
来源:互联网 发布:java教材推荐 编辑:程序博客网 时间:2024/05/03 15:37
最近在linux服务器上安装redis,启动redis测试个东东,后来发现设置成服务来启动,停止更加方便,于是便整理了一下。
首先得有redis的服务文件已经对应的conf文件,名称分别为redis和redis.conf(如果是启动6380端口,那就是redis_6380和redis_6380.conf即可),redis这个服务文件需要放到/etc/rc.d/init.d这个目录下,redis.conf文件需要放到/etc/目录下,就Ok了。
这两个文件可以从下面两个链接中获取,基本不用修改,拿到就能使用的
redis文件:redis文件
redis.conf文件:redis.conf文件
以上两个文件放好之后,就可以通过chkconfig命令来安装了,步骤如下:
chkconfig --add redis
chkconfig --level 345 redis on
这样就安装完了。
启动redis服务:service redis start;停止redis服务:service redis stop。
0 0
- redis做成service来start和stop
- redis自定义使用start|stop|restart来停止和启动redis服务
- linux搭建redis服务设置开机自启动 service命令stop、start启动停止服务
- CMD:stop and start service process
- start/stop Tomcat 7 windows service
- Keepalived: Problem: service keepalived [start|stop|restart]
- service network start|stop|restart 命令理解
- service iptables status/start/stop 命令失效
- crsctl start/stop crs和crsctl start/stop cluster区别
- Unity3d Coroutine的Start和Stop
- 线程之start 和 stop,优先级
- Linux Start Restart and Stop The Cron or Crond Service
- How To Start / Restart / Stop Network and Routing Service
- Linux Start Restart and Stop The Cron or Crond Service
- 添加nginx为系统服务(service nginx start/stop/restart)
- how to start and stop android service by using adb
- 添加nginx为系统服务(service nginx start/stop/restart)
- Linux 配置tomcat以service方式 start stop restart 运行
- 猫哥带你去战斗——Java Web开发——网页篇[5]——样式
- Ubuntu iptables配置
- Google protobuf :windows下环境配置
- PHP基础之类型检测
- ffmpeg 编码器AVCodecContext 的配置参数
- redis做成service来start和stop
- Socket 类 构造函数和常见方法
- linux下的pip安装
- 366. Find Leaves of Binary Tree
- 设置OpenWrt连接外网
- 2016年末总结--感谢你们的存在
- Codeforces Round #388 (Div. 2)D Leaving Auction
- 猫哥带你去战斗——Java Web开发——网页篇[6]——布局
- HDU 1701 ACMer