我要评分
获取效率
正确性
完整性
易理解

Compiling and Installing Redis

This section describes how to install Redis 6.0.20 by compiling the source code. You can also refer to this section for other Redis versions.

  1. Download the Redis source package.

    http://download.redis.io/releases/redis-6.0.20.tar.gz

    If the server is connected to the Internet, run the wget command to download the Redis source code.

    cd /home 
    wget http://download.redis.io/releases/redis-6.0.20.tar.gz --no-check-certificate
  2. Upload the package to the /home directory on the server and decompress it.
    cd /home
    tar -zxvf redis-6.0.20.tar.gz
  3. Compile Redis.
    cd /home/redis-6.0.20
    make -j
  4. Install Redis.
    • Install Redis in the default path /usr/local/bin.
      make install
    • Or, install it in a specified directory, for example, /usr/local/redis-6.0.20.
      make PREFIX=/usr/local/redis-6.0.20 install
  5. Check that the installed Redis version is the expected one.
    redis-server -v