当前位置:网站首页>【Redis】Linux下Redis安装
【Redis】Linux下Redis安装
2022-08-05 00:52:00 【Cxj__】
Redis安装(Linux)
下载地址
https://redis.io/download/
(下载版本:7.0.4)
将压缩包解压放至opt目录下
tar -zvxf redis-7.0.4.tar.gz
mv redis-7.0.4 /opt
进入/opt/redis-7.0.4目录
make
make install

进入/usr/local/bin目录
发现目录下出现了一些redis文件
拷贝配置文件
在/usr/local/bin目录下新建一个cxj_config目录放置配置文件
将/opt/redis-7.0.4/redis.conf复制到文件夹cxj_config中
mkdir cxj_config
cp /opt/redis-7.0.4/redis.conf /usr/local/bin/cxj_config
修改配置文件
将/usr/local/bin/cxj_config/redis.conf中daemonize no改为daemonize yes(开启守护进程模式,可以让redis在后台运行)
保存退出
启动redis服务
cd /usr/local/bin
redis-server cxj_config/redis.conf
redis客户端连接
redis-cli -p 6379
查看redis进程是否开启
[[email protected] bin]# ps -ef|grep redis
root 9269 9216 0 02:36 pts/0 00:00:00 redis-cli -p 6379
root 10113 1 0 03:06 ? 00:00:00 redis-server 127.0.0.1:6379
root 10125 9910 0 03:07 pts/2 00:00:00 grep --color=auto redis
测试连接
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set user chandler
OK
127.0.0.1:6379> get user
"chandler"
127.0.0.1:6379> keys *
1) "user"
关闭连接
127.0.0.1:6379> shutdown
not connected> exit
[[email protected] bin]#
边栏推荐
- B站7月榜单丨飞瓜数据B站UP主排行榜发布!
- The principle of NMS and its code realization
- PCIe Core Configuration
- 2022 Nioke Multi-School Training Session H Question H Take the Elevator
- Software Testing Interview Questions: About Automated Testing Tools?
- Lattice PCIe Learning 1
- torch.autograd.grad finds the second derivative
- GCC:屏蔽动态库之间的依赖
- Software testing interview questions: the difference and connection between black box testing, white box testing, and unit testing, integration testing, system testing, and acceptance testing?
- 软件测试面试题:设计测试用例时应该考虑哪些方面,即不同的测试用例针对那些方面进行测试?
猜你喜欢

oracle create user

Dynamic Programming/Knapsack Problem Summary/Summary - 01 Knapsack, Complete Knapsack

Helm Chart

创意代码表白

B站7月榜单丨飞瓜数据B站UP主排行榜发布!

从一次数据库误操作开始了解MySQL日志【bin log、redo log、undo log】

"WEB Security Penetration Testing" (28) Burp Collaborator-dnslog out-band technology

码率vs.分辨率,哪一个更重要?

Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”

4. PCIe interface timing
随机推荐
Software Testing Interview Questions: What is Software Testing?The purpose and principle of software testing?
Difference between MBps and Mbps
ORA-00257
ora-01105 ora-03175
leetcode: 269. The Martian Dictionary
软件测试面试题:软件都有多少种分类?
软件测试面试题:一套完整的测试应该由哪些阶段组成?
仅3w报价B站up主竟带来1200w播放!品牌高性价比B站投放标杆!
tiup status
GCC:屏蔽动态库之间的依赖
2022牛客多校训练第二场 H题 Take the Elevator
GCC: paths to header and library files
Software Testing Interview Questions: About Automated Testing Tools?
Software testing interview questions: What is the difference between load testing, capacity testing, and strength testing?
E - Many Operations (bitwise consideration + dp thought to record the result after the operation
执掌图表
torch.autograd.grad求二阶导数
Helm Chart
软件测试面试题:您以往所从事的软件测试工作中,是否使用了一些工具来进行软件缺陷(Bug)的管理?如果有,请结合该工具描述软件缺陷(Bug)跟踪管理的流程?
2022杭电多校第三场 K题 Taxi