Rate This Document
Findability
Accuracy
Completeness
Readability

Environment Configuration

Before compiling and installing Redis and using redis-benchmark for testing, you need to configure the environment, including configuring the Yum repository and installing dependency packages.

  1. Mount the OS image.

    Mount the OS image using either of the following methods:

    • Method 1: Upload the OS image to the /home directory and mount the image to the /mnt/ directory.
      1
      mount /home/openEuler-22.03-LTS-SP2-everything-aarch64-dvd.iso /mnt/
      

      Change the .iso file name to the actual one in use. The operation takes effect only once and becomes invalid after the restart of the OS.

    • Method 2: Use the KVM to mount the image to the /mnt/ directory.
      1
      mount /dev/sr0 /mnt/
      

      If the system displays a message indicating that no image is available after you run the mount command, connect to the image and then run the command again.

  2. Configure a local Yum repository.

    Configure a local repository if the server cannot obtain dependencies from the Internet using yum commands.

    1. Back up the system Yum repository configuration file.
      1
      mv /etc/yum.repos.d /etc/yum.repos.d.bak
      
    2. Create a Yum repository configuration directory.
      1
      mkdir /etc/yum.repos.d
      
    3. Go to the Yum repository configuration directory.
      1
      cd /etc/yum.repos.d
      
    4. Open the local.repo file.
      1
      vi local.repo
      
    5. Press i to enter the insert mode and add the following content to the local.repo file:
      [local]
      name=local.repo
      baseurl=file:///mnt
      enabled=1
      gpgcheck=0
    6. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Make the local repository take effect.
    1
    2
    yum clean all
    yum makecache
    
  4. Install dependencies.
    yum -y install libatomic*