CentOS 6.5安裝 Redis

來源:互聯網
上載者:User

CentOS 6.5安裝 Redis

CentOS 6.5安裝 Redis

版本:redis-2.8.19.tar.gz

檢查下面依賴是否安裝,如果沒有要先安裝,不然會有異常。

yum installgcc-c++

yum install -y tcl。

1、擷取安裝檔案

redis-2.8.19.tar.gz

http://redis.io/download

2、解壓檔案

tar -xzvf redis-2.8.19.tar.gz

mv redis-2.8.19  /usr/local/redis

3、進入目錄

cd redis

4、編譯

make

5、安裝

make install

6、設定設定檔路徑

mkdir -p /etc/redis

cp redis.conf/etc/redis

7、修改設定檔

vi /etc/redis/redis.conf

僅修改: daemonize yes

8、啟動

/usr/local/bin/redis-server/etc/redis/redis.conf

9、查看啟動

ps -ef | grep redis 

10、使用用戶端

redis-cli

>set namedavid

OK

11.關閉用戶端

redis-cli  shutdown

12.異常及解決方案

異常一:

make[2]: cc:Command not found

異常原因:沒有安裝gcc

解決方案:yum install gcc-c++

異常二:

zmalloc.h:51:31:error: jemalloc/jemalloc.h: No such file or directory

異常原因:一些編譯依賴或原來編譯遺留出現的問題

解決方案:make distclean。清理一下,然後再make。

在make成功以後,需要make test。在make test出現異常。

異常一:

couldn'texecute "tclsh8.5": no such file or directory

異常原因:沒有安裝tcl

如果不先安裝tcl在編譯redis的時候,執行make test 會報以下錯誤,這步也可以省略,不執行make test 直接執行make install 對redis的啟動和關閉沒有什麼影響。
[root@localhostredis]# make test
cd src &&make test
make[1]: Enteringdirectory `/usr/local/webserver/redis/src'
You need tcl 8.5 ornewer in order to run the Redis test
make[1]: *** [test]Error 1
make[1]: Leavingdirectory `/usr/local/webserver/redis/src'
make: *** [test]Error 2

Ubuntu 14.04下Redis安裝及簡單測試

Redis叢集明細文檔

Ubuntu 12.10下安裝Redis(圖文詳解)+ Jedis串連Redis

Redis系列-安裝部署維護篇

CentOS 6.3安裝Redis

Redis安裝部署學習筆記

Redis設定檔redis.conf 詳解

Redis 的詳細介紹:請點這裡
Redis 的:請點這裡

本文永久更新連結地址:

相關文章

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.