当前位置:网站首页>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
边栏推荐
猜你喜欢
How to do patent mining, the key is to find patent points, in fact, it is not too difficult
EN 12467纤维水泥平板产品—CE认证
从0开始设计JVM ,忘记名词跟上思路一次搞懂
MSTP——多生成树(案列+配置)
时间戳转换为日期格式、获取当前时间戳
Pico 4更多参数曝光:Pancake+彩色透视,还有Pro版本
Only lazy and hungry. You still don't understand the singleton pattern!
SAS data processing technology (1)
微信小程序自定义navigationBar
ArcGIS Pro 创建tpk
随机推荐
leetcode 前K个高频单词
关于编程本质那些事
Dump file generation, content, and analysis
只会懒汉式和饿汉式 你还不懂单例模式!
rhel7.0解决yum无法使用(system is not registered to Red Hat Subscription Management)
“蔚来杯“2022牛客暑期多校训练营3 DF题解
ADC和DAC记录
数据分析面试手册《SQL篇》
word 设置标题前分页
还在用 Xshell?你 out 了,推荐一个更现代的终端连接工具,好用到爆!
Apache Commons Configuration Remote Code Execution Vulnerability (CVE-2022-33980) Analysis & Reproduction
【C语言】探索数据的存储(整形篇)
Single-chip human-computer interaction--matrix key
时间戳转换为日期格式、获取当前时间戳
Software protection scenario of NOR FLASH flash memory chip ID application
[Data Visualization] Chart Design Principles
成功解决raise TypeError(‘Unexpected feature_names type‘)TypeError: Unexpected feature_names type
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 DGHJKL Problem Solution
Which foreign language journals and conferences can be submitted for software engineering/system software/programming language?
input输入框超出部分用省略号表示以及判断内容是否有超出(PC端)