Linux下安裝Redis
準備安裝運行命令:
tar zxvf redis-3.0.4.tar.gz
進入解壓後的檔案夾:
cd redis-3.0.4
編譯源碼:
make
出錯如果出現下面錯誤:
[root@localhost redis-3.0.4]# makecd src && make allmake[1]: Entering directory `/root/redis-3.0.4/src‘ CC adlist.o/bin/sh: cc: command not foundmake[1]: *** [adlist.o] Error 127make[1]: Leaving directory `/root/redis-3.0.4/src‘make: *** [all] Error 2
則需要安裝gcc
如果出現下面錯誤:
[root@localhost redis-3.0.4]# makecd src&& make allmake[1]: Entering directory `/root/redis-3.0.4/src‘ CC adlist.oIn file included from adlist.c:34:zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/root/redis-3.0.4/src‘make: *** [all] Error 2
則更改make命令,為 make MALLOC=libc
安裝
安裝完成後,執行make install,執行檔案被複製到了/usr/local/bin中,
需要手動複製設定檔'
cp redis.conf /usr/local/bin
啟動伺服器:
./redis-server redis.conf
啟動用戶端:
./redis-cli
下面關於Redis的文章您也可能喜歡,不妨參考下:
Ubuntu 14.04下Redis安裝及簡單測試
Redis主從複製基本配置
Redis叢集明細文檔
Ubuntu 12.10下安裝Redis(圖文詳解)+ Jedis串連Redis
Redis系列-安裝部署維護篇
CentOS 6.3安裝Redis
Redis安裝部署學習筆記
Redis設定檔redis.conf 詳解
Redis 的詳細介紹:請點這裡
Redis 的:請點這裡
本文永久更新連結地址: