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 yum -y install centos-release-scl yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash tar fx redis-6.0.10.tar.gz cd redis-6.0.10 make make install cp src/redis-server /usr/local/bin/ cp src/redis-sentinel /usr/local/bin/ cp src/redis-cli /usr/local/bin/ cp src/redis-benchmark /usr/local/bin/ cp src/redis-check-rdb /usr/local/bin/ cp src/redis-check-aof /usr/local/bin/ cp redis.conf /etc/redis.conf [root@proxy1 src]# mkdir -pv /etc/systemd/system/redis.service.d/ [root@proxy1 src]# cat >/etc/systemd/system/redis.service.d/limit.conf <<EOF # If you need to change max open file limit # for example, when you change maxclient in configuration # you can change the LimitNOFILE value below # see "man systemd.exec" for information [Service] LimitNOFILE=10240 EOF cat > /usr/lib/systemd/system/redis.service <<EOF [Unit] Description=Redis persistent key-value database After=network.target After=network-online.target Wants=network-online.target [Service] ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd ExecStop=/usr/libexec/redis-shutdown Type=notify User=redis Group=redis RuntimeDirectory=redis RuntimeDirectoryMode=0755 [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl start redis systemctl enable redis