Redis開啓遠程登陸鏈接

Redis 安裝詳見 http://www.cnblogs.com/zendwang/p/6560628.htmlhtml

當前安裝測試版本:Redis 3.2.8linux

默認安裝完畢Redis只能本機訪問redis

[root@zendlinux soft]# ps -ef |grep redis
root      1763     1  0 15:21 ?        00:00:00 /usr/local/bin/redis-server 127.0.0.1:6379      
root      1854  1656  0 15:33 pts/1    00:00:00 grep redis

須要開啓遠程登陸。解決方法以下:在redis的配置文件redis.conf中,找到bind 127.0.0.1註釋掉。測試

[root@zendlinux soft]# vi /etc/redis/6379.conf 

重啓服務便可spa

[root@zendlinux soft]# /etc/init.d/redis_6379 stop
Stopping ...
Redis stopped
[root@zendlinux soft]# /etc/init.d/redis_6379 start
Starting Redis server...
[root@zendlinux soft]# ps -ef |grep redis
root      1862     1  0 15:37 ?        00:00:00 /usr/local/bin/redis-server *:6379              
root      1866  1656  0 15:37 pts/1    00:00:00 grep redis

 我開啓遠程訪問的Redis 部署192.168.10.197,我在另外一臺服務,192.168.10.198上測試結果code

相關文章
相關標籤/搜索