当前位置:网站首页>Linux Redis-6.2.6单机部署
Linux Redis-6.2.6单机部署
2022-07-21 05:01:00 【两小只呀】
目录
前言
Redis有4种模式:
模式 | 优点 | 缺点 |
单机 | 部署简单 | 不太可靠、容量瓶颈、QPS瓶颈 |
主从复制 | 比较可靠,读写分离 | 故障恢复复杂,主库的写跟存受单机限制 |
哨兵模式 | 集群部署简单,可靠性高 | 原理繁琐,slave存在资源浪费,不能解决读写分离问题 |
集群模式 | 数据动态存储solt,可扩展,高可用 | 客户端动态感知后端变更,批量操作支持查 |
一、下载、编译
#下载
wget http://download.redis.io/releases/redis-6.2.6.tar.gz
#解压
tar xzf redis-6.2.6.tar.gz
#编译
cd redis-6.2.6
make
1. 可能出现的异常:
1.make cc: Command not fund
原因:系统没有安装gcc环境
方案:安装gc,安装完成后重新编译即可
yum install gcc
2.编译出现如下报错
原因:gcc版本过低
方案:升级gcc版本
#查看版本
gcc -v
#升级
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash
二、配置
vi redis.conf
bind 0.0.0.0 #设置绑定的主机ip,0.0.0.0表示监听所有地址
protected-mode no #关闭安全模式,允许外网访问
daemonize yes #后台启动
三、启动
./redis-server ../redis.conf
总结
以上就是redis单机部署方式,以后有机会会更新另外3种的部署方式。
边栏推荐
- 高德地图API获取当前位置对应的周边信息
- MySQL之DQL(数据查询语言)- 表连接查询
- ES6的数组、对象拷贝
- Interview with data center and Bi business (II): pit of organizational structure Sorting
- NXP i.MX 8m mini core board specifications, quad core arm cortex-a53 + arm cortex-m4
- STL list output and addition
- Read yaml configuration file based on Hydra Library (support command line parameters)
- MySQL DCL (data control language)
- MySQL之DDL(数据定义语言)
- 868. 筛质数
猜你喜欢
Why write unit tests? How to write unit tests?
MATLAB 自然样条函数(Spline,非MATLAB内置函数)
Jd.com's popular architect growth manual is launched, and you deserve the architect aura
Array and object copy of ES6
元宇宙iwemeta:《时代》杂志新封面,元宇宙将改变一切
实时跟踪用户管理操作
In depth interpretation of the investment logic of the consortium's participation in the privatization of Twitter
AS编辑器设置Flutter开发右侧代码缩进位置
Share the experience of big factories, come quickly
解决Oracle数据库查询单表排序顺序错误问题之一
随机推荐
Quanzhi a40i development board hardware specification - 100% domestic + industrial level scheme (Part 2)
flutter自定义form表单,封装form表单组件
蓝牙智能营养电子秤解决方案
Solutions: connections could not be acquired from the underlying database!
解决:Connections could not be acquired from the underlying database!
字符函数和内存函数
Array and object copy of ES6
ImportError: DLL load failed while importing win32gui: 找不到指定的模块。
Wechat applet payment
[C exercise] macro realizes the exchange of digital binary parity bits
Unity ECS 测试Demo
Common tools and test methods for interface testing
从20s优化到500ms,我是如何做到的
426. 将二叉搜索树转化为排序的双向链表
重写hashCode() 对比类是否相同
(4) Transactions
iwemeta:史玉柱的黄金酱酒:贴牌的代工厂都被关停了,谁在生产?
自动抓包工具 web scraper
实时跟踪用户管理操作
The JSON tool converts objects to JSON format strings