make: *** [server.o] Error 1
报错是因为gcc版本过低,yum安装的gcc是4.8.5的。因此需要升级gcc,升级过程如下:
yum -y install centos-release-scl yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash gcc -v 需要注意的是scl命令启用只是临时的,退出shell或重启就会恢复原系统gcc版本。 如果要长期使用gcc 9.3的话: echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
再次编译安装
make distclean;
make
报错 Hint: It's a good idea to run 'make test' make test 报错 You need tcl 8.5 or newer in order to run the Redis test 解决:yum install tcl
make install PREFIX=/opt/redis-6.0.10
cp redis目录/redis.conf /opt/redis-6.0.10/conf
初始化配置
远程访问:68行 注释掉 bind 127.0.0.1
后台启动:224行 daemonize yes
设置密码:790行 requirepass redis
浙公网安备 33010602011771号