当前位置:网站首页>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
边栏推荐
- Android mediacodec hard coded H264 file (four), ByteDance Android interview
- 同花顺注册开户有没有什么风险?安全吗?
- SAP Commerce Cloud 项目 Spartacus 入门
- 数据治理啥都干
- How to enable Hana cloud service on SAP BTP platform
- Is it safe to open a stock account with the QR code given by the CICC securities manager? I want to open an account
- Yolov6: un cadre de détection de cibles rapide et précis est Open Source
- numpy中mgrid的用法
- PostgreSQL notes
- Convolutional neural network (CNN) explanation and tensorflow2 code implementation
猜你喜欢

Web crawler 2: crawl the user ID and home page address of Netease cloud music reviews

关于appium踩坑 :Encountered internal error running command: Error: Cannot verify the signature of (已解决)
![leetcode:710. Random numbers in the blacklist [mapping thinking]](/img/ec/a3faeae6636bc3d0d9536962fdd9af.png)
leetcode:710. Random numbers in the blacklist [mapping thinking]

leetcode:6103. 从树中删除边的最小分数【dfs + 联通分量 + 子图的值记录】

Implementation of collaborative filtering evolution version neuralcf and tensorflow2

Background search, how to find the website background

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

Application and Optimization Practice of 100 million level monthly live national karaoke feed service in Tencent cloud mongodb

Leetcode(763)——划分字母区间

vulnhub之dc8
随机推荐
Usage of MGrid in numpy
How SAP Spartacus default routing configuration works
这个算BUG吗?乱填的字母是否可以关闭
Kdd2022 𞓜 unified session recommendation system based on knowledge enhancement prompt learning
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection
Treasure and niche cover PBR multi-channel mapping material website sharing
同花顺注册开户有没有什么风险?安全吗?
Leetcode(122)——买卖股票的最佳时机 II
Android mediacodec hard coded H264 file (four), ByteDance Android interview
不同的子序列问题I
DAST 黑盒漏洞扫描器 第五篇:漏洞扫描引擎与服务能力
y48.第三章 Kubernetes从入门到精通 -- Pod的状态和探针(二一)
网络爬虫2:抓取网易云音乐评论用户ID及主页地址
Y48. Chapter III kubernetes from introduction to mastery -- pod status and probe (21)
AI智能抠图工具--头发丝都可见
Solution of valuenotifier < list < t > > monitoring problem in fluent
Yolov6: the fast and accurate target detection framework is open source
Redis + guava local cache API combination, performance burst!
Is there any risk in opening a new bond registration account? Is it safe?
LabVIEW Arduino tcp/ip remote smart home system (project part-5)