redis 的源碼編譯安裝

來源:互聯網
上載者:User

標籤:comm   compress   stdout   slave   div   lis   nts   min   下載   

首先我們下載軟體包到指定的目錄下

tar -zxvf redis-2.8.19.tar.gz cd redis-2.8.19 makemake PREFIX=/usr/local/redis install


mkdir /usr/local/redis/etc/cp redis.conf /usr/local/redis/etc/ cd /usr/local/redis/bin/cp redis-benchmark redis-cli redis-server /usr/bin/


vim /usr/local/redis/etc/redis.conf# 修改一下配置# redis以守護進程的方式運行# no表示不以守護進程的方式運行(會佔用一個終端)  daemonize yes# 用戶端閑置多長時間後中斷連線,預設為0關閉此功能                                      timeout 300# 設定redis記錄層級,預設層級:notice                    loglevel verbose# 設定記錄檔的輸出方式,如果以守護進程的方式運行redis 預設:"" # 並且日誌輸出設定為stdout,那麼日誌資訊就輸出到/dev/null裡面去了 logfile stdout

我們現在來看一下設定檔
6379.conf
daemonize yespidfile /var/run/redis_6379.pidport 6379tcp-backlog 511timeout 0tcp-keepalive 0loglevel noticelogfile /usr/local/redis/logs/redis_6379.logdatabases 16save 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /usr/local/redis/6379slave-serve-stale-data yesslave-read-only yesrepl-diskless-sync norepl-diskless-sync-delay 5repl-disable-tcp-nodelay noslave-priority 100appendonly noappendfilename "appendonly.aof"appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbaof-load-truncated yeslua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128latency-monitor-threshold 0notify-keyspace-events ""hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64hll-sparse-max-bytes 3000activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10aof-rewrite-incremental-fsync yes

 



6380.conf
daemonize yespidfile /var/run/redis_6380.pidport 6380tcp-backlog 511timeout 0tcp-keepalive 0loglevel noticelogfile /usr/local/redis/logs/redis_6380.logdatabases 16save 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /usr/local/redis/6380slave-serve-stale-data yesslave-read-only yesrepl-diskless-sync norepl-diskless-sync-delay 5repl-disable-tcp-nodelay noslave-priority 100appendonly noappendfilename "appendonly.aof"appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbaof-load-truncated yeslua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128latency-monitor-threshold 0notify-keyspace-events ""hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64hll-sparse-max-bytes 3000activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10aof-rewrite-incremental-fsync yes

 





參考文章:1190000003084917


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.