LINUX系統中安裝Redis3.2.8
http://blog.csdn.net/chiaotien/article/details/62524655
一,下載redis 壓縮包
命令:[[email protected] usr]# wget http://download.redis.io/releases/redis-3.2.8.tar.gz
二,對壓縮包進行解壓
命令:[[email protected] usr]# tar xzf redis-3.2.8.tar.gz
三,解壓後進行編譯
命令:[[email protected] redis-3.2.8]# make
make編譯時出錯:
cc:未找到命令
原因:系統缺少gcc,安裝gcc即可。
安裝命令:yum -y install gcc automake autoconf libtool make
安裝完gcc編譯redis時又如果出現以下錯誤:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
原因:分配器allocator會根據MALLOC變數去建立Redis ,預設不是libc而是jemalloc
解決辦法:
make MALLOC=libc
四,編譯後進入src目錄 進行安裝
[[email protected] redis-3.2.8]# cd src/
[[email protected] src]# make install
五,啟動redis服務
[[email protected] src]# ./redis-server
至此Redis安裝成功!