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

Compilation and installation

Before using Redis-benchmark to test Redis, download and compile the Redis source package from GitHub and then install Redis. This section uses Redis 6.0 as an example to describe how to compile and install Redis. You can refer to this section to compile and install Redis of other versions.

  1. Download the Redis source package.
    1
    2
    cd /root
    wget https://github.com/redis/redis/archive/refs/heads/6.0.zip --no-check-certificate
    
  2. Decompress the Redis source package.
    1
    unzip 6.0.zip
    
  3. Go to the Redis source code directory and compile and install Redis.
    cd redis-6.0/
    make -j`nproc`
    make -j`nproc` install

    If no error is reported during the installation and the following information is displayed, the installation is successful. The default installation directory is /usr/local/bin.