# 下载redis安装包
wget http://download.redis.io/releases/redis-6.0.6.tar.gz
# 解压安装包
tar xf redis-6.0.6.tar.gz
# 安装依赖
yum install gcc openssl-devel pcre-devel zlib-devel -y
# 因为是redis6的版本 所以需要安装高版本的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
# 开始安装
make
make install
cd utils
vim install_server.sh
# 注释掉以下内容 在77行
#_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
# 根据实际需求配置
./install_server.sh
# 测试
redis-cli
# 返回pong即为成功
ping
安装Redis6
发布于 2022-11-14 293 次阅读

Comments NOTHING