Redis一鍵編譯安裝指令碼

來源:互聯網
上載者:User

標籤:redis

#!/bin/shpwdmkdir /datacd /datawget -c yum -y install gcc gcc-c++ make autoconf mlocate lsof rsynctar zxvf redis-2.8.9.tar.gzcd redis-2.8.9make & make installmkdir pidsmkdir logscp utils/redis_init_script /etc/init.d/redis_6379cp redis.conf /etc/redis/6379.confmkdir /data/nosql/redis/6379 -pmkdir /etc/rediscat > /etc/redis/6379.conf <<EOFdaemonize yeslogfile /data/redis-2.8.9/logs/redis_6379.logpidfile /data/redis-2.8.9/pids/redis_6379.pidport 6379bind 0.0.0.0timeout 0tcp-keepalive 0loglevel noticedatabases 16save 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yes#dbfilename dump_6379.rdbdir /data/nosql/redis/6379#maxmemory      2000000000#slave-serve-stale-data yes#slave-read-only yesrepl-disable-tcp-nodelay noslave-priority 100appendonly noappendfilename "appendonly.aof"appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128notify-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 64activerehashing 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 yesEOF/etc/init.d/redis_6379 start

注意:

wget地址,大家可以從官網下載

bind填寫伺服器實際內網地址

本文出自 “我的營運之路” 部落格,請務必保留此出處http://linuxpython.blog.51cto.com/10015972/1631891

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.