到官網下載,而後在服務器上執行web
tar zxvf redis-3.0.4.tar.gzredis
cd redis-3.0.4
make服務器
cd src
./redis-server啓動rediside
make一下便可完成安裝。經過redis-cli 進入執行ping顯示pong就說明安裝成功了。ui
不過redis推薦下面這些深層次的安裝配置。lua
mak test
注意,執行make完成以後redis會提示
Hint: It's a good idea to run 'make test' ;)idea
執行一下便可。
cd src切換到redis下面的src目錄,執行make test
會提示
[root@ruoshui-web src]# make test
You need tcl 8.5 or newer in order to run the Redis testserver
yum install tcl 便可ip
[root@ruoshui-web src]# make distclean 清理安裝過程系統再也不相關的包。io
This will clean: jemalloc, lua, hiredis, linenoise
爲了把redis的命令加入到系統的環境裏面執行
make install
這樣就能夠在系統的任何地方執行redis命令了。
In order to install Redis binaries into /usr/local/bin just use:
切換到utils目錄
cd /root/redis-3.0.4/utils
執行./install_server.sh
會提示安裝redis端口,配置文件,log目錄等等,選擇默認的,一路enter就好了
The script will ask you a few questions and will setup everything you need
to run Redis properly as a background daemon that will start again on
system reboots
上面的說的很詳細,至於功能嗎will start again on!之後用的時候就方便了。