1. Download the latest version
wget https://download.redis.io/releases/redis-6.2.6.tar.gz
2. Unzip
tar vzxf redis-6.2.6.tar.gz
cd redis-6.2.6
3. Installation dependencies:
3.1 Install the gcc package:
yum install cpp
yum install binutils
yum install glibc
yum install glibc-kernheaders
yum install glibc-common
yum install glibc-devel
yum install gcc
yum install make
#Check if the version of gcc is above 5.3, centos7 defaults to 4.8.5. Here is 4.8.5
gcc -v
upgradegcc
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash
Note: The enablement of the scl command is only temporary, and the original gcc version will be restored after exiting xshell or restarting.
If you want to take effect for a long time, execute as follows:
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
cd deps/
make lua hiredis linenoise
Add two lines to vi /etc/sysctl.conf
net.core.somaxconn=1024
vm.ove