Centos下安装Redis
CentOS安装Redis5.0
yum install gcc# 编译,make命令会去当前路径寻找Makefile文件,执行编译过程
make
make install
# 指定位置安装
make install PREFIX=/opt/redis/
CentOS7安装Redis6.0
# 安装依赖
yum -y install gcc centos-release-scl cmake wget tcl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
# 解决gcc版本低的问题-临时
scl enable devtoolset-9 bash
# 解决gcc版本低的问题-永久
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
# 编译
make
# 安装, 默认安装到/usr/local/bin 目录下
make install
# 指定位置安装
make install PREFIX=/root/redis6./utils/install_server.sh安装redis服务
最后更新于