redis安裝筆記

來源:互聯網
上載者:User

標籤:databases   資料庫   releases   資訊   local   

cp /usr/local/src/

wget http://download.redis.io/releases/redis-3.0.1.tar.gz


tar zxf redis-3.0.1.tar.gz 


cd redis-3.0.1


make


make install


cp redis.conf /etc/



vi /etc/redis.conf 

daemonize yes



參數介紹:

daemonize:是否以後台daemon方式運行

pidfile:pid檔案位置

port:監聽的連接埠號碼

timeout:請求逾時時間

loglevel:log資訊層級

logfile:log檔案位置

databases:開啟資料庫的數量

save * *:儲存快照的頻率,第一個*表示多長時間,第三個*表示執行多少次寫操作。在一定時間內執行一定數量的寫操作時,自動儲存快照。可設定多個條件。

rdbcompression:是否使用壓縮

dbfilename:資料快照檔案名稱(只是檔案名稱,不包括目錄)

dir:資料快照的儲存目錄(這個是目錄)

appendonly:是否開啟appendonlylog,開啟的話每次寫操作會記一條log,這會提高資料抗風險能力,但影響效率。

appendfsync:appendonlylog如何同步到磁碟(三個選項,分別是每次寫都強制調用fsync、每秒啟用一次fsync、不調用fsync等待系統自己同步)



redis-server /etc/redis.conf



[[email protected] redis-3.0.1]# ps -ef|grep redis

root       4407      1  0 23:12 ?        00:00:00 redis-server *:6379         

root       4411   1365  0 23:12 pts/0    00:00:00 grep redis






本文出自 “dabao” 部落格,請務必保留此出處http://332532.blog.51cto.com/322532/1812308

redis安裝筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.