当前位置:网站首页>Linux install redis database
Linux install redis database
2022-08-11 00:49:00 【The coolest hacker】
1. The first step to download the redis database
cd /usr/local
mkdir Redis
cd /usr/local/Redis
wget https://download.redis.io/releases/redis-6.2.7.tar.gz
2 Unzip
tar -zxvf redis-6.2.7.tar.gz
3 Check the installation environment, C language support is required
gcc --version
My linux already comes with c language environment, if not, please install it by yourself, the command is
yum install gcc
If there is no yum command, please install the yum source first. If there is no yum command, an error will be reported
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
Install yum command reference
CentOS6 error using yum command_The most dish hacker's blog-CSDN blog_centos6 yum error
4 Compile
cd /usr/local/Redis/redis-6.2.7
make
The following picture appears to indicate success
If an error occurs
——Jemalloc/jemalloc.h: No such file
(1) Check the gcc environment gcc --version
(2) If there is no problem with the gcc environment, execute the command make distclean
5 install redis
make install
The installed files are under /usr/local/bin
cd /usr/local/bin
ls
6 start redis
(1) Redis is started in the foreground, and it cannot run after the window is closed (not recommended)
redis-server
(2) Modify the configuration file, note that the configuration file is in the decompression directory of the second step, here is /usr/local/Redis/redis-6.2.7 (recommended)
cd /usr/local/Redis/redis-6.2.7
vi redis.conf
Press q twice to query, the query content is /daemonize
Press insert to edit
Change daemonize no to daemonize yes
Version problem, some versions do not havedaemonize,Add manually if not
After the modification is completed, remember to save, press Esc, and enter:wq! (colon also)
Start command:redis-server The full path of the redis.conf file, such as
redis-server /usr/local/Redis/redis-6.2.7/redis.conf
If no error is reported, it means that redis is running successfully. The command to check whether redis is running successfully is:
ps -ef | grep redis
7Connect to the redis database
redis-cli
边栏推荐
- @Autowired注入RedisCache报错空指针
- 构建资源的弹性伸缩
- 复制带随机指针的链表——LeetCode
- "NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 ADHK Problem Solving
- Use mysql statement to operate data table (table)
- Kunpeng compilation and debugging and basic knowledge of native development tools
- input输入框超出部分用省略号表示以及判断内容是否有超出(PC端)
- 深度解析volatile关键字(保证够全面)
- 【考虫 六级英语】语法课笔记
- 只会懒汉式和饿汉式 你还不懂单例模式!
猜你喜欢
③ 关系数据库标准语言SQL 数据查询(SELECT)
[21 Days Learning Challenge] Half Insertion Sort
Mysql数据库安装配置详细教程
Shell Text Three Musketeers Sed
① 数据库介绍 及 关系型数据库的关系代数表达式
input输入框超出部分用省略号表示以及判断内容是否有超出(PC端)
Ali P7 bask in January payroll: hard to fill the, really sweet...
EN 12467纤维水泥平板产品—CE认证
Mysql database installation and configuration detailed tutorial
详解JDBC的实现与优化(万字详解)
随机推荐
word 设置标题前分页
循环单词
虚拟电厂可视化大屏,深挖痛点精准减碳
微信小程序自定义navigationBar
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection Paper Notes
Difference Between Image Recognition and Semantic Segmentation
How to easily obtain the citation format of references?
版本号大小的判断方法
rhel7.0解决yum无法使用(system is not registered to Red Hat Subscription Management)
Distributed. Performance optimization
Based on the SSM to reach the phone sales mall system
小程序onPageNotFound的坑
构建资源的弹性伸缩
C# JObject解析JSON数据
详谈二叉搜索树
Two-dimensional array combat project -------- "Minesweeper Game"
Pagoda Test-Building PHP Online Mock Exam System
Mysql.慢Sql
③ 关系数据库标准语言SQL 数据查询(SELECT)
“蔚来杯“2022牛客暑期多校训练营4 ADHK题解