Compile and install Redis from Centos7 source code

For details, please see the official website: https://redis.io/docs/getting-started/installation/install-redis-from-source/

1. Download the source code package

wget https://download.redis.io/redis-stable.tar.gz

2. Decompress

tar -xzvf redis-stable.tar.gz
cd redis-stable
  • compile
make
  • Install
make install PREFIX=/usr/local/redis

3. Start

redis-server

4. Problem solving

  • Compilation error: makezmalloc.h:50:31: Fatal error: jemalloc/jemalloc.h: No such file or directory
make MALLOC=libc && make install 

Guess you like

Origin blog.csdn.net/weixin_43824520/article/details/132590260