当前位置:网站首页>【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]#
边栏推荐
- 5. PCIe official example
- Difference between MBps and Mbps
- 2021年11月网络规划设计师上午题知识点(下)
- Getting Started with Kubernetes Networking
- 软件测试面试题:网络七层协仪具体?
- 新唐NUC980使用记录:在用户应用中使用GPIO
- 软件测试面试题:您以往所从事的软件测试工作中,是否使用了一些工具来进行软件缺陷(Bug)的管理?如果有,请结合该工具描述软件缺陷(Bug)跟踪管理的流程?
- Software Testing Interview Questions: What is Software Testing?The purpose and principle of software testing?
- sqlite--nested exception is org.apache.ibatis.exceptions.PersistenceException:
- 软件测试面试题:LoadRunner 分为哪三个模块?
猜你喜欢

CNI (Container Network Plugin)

OPENWIFI实践1:下载并编译SDRPi的HDL源码

linux(centOs7)部署mysql(8.0.20)数据库

LiveVideoStackCon 2022 Shanghai Station opens tomorrow!

Getting Started with Kubernetes Networking

Redis visual management software Redis Desktop Manager2022

进程间通信和线程间通信

Interview summary: Why do interviewers in large factories always ask about the underlying principles of Framework?

【FreeRTOS】FreeRTOS与stm32内置堆栈的占用情况

数仓4.0(三)------数据仓库系统
随机推荐
OPENWIFI实践1:下载并编译SDRPi的HDL源码
oracle create user
Software Testing Interview Questions: Qualifying Criteria for Software Acceptance Testing?
Kubernetes 网络入门
软件测试面试题:软件测试类型都有哪些?
Software testing interview questions: Please draw the seven-layer network structure diagram of OSI and the four-layer structure diagram of TCP/IP?
蓝牙Mesh系统开发五 ble mesh设备增加与移除
2022牛客多校训练第二场 H题 Take the Elevator
Software Testing Interview Questions: What's the Difference Between Manual Testing and Automated Testing?
2022 Nioke Multi-School Training Session H Question H Take the Elevator
ora-00604 ora-02429
GCC:头文件和库文件的路径
2022牛客多校第三场 J题 Journey
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?
二叉树[全解](C语言)
Activity Recommendation | Kuaishou StreamLake Brand Launch Conference, witness together on August 10!
跨域解决方案
ORA-00257
ora-01105 ora-03175
软件测试面试题:LoadRunner 分为哪三个模块?