Redis安装

1、下载

wget -P 路径 https://download.redis.io/releases/redis-6.2.9.tar.gz

2、解压

tar zxvf redis-6.2.9.tar.gz

3、安装GCC autoconf automake

yum -y install gcc-c++ autoconf automake

4、升级GCC

#安装scl源

yum install -y centos-release-scl scl-utils-build

#安装9版本gcc

yum install -y devtoolset-9-toolchain

#覆盖原有的gcc

scl enable devtoolset-9 bash

#查看版本

gcc -v

5、编译redis

cd cd redis-6.2.9

make

6、安装

mkdir usr/local/redis

make -p usr/local/redis install

7、创建服务启动

vim /etc/systemd/system/redis.service

Unit

Description=redis-server

After=network .target

Service

Type=forking

ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/bin/redis.conf

PrivateTmp=true

Install

WantedBy=multi-user.target

systemctl daemon-reload

systemctl start redis.service

相关推荐
ICscholar16 分钟前
ExaDigiT/RAPS
linux·服务器·ubuntu·系统架构·运维开发
sim202025 分钟前
systemctl isolate graphical.target命令不能随便敲
linux·mysql
全靠bug跑35 分钟前
Spring Cache 实战:核心注解详解与缓存过期时间配置
java·redis·springcache
米高梅狮子1 小时前
4. Linux 进程调度管理
linux·运维·服务器
lkbhua莱克瓦242 小时前
进阶-索引3-性能分析
开发语言·数据库·笔记·mysql·索引·性能分析
再创世纪2 小时前
让USB打印机变网络打印机,秀才USB打印服务器
linux·运维·网络
IT教程资源C3 小时前
(N-089)基于springboot网上订餐系统
mysql·springboot订餐系统
fengyehongWorld3 小时前
Linux ssh端口转发
linux·ssh
IT教程资源D3 小时前
[N_083]基于springboot毕业设计管理系统
mysql·springboot毕业设计
韦东东3 小时前
DeepSeek:R1本地RAG 问答: 功能新增,附 六大关键技术优化路径参考
数据库·mysql