1. 程式人生 > >Redis環境搭建和視覺化工具Redis Desktop Manager安裝

Redis環境搭建和視覺化工具Redis Desktop Manager安裝

安裝環境:

作業系統 Centos 7.4

redis版本:redis-4.0.11

一.安裝Redis

  1. 使用wget下載redis安裝包:wget http://download.redis.io/releases/redis-4.0.11.tar.gz
  2. 解壓壓縮包:tar -zxvf redis-4.0.11.tar.gz
  3. yum 安裝gcc依賴:yum install gcc,一路y到底。
  4. 進入解壓目錄:cd redis-4.0.11
  5. 編譯安裝:make MALLOC=libc
  6. 安裝:cd source && make install 執行結果如下,即表示成功:
    CC Makefile.dep
 
Hint: It's a good idea to run 'make test' ;)
 
    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install

二.啟動redis

    1.前臺啟動

       先切換到redis的src目錄下,直接啟動redis:./redis-server  執行結果如下表示安裝成功:

18685:C 13 Dec 12:56:12.507 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18685:C 13 Dec 12:56:12.507 # Redis version=4.0.6, bits=64, commit=00000000, modified=0, pid=18685, just started
18685:C 13 Dec 12:56:12.507 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
                _._                                                 
           _.-``__ ''-._                                            
      _.-``    `.  `_.  ''-._           Redis 4.0.11 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 18685
  `-._    `-._  `-./  _.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                 
 |    `-._`-._        _.-'_.-'    |           http://redis.io       
  `-._    `-._`-.__.-'_.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                 
 |    `-._`-._        _.-'_.-'    |                                 
  `-._    `-._`-.__.-'_.-'    _.-'                                  
      `-._    `-.__.-'    _.-'                                      
          `-._        _.-'                                          
              `-.__.-'                                              
 
18685:M 13 Dec 12:56:12.508 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18685:M 13 Dec 12:56:12.508 # Server initialized
18685:M 13 Dec 12:56:12.508 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
18685:M 13 Dec 12:56:12.508 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
18685:M 13 Dec 12:56:12.508 * Ready to accept connections  

上圖中,redis雖然啟動成功了,但是這種啟動方式需要一直開著該視窗,不能進行其他操作,很不方便。

執行 ctrl + c命令可以關閉視窗,但是redis服務也隨之關閉。

2.後臺程序方式啟動redis

    1.修改redis.conf檔案將

daemonize no

    修改為

daemonize yes

    2.指定redis.conf檔案的方式啟動:

./redis-server /usr/local/redis-4.0.11/redis.conf

    啟動成功的結果如下圖所示:

18713:C 13 Dec 13:07:41.109 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18713:C 13 Dec 13:07:41.109 # Redis version=4.0.11, bits=64, commit=00000000, modified=0, pid=18713, just started
18713:C 13 Dec 13:07:41.109 # Configuration loaded

     3.後臺啟動的話應該如何關閉redis程序呢,使用如下方式:

     首先,執行

ps -aux | grep redis

     檢視redis的程序:

[[email protected]_0_26_centos ~]# ps -aux | grep redis
root     26541  0.0  0.1 141832  2032 ?        Ssl  18:38   0:04 ./redis-server *:6379
root     31124  0.0  0.0 112704   976 pts/0    R+   20:23   0:00 grep --color=auto redis

    然後使用kill命令殺死程序:

kill -9 26541

3.設定redis開機自啟動

    1.在/etc目錄下新建redis目錄 mkdir redis

    2.將/usr/local/redis-4.0.11/redis.conf 檔案複製一份到/etc/redis目錄下,並命名為6379.conf  

cp /usr/local/redis-4.0.11/redis.conf /etc/redis/6379.conf

     3.將redis的啟動指令碼複製一份放到/etc/init.d目錄下

cp /usr/local/redis-4.0.11/utils/redis_init_script /etc/init.d/redisd

     4.使用vim編輯redisd檔案,在第一行加入如下兩行註釋,儲存退出

      註釋的含義表示,redis服務必須在執行級2,3,4,5下被啟動或關閉,啟動的優先順序是90,關閉的優先順序是10。

# chkconfig:   2345 90 10
# description:  Redis is a persistent key-value database

   4.設定redis開機自啟動

   先切換到/etc/init.d目錄下,然後執行自啟命令成功

chkconfig redisd on

    現在可以直接已服務的形式啟動和關閉redis了。啟動:service redisd start  

Starting Redis server...

2288:C 13 Dec 13:51:38.087 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

2288:C 13 Dec 13:51:38.087 # Redis version=4.0.11, bits=64, commit=00000000, modified=0, pid=2288, just started

2288:C 13 Dec 13:51:38.087 # Configuration loaded

  關閉:service redisd stop

4.使用redis-desktop-manager連結redis

  1.修改redis.conf配置檔案:

  • 找到bind 127.0.0.1,把這行前面加個#註釋掉。
  • 再查詢protected-mode yes 把yes修改為no。
  • 設定遠端登入的密碼:取消requirepass前面的#註釋,並設定密碼123456
requirepass 123456

  2.使用redis-desktop-manager進行遠端連線。

相關推薦

Redis環境搭建視覺工具Redis Desktop Manager安裝

安裝環境: 作業系統 Centos 7.4 redis版本:redis-4.0.11 一.安裝Redis 使用wget下載redis安裝包:wget http://download.redis.io/releases/redis-4.0.11.tar.gz 解壓壓縮

Windows 64位下安裝Redis 以及 視覺工具Redis Desktop Manager安裝使用

Windows 64位下安裝Redis  一、Redis介紹   Redis是一個key-value儲存系統。和Memcached類似,它支援儲存的value型別相對更多,包括string(字串)、list(連結串列)、set(集合)、zset(sorted set --

Redis 視覺工具 Redis Desktop Manager treeNMS 的使用

這裡介紹兩個 Redis 視覺化工具。Redis Desktop Manager 和 treeNMS。 一、Redis Desktop Manager 下載地址:https://redisdesktop.com/download 網盤下載地址:連結:https://pan.baidu.com/s/1PG

linux ubuntu安裝redis視覺工具redis-desktop-manager

從網上查詢了很多方法,都不是能夠完全解決我的問題的,現在總結我自己的安裝過程,僅以記錄. 1.下載redis-desktop-manager_0.8.3-120_amd64.deb ,下載地址是一個網友分享的百度雲地址,是 http://pan.baidu.com/s/1cA3jWU 2.

搜尋框架搭建1:elasticsearch安裝視覺工具kibana、分詞外掛jieba安裝

elasticsearch安裝和視覺化工具kibana、分詞外掛jieba安裝 1 Windosw環境 1.1 java環境安裝 1.2 elasticsearch安裝 1.3 視覺化介面kibana安裝 1.

mac安裝Redis視覺工具-Redis Desktop Manager(RDM)

一、安裝redis 最最最最簡單和推薦的方法就是使用brew命令安裝,前提是你的mac要安裝brew 安裝brew的方法如下: 安裝brew cask : 在終端中輸入下面語句 回車 ruby -e "$(curl -fsSL https://raw.githubuserc

Redis-安裝 + 視覺工具Redis Desktop Manager使用

Redis是有名的NoSql資料庫,一般Linux都會預設支援。但在Windows環境中,可能需要手動安裝設定才能有效使用。這裡就簡單介紹一下Windows下Redis服務的安裝方法,希望能夠幫到你。 1.要安裝Redis,首先要獲取安裝包。 Windows的R

redis視覺工具(Redis Desktop Manager) 連線linux

軍哥一鍵式安裝 linux   主要問題是6379的埠沒有開放 一、註釋redis.conf檔案中的:bind 127.0.0.1(在一段文字之前打#號為註釋)  二、設定密碼 為了安全一定要設,而且這裡如果不繫結ip也不設密碼的話,redis是預設保護模式,只能

Redis視覺工具Redis Desktop Manager

Redis Desktop Manager是一款非常實用的Redis桌面管理工具,它可以支援命令控制檯操作,以及常用,查詢key,rename,delete等操作。 Redis Desktop Man

Redis視覺工具Redis Desktop Manager安裝與使用

資源連結 官網下載地址: 碼雲上的下載地址: Redis Desktop Manager的使用   Redis Desktop Manager的安裝非常簡單,直接一直點選【下一步】然後直至完成就可以了。   Redis Deskt

Redis視覺工具 Redis Desktop Manager

下載 Redis Desktop Manager 安裝 直接點選按鈕 "Next >"即可。中間可以選擇路徑。 配置 點選左上角 連線到 Redis 伺服器按鈕,填寫名字即可。地址與埠號為預設的。然後點選下面的測試連線,提示 “連線 Redis 伺服器連線成功”。

mac安裝Redis再接入視覺工具-Redis Desktop Manager

使用Homebrew安裝redis可以減少大量的安裝和配置的工作量。  安裝命令 brew install redis 安裝完成後的提示資訊 To have launchd start redis at login:  ln -sfv /usr/local/opt

redis視覺工具redis desktop manager無法連線的解決辦法

當我們點選視覺化工具的連線redis按鈕,將redis資訊全部填上之後,點選test connection按時測試連線時,會彈窗提示連線錯誤,檢查redis資訊時,發現沒有寫錯,這時候,我們就要從伺服器上找原因了。 在linux伺服器下,按照以下路徑/usr/local

mac安裝Redis視覺工具-Redis Desktop Manager

Redis Desktop Manager 一款基於Qt5的跨平臺Redis桌面管理軟體 支援: Windows 7+, Mac OS X 10.10+, Ubuntu 14+ 特點: C++ 編寫,響應迅速,效能好。但不支援資料庫備份與恢復。 專案地址: https://github.com/uglide

Redis視覺工具Redis Desktop Manager使用

Redis視覺化工具,RedisDesktopManager 首先配置redis連線,建議加上密碼,設定redis的密碼百度大把的,這裡我們直接修改redis.conf檔案,開啟它,找到# requirepass foobared (#打頭的表示此行是註釋

Flask高階應用01--環境搭建例項藍圖

一、Flask簡介 Flask是一個基於Python實現的web開發的’微’框架,Flask和Django一樣,也是一個基於MVC設計模式的Web框架 [中文文件地址]http://docs.jinkan.org/docs/flask/ http://www.pythondoc.co

PostgreSQL應用(一,環境搭建客戶端工具安裝

一,PostgreSQL下載 官方下載地址: https://www.postgresql.org/download/ pgAdmin4客戶端工具下載地址:https://www.pgadmin.org/download/pgadmin-4-windows/ 二,安裝 本次PostgreSQ

MySQL免安裝版配置方法以及MySQL視覺工具Navicat for MySQL 安裝破解

  一、MySQL免安裝版配置方法(圖片中的路徑與文字方法路徑有出入,自行修改) 1、配置環境變數: 1)新建MYSQL_HOME變數,並配置: D:\ mysql-5.6.42-winx64 MYSQL_HOME:D:\ mysql-5.6.42-winx64 2)編

elasticsearch安裝視覺工具kibana、分詞外掛jieba安裝

Elasticsearch前身為Lucene,是一個分散式可擴充套件的實時搜尋和分析引擎。 為了更好地使用Elasticsearch,會安裝相應的工具或外掛,如視覺化工具kibana,分詞外掛jieba。windows環境和Linux環境下安裝elastics

解決mysql視覺工具Navicat與web應用中資料庫傳輸中文亂碼問題

  關於網上解決亂碼的問題有許多也很成熟了,將mysql和他的視覺化工具Navicat之間統一編碼問題也有許多,本篇文章旨在回顧mysql與Navicat之間的統一編碼的所有方式,和web應用中傳輸中文亂碼做統一規劃,由於本人水有限,文中有不少錯誤的地方望批評改正。