阿里云Redis 配置


查看路径whereis redis

1.修改配置文件

vim /etc/redis.conf

 

 

这三个配置是必须的

修改内容,把 daemonize no 修改为:daemonize yes

 requirepass 123456 // 这个用来修改密码

 bind 0.0.0.0  // 这个用来绑定ip 原来是127.0.0.1

 

1.这是因为配置文件中,以守护进程方式启动,默认是关闭的,这是设置为允许以守护进程方式启动服务

2.启redis-server /etc/redis.conf看redis服务是否启动 另一种启动方式 ./redis-server /etc/redis.conf 

ps aux | grep redis

[root@localhost ~]# ps aux | grep redis
root 3339 0.1 0.5 139524 5208 ? Ssl 18:41 0:00 redis-server 127.0.0.1:6379
root 3343 0.0 0.0 103324 848 pts/0 S+ 18:41 0:00 grep redis

3.这时候再用命令

redis-cli


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM