Compiling Redis4.0.2 on Linux

Source: Internet
Author: User

Installing Deployment Redis4.0.2 on Linux
    • To install Redis4.0.2, you need to install dependencies first:
Yum-y install gcc gcc-c++ libstdc++-devel tcl-y
    • To download the Redis4.0.2 installation package:
wget http://219.238.7.71/files/403400000ABE0C0C/download.redis.io/releases/redis-4.0.2.tar.gz
    • Unzip:
TAR-ZXVF redis-4.0.2.tar.gz-c/usr/local/src/
    • Go to Redis Unzip directory and rename:
CD/USR/LOCAL/SRC/LLMV Redis-4.0.2/redis
    • To compile Redis:
Cd/usr/local/src/redismake malloc=libc  #添加内存回收机制  Otherwise an error may be installed error:jemalloc/jemalloc.h:no such file or Directorymake Prefix=/usr/local/src/redis/install  
    • Prepare the configuration file:
Cd/usr/local/src/redismkdir conf    #存放配置文件的目录mkdir-P data/6379    #存放redis数据的目录, logs, etc. cd CONFVI redis_6379.conf
    • The contents of the redis_6379.conf configuration file are as follows:
Bind 192.168.161.150protected-mode yesport 6379tcp-backlog 511timeout 0tcp-keepalive 300daemonize yessupervised Nopidfile/usr/local/src/redis/data/6379/redis_6379.pidloglevel Noticelogfile "/usr/local/src/redis/data/6379/ Log.log "Databases 16always-show-logo yessave 1save 10save 10000stop-writes-on-bgsave-error yesrdbcompression Yesrdbchecksum yesdbfilename Dump.rdbdir/usr/local/src/redis/data/6379/slave-serve-stale-data yesslave-read-only Yesrepl-diskless-sync Norepl-diskless-sync-delay 5repl-disable-tcp-nodelay noslave-priority 100lazyfree-lazy-eviction nolazyfree-lazy-expire Nolazyfree-lazy-server-del Noslave-lazy-flush noappendonly Yesappendfilename "appendonly.aof" Appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbaof-load-truncated yesaof-use-rdb-preamble Nolua-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-size-2list-compress-depth 0set-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
    • Go to the Redis Bin directory and start the Redis service:
    • To see if the Redis service started successfully:
Ps-ef|grep Redis

    • Start successfully, connect the client, test:
./redis-cli-h 192.168.161.150-p 6379

    • Note : You cannot run the./redis-cli command directly when you start the client, otherwise you will get an error:

Here, the installation of Redis4.0.2 is over!!!

Compiling Redis4.0.2 on Linux

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.