2020-09-27

redis 6.0 安装过程中遇到的问题以及解决方案

1.安装过程中gcc已经提示为最新版,但是make时依然报错,以下为其中一段报错信息:

server.c:2896:27: error: ‘struct redisServer’ has no member named ‘tlsfd_count’      for (j = 0; j <

解决方案:

升级gcc:

1:yum -y install centos-release-scl
2:yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
3:scl enable devtoolset-9 bash

然后清除之前的编译 make distclean,然后重新 make 解决问题

2.在执行 make install PREFIX=/opt/soft/redis6发生提示信息:

This systems seems to use systemd.
Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!

解决方案: 包系统默认的脚本注释掉一段

#bail if this system is managed by systemd
#_pid_1_exe="$(readlink -f /proc/1/exe)"
#if [ "${_pid_1_exe##*/}" = systemd ]
#then
#       echo "This systems seems to use systemd."
#       echo "Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!"
#       exit 1
#fi

3.配置REDIS_HOME 环境变量,vi /etc/profile 在尾部追加以下代码 ,然后source /etc/profile

export REDIS_HOME=/opt/soft/redis6
export PATH=$PATH:$REDIS_HOME/bin

4.进入 redis解压目录,我是的/root/soft/redis-6.0.6/utils
启动./install_server.sh 成功注册并启动redis 服务,进入/etc/init.d 可以看到redis_6379

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值