Redis學習筆記(三)—— 使用redis用戶端串連windows和linux下的redis並解決無法串連redis的問題__linux

來源:互聯網
上載者:User

搭建環境:linux是centos7.4(請注意centos7以下版本的防火牆跟centos7以上的不同,使用redis用戶端串連redis時會有區別,建議使用centos7以上版本) 一、下載redis用戶端 官方下載地址: https://github.com/uglide/RedisDesktopManager/releases
由於是國外的網站,下載速度比較慢甚至下載失敗,可以去csdn下載中心找積分下載或去其他網站下載,下載安裝後開啟用戶端,如下:
二、串連windows下的redis伺服器 1、確保redis伺服器是啟動狀態
2、建立串連
開啟如下頁面:

3、使用命令視窗 右鍵點擊localhost,選擇Console
正常使用各種redis命令
三、串連linux下的redis伺服器(如果無法串連一般是防火牆或保護模式的問題,按以下步驟操作可解決) 1、修改redis.conf設定檔 進入編輯設定檔

[root@localhost bin]# vi redis.conf

在127.0.0.1前面加上注釋(redis4.0以下版本預設是注釋掉的)


注釋前查看進程


注釋後查看進程


將受保護模式修改為no(redis4.0以下的版本沒有這個模式配置,不用修改)


儲存退出 2、在linux下的防火牆中開放6379連接埠(與centos7以下版本開放連接埠的方式有區別)

[root@localhost bin]# firewall-cmd --zone=public --add-port=6379/tcp --permanentsuccess
3、重啟防火牆
[root@localhost bin]# systemctl restart firewalld
4、啟動redis
[root@localhost bin]# ./redis-server redis.conf
5、串連測試

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.