Error in make when installing redis6.0 in centos7

Install Redis
server system as centos7 on a cloud server, directly look up the address of Redis official website, wget, tar, execute mark command, find error report

             serverLog(LL_NOTICE,"The server is now ready to accept connections at %s", server.unixsocket);
                                                                                              ^
server.c:5103:19: error: struct redisServer has no member named supervised_mode
         if (server.supervised_mode == SUPERVISED_SYSTEMD) {
                   ^
server.c:5104:24: error: struct redisServer has no member named masterhost
             if (!server.masterhost) {
                        ^
server.c:5117:15: error: struct redisServer has no member named maxmemory
     if (server.maxmemory > 0 && server.maxmemory < 1024*1024) {
               ^
server.c:5117:39: error: struct redisServer has no member named maxmemory
     if (server.maxmemory > 0 && server.maxmemory < 1024*1024) {
                                       ^
server.c:5118:176: error: struct redisServer has no member named maxmemory
         serverLog(LL_WARNING,"WARNING: You specified a maxmemory value that is less than 1MB (current value is %llu bytes). Are you sure this is what you really want?", server.maxmemory);
                                                                                                                                                                                ^
server.c: In function hasActiveChildProcess’:
server.c:1476:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
server.c: In function allPersistenceDisabled’:
server.c:1482:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
server.c: In function writeCommandsDeniedByDiskError’:
server.c:3747:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
server.c: In function iAmMaster’:
server.c:4914:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [server.o] Error 1
make[1]: Leaving directory `/usr/src/redis-6.0.1/src'
make: *** [install] Error 2

GCC and other environments have been installed, and the ways of recompiling after clearing compilation information and deleting decompressed files and redecompressing compilation have been tried without improvement. Later, it was found that it was related to the version of GCC

//Check gcc Version
gcc -v

Centos7 default version for 4.8.5

and redis6.0 + need GCC version 5.3 and above, so upgrade GCC can be

//Upgrade gcc to V9 or high
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils

You also need to execute the command

//change the current gcc version to 9
scl enable devtoolset-9 bash
//or change permanetly
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

Read More: