当前位置:网站首页>Centos7编译安装Redis
Centos7编译安装Redis
2022-06-26 21:49:00 【陌北v1】
gcc环境,安装之前必先确认是否安装gcc -v环境,如果没有安装,执行以下命令进行安装
yum install -y gcc
下载Redis
官网下载地址:https://redis.io/download
找到要下载的版本右键复制下载链接
wget https://download.redis.io/releases/redis-6.2.6.tar.gz
解压,安装:
#解压
tar xzf redis-6.2.6.tar.gz
进入解压后的目录redis-6.2.6
#编译安装
make
make install PREFIX=/usr/local/redis
执行完该命令会在指定的目录下生成bin文件
PREFIX=这个关键字的作用是编译的时候用于指定程序存放的路径。比如我们现在就是指定了redis必须存放在/usr/local/redis目录。假设不添加该关键字Linux会将可执行文件存放在/usr/local/bin目录,库文件会存放在/usr/local/lib目录。配置文件会存放在/usr/local/etc目录。其他的资源文件会存放在usr/local/share目录。这里指定号目录也方便后续的卸载,后续直接rm -rf /usr/local/redis即可删除redis。
从redis 的源码目录中复制redis.conf到redis的安装目录
cp /home/redis-6.2.6/redis.conf /usr/local/redis/bin/
修改配置文件redis.conf
#修改监听地址,允许所有ip地址访问
bind 0.0.0.0
#修改守护进程
daemonize yes
#修改密码
requirepass xxxxx
后台运行
./redis-server redis.conf
边栏推荐
- Godson China Science and technology innovation board is listed: the market value is 35.7 billion yuan, becoming the first share of domestic CPU
- How to analyze financial expenses
- Operator介绍
- Redis + guava local cache API combination, performance burst!
- Is this a bug? Whether the randomly filled letters can be closed
- vulnhub之DC9
- fastadmin极光推送发送消息的时候registration_id多个用逗号分割后无效
- 亿级月活全民K歌Feed业务在腾讯云MongoDB中的应用及优化实践
- YOLOv6:又快又准的目標檢測框架開源啦
- leetcode:6103. Delete the minimum score of the edge from the tree [DFS + connected component + value record of the subgraph]
猜你喜欢

YOLOv6:又快又准的目标检测框架开源啦

leetcode:710. 黑名单中的随机数【映射思维】

Implementation of collaborative filtering evolution version neuralcf and tensorflow2

Listing of maolaiguang discipline on the Innovation Board: it is planned to raise 400million yuan. Fanyi and fanhao brothers are the actual controllers

Parsing complex JSON in fluent

Redis + Guava 本地缓存 API 组合,性能炸裂!

Yolov6: un cadre de détection de cibles rapide et précis est Open Source

360手机助手首家接入APP签名服务系统 助力隐私安全分发

Sword finger offer 12 Path in matrix

第2章 构建自定义语料库
随机推荐
DLA模型(分类模型+改进版分割模型) + 可变形卷积
Is there any risk for flush to register and open an account? Is it safe?
Solution of valuenotifier < list < t > > monitoring problem in fluent
curl: (35) LibreSSL SSL_ connect: SSL_ ERROR_ SYSCALL in connection
nmap参数详解
PostgreSQL notes
Using C to operate SQLSERVER database through SQL statement tutorial
SAP Commerce Cloud 项目 Spartacus 入门
vulnhub之DC9
【protobuf 】protobuf 昇級後帶來的一些坑
在哪家证券公司开户最方便最安全可靠
Data governance does everything
【图像处理基础】基于matlab GUI图像直方图均衡化系统【含Matlab源码 1924期】
[leetcode]- linked list-2
Chapter 2 construction of self defined corpus
线性模型LN、单神经网络SNN、深度神经网络DNN与CNN测试对比
vulnhub之dc8
Is it safe for CICC fortune to open an account? I want to open an account to speculate in stocks.
Flutter 中 ValueNotifier<List<T>> 监听问题解决
【题解】剑指 Offer 15. 二进制中1的个数(C语言)