当前位置:网站首页>【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]#
边栏推荐
- 4. PCIe 接口时序
- After the staged testing is complete, have you performed defect analysis?
- 数仓4.0(三)------数据仓库系统
- tiup telemetry
- 2022牛客多校第三场 J题 Journey
- 2022牛客多校训练第二场 J题 Link with Arithmetic Progression
- Software testing interview questions: What are the strategies for system testing?
- leetcode: 269. The Martian Dictionary
- 软件测试面试题:您以往所从事的软件测试工作中,是否使用了一些工具来进行软件缺陷(Bug)的管理?如果有,请结合该工具描述软件缺陷(Bug)跟踪管理的流程?
- 阶段性测试完成后,你进行缺陷分析了么?
猜你喜欢
Lattice PCIe 学习 1
QSunSync Qiniu cloud file synchronization tool, batch upload
二叉树[全解](C语言)
Inter-process communication and inter-thread communication
Activity Recommendation | Kuaishou StreamLake Brand Launch Conference, witness together on August 10!
Getting Started with Kubernetes Networking
2022杭电多校第三场 K题 Taxi
ORA-01105 ORA-03175
JUC thread pool (1): FutureTask use
Memory Forensics Series 1
随机推荐
Matlab uses plotting method for data simulation and simulation
2022多校第二场 K题 Link with Bracket Sequence I
Interview summary: Why do interviewers in large factories always ask about the underlying principles of Framework?
OPENWIFI实践1:下载并编译SDRPi的HDL源码
活动推荐 | 快手StreamLake品牌发布会,8月10日一起见证!
Bit rate vs. resolution, which one is more important?
GCC: paths to header and library files
ORA-00604 ORA-02429
蓝牙Mesh系统开发四 ble mesh网关节点管理
Software testing interview questions: What are the seven-layer network protocols?
Software Testing Interview Questions: What do test cases usually include?
"No title"
oracle create tablespace
PCIe 核配置
2021年11月网络规划设计师上午题知识点(上)
2022杭电多校训练第三场 1009 Package Delivery
Software testing interview questions: What stages should a complete set of tests consist of?
ora-00604 ora-02429
软件测试面试题:系统测试的策略有?
GCC:编译时库路径和运行时库路径