When installing Redis, you need to use GCC. If the system is connected to the Internet, run the following command to install it online.
yum -y install gcc
Copy the code
However, if the system is not connected to the Internet, an offline installation method is required. The steps are as follows:
1. Obtain the required RPM Packages from the CentOS7 system installation image (you can also obtain them in other ways) : decompress the image files and go to the “Packages” directory where there are many RPM Packages.
I had a mirror here to download and then extracted a, need to download: download.csdn.net/download/ta…
MPFR 3.1.1-4. El7. X86_64. RPM libmpc 1.0.1-3. El7. X86_64. RPM kernel headers - 3.10.0-123. El7. X86_64. RPM Glibc - headers - 2.17-55. El7. X86_64. RPM glibc - devel - 2.17-55. El7. X86_64. RPM CPP - 4.8.2-16. El7. X86_64. RPM GCC - 4.8.2-16. El7. X86_64. RPMCopy the code
The version numbers of these packages are somewhat different depending on the image version, so the installation is ok
2. Upload the packages to the system to be installed and run the installation commands in the following sequence:
RPM -ivh mpfr-3.1.1-4.el7.x86_64. RPM RPM -ivh libmpc-1.0.1-3.el7.x86_64. RPM RPM -ivh libmpc-1.0.1-3.el7.x86_64. RPM Kernel-headers 3.10.0-123.el7.x86_64. RPM RPM -ivh glibc-headers 2.17-55.el7.x86_64. RPM RPM -ivh Glibc-vel -2.17-55.el7.x86_64. RPM RPM -ivh ccp-4.8.2-16.el7.x86_64. RPM RPM -ivh gcc-4.8.2-16.el7.x86_64. RPMCopy the code
You can also run the following command to install the software:
rpm -Uvh *.rpm --nodeps --force
Copy the code
3. Verify the installation
gcc -v
Copy the code