redis的安裝使用和圖形化管理工具redis desktop manager的安裝使用

來源:互聯網
上載者:User

一.redis的安裝和啟動(以linux的ubuntu版本的作業系統為例)

  1.redis下載:$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz

  2.解壓檔案,在redis檔案夾下:$ make
  3.啟動redis服務:$ redis-server redis.conf
  4.啟動redis用戶端:$ redis-cli
二.redis圖形管理工具redis desktop manager的安裝和使用

  1.下載redis desktop manager的用戶端(http://pan.baidu.com/s/1cA3jWU 或者 http://redisdesktop.com/download)

  2.雙擊下載後的檔案即可安裝(redis-desktop-manager_0.8.3-120_amd64.deb)

    或者在終端中:sudo dpkg -i redis-desktop-manager_0.8.3-120_amd64.deb

      如果安裝失敗提示要安裝zlibc,終端命令安裝:執行 sudo apt-get install zlib1g-dev 

        然後執行sudo apt-get -f install

  3.redis desktop manager安裝完成後我們來做一些檢測再進行與redis的服務進行串連

     3.1

# 檢查Redis伺服器系統進程$ ps -aux|grep redisredis     4162  0.1  0.0  10676  1420 ?        Ss   23:24   0:00 /usr/bin/redis-server /etc/redis/redis.confconan     4172  0.0  0.0  11064   924 pts/0    S+   23:26   0:00 grep --color=auto redis

     3.2

# 通過啟動命令檢查Redis伺服器狀態$ netstat -nlt|grep 6379tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN

     3.3

# 通過啟動命令檢查Redis伺服器狀態$ sudo /etc/init.d/redis-server statusredis-server is running

  4.配置redis密碼:開啟redis檔案夾下的redis.conf檔案,找到下面這行代碼,後面的數字即為密碼,可以自行修改(預設並不是123456,是一串英文我忘記了

 requirepass 123456
  5.不使用密碼嘗試登入
redis-cli -h 127.0.0.1 -p 6379
    可以登入,然後嘗試使用命令發現報錯

redis 127.0.0.1:6379> keys *  (error) ERR operation not permitted
     嘗試用密碼登入並執行具體的命令看到可以成功執行
redis-cli -h 127.0.0.1 -p 6379 -a 123456
      登入成功,並且可以使用命令

  6.修改登入密碼

config set requirepass my_passwordOK
        7.在管理工具redis desktop manager中串連redis服務,點擊connect to redis server,在彈出的視窗中name為自訂字串,host填寫localhost本機伺服器,port為6379本地redis服務連接埠,auth即為我們剛才設定的redis.conf中的密碼,點擊test conection 顯示成功則可以點擊OK進行串連



 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.