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.
- 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.
1mount /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.
1mount /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.
- Method 1: Upload the OS image to the /home directory and mount the image to the /mnt/ directory.
- Configure a local Yum repository.
Configure a local repository if the server cannot obtain dependencies from the Internet using yum commands.
- Back up the system Yum repository configuration file.
1mv /etc/yum.repos.d /etc/yum.repos.d.bak
- Create a Yum repository configuration directory.
1mkdir /etc/yum.repos.d - Go to the Yum repository configuration directory.
1cd /etc/yum.repos.d
- Open the local.repo file.
1vi local.repo - 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Back up the system Yum repository configuration file.
- Make the local repository take effect.
1 2
yum clean all yum makecache
- Install dependencies.
yum -y install libatomic*
Parent topic: Redis-benchmark Test Guide