当前位置:网站首页>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

边栏推荐
猜你喜欢
随机推荐
22/8/9 贪心问题合集
Navicat 16-数据库工具
Pico 4更多参数曝光:Pancake+彩色透视,还有Pro版本
【.NET Core】使用 NPOI 读写Excel 文件
leetcode 前K个高频单词
How to build speed, speed up again
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 3 DF Problem Solving
如何破坏Excel文件,让其显示文件已损坏方法
Distributed. Performance optimization
nodejs项目连接mysql数据库
使用mysql语句操作数据表(table)
成功解决raise TypeError(‘Unexpected feature_names type‘)TypeError: Unexpected feature_names type
Apache Commons Configuration远程代码执行漏洞(CVE-2022-33980)分析&复现
【openpyxl】只读模式、只写模式
【考虫 六级英语】语法课笔记
HW-蓝队工作流程(1)
双机热备综合实验(VRRP+OSPF+VTP+NAT+DHCP+PVSTP+单臂路由)
EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Est...
深度解析volatile关键字(保证够全面)
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 DGHJKL Problem Solution




![[Excel knowledge and skills] Convert](/img/96/ece9c3885fd4abe4bf4d211813b9c4.png)



