Redis source code compilation and installation

Source: Internet
Author: User
Tags truncated

First we download the package to the specified directory

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


/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 # Modify configuration # Redis Run as daemon # No indicates that the daemon is not running (consumes a terminal) daemonize yes# the client is idle for a long time after disconnecting, The default is 0 to turn off this feature timeout 300# set Redis log level, default level: Notice loglevel Verbose# set the output mode of the log file, if the Redis default is run as daemon: "" # And the log output is set to stdout, then the log information is output to/dev/null logfile stdout            

Let's take a look at the configuration file
6379.conf
Daemonize yespidfile/var/run/redis_6379.pidport 6379tcp-backlog 511timeout 0tcp-keepalive 0loglevel noticelogfile/ Usr/local/redis/logs/redis_6379.logdatabases 16save 1save 10save 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-increment Al-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 1save 10save 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-increment Al-fsync Yes





参考文章:1190000003084917


Redis source code compilation and installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.