linux-ubuntu 安裝配置Redis



>wget http://download.redis.io/releases/redis-3.2.6.tar.gz #下載redis源碼包

>tar -zxvf redis-3.2.6.tar.gz

>cd redis-3.2.6

>make test

#報錯:“You need tcl 8.5 or newer in order to run the Redis test”

>wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz

>tar -zxvf tcl8.6.1-src.tar.gz

>cd tcl8.6.1/unix/

>./configure

>make && make install  //安裝tcl完畢

#重新再安裝一次redis

>cd /路徑/redis-3.2.6

>make

>make test

>make install

#ok不管他有沒有報錯,反正沒報tcl的錯就行

#直接啟動redis-server服務

/路徑/redis-3.2.6/src/redis-server  #這種啟動方式,會占用連接端口,關閉的話redis就會關閉

#配置守護進程

vi /路徑/redis-3.2.6/redis.conf

找到 daemonize no  改為 daemonize yes     #保存退出

/路徑/redis-3.2.6/src/redis-server  /路徑/redis-3.2.6/redis.conf #以守護進程模式啟動

#如果需要添加redis密碼的話

vi /路徑/redis-3.2.6/redis.conf

找到 #requirepass 去除前面的’# 修改為 requirepass pwd #保存退出

/路徑/redis-3.2.6/src/redis-server  /路徑/redis-3.2.6/redis.conf #以配置啟動


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM