大部分开发还是在windows下完成的,希望每次开机都不用重新启动Redis服务。
目录
1.注册服务
2.卸载服务
3.开启服务
4.停止服务
1
注册服务
windows下Redis服务自启动主要是将Redis进程注册成为 windows服务
redis-server --service-install redis.windows-service.conf --loglevel verbose
结果:
2
卸载服务
redis-server --service-uninstall
3
开启服务
redis-server --service-start
4
停止服务
redis-server --service-stop
注意:其中 redis-server 为server 命令,redis.windows-service.conf 为配置文件,大家还经常要远程连接Redis,记得修改
找到bind 127.0.0.1,把这行前面加个#注释掉
再查找protected-mode yes 把yes修改为no
redis3.2版本后新增protected-mode配置,默认是yes,即开启。设置外部网络连接redis服务,设置方式如下:
1、关闭protected-mode模式,此时外部网络可以直接访问
2、开启protected-mode保护模式,需配置bind ip或者设置访问密码
END
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有