当前位置:网站首页>【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]#
边栏推荐
- 自定义线程池
- PCIe 核配置
- 2022牛客多校训练第二场 L题 Link with Level Editor I
- 4. PCIe 接口时序
- 2022杭电多校训练第三场 1009 Package Delivery
- tensor.nozero(),面具,面具
- Software Testing Interview Questions: What's the Difference Between Manual Testing and Automated Testing?
- 2022杭电多校第三场 K题 Taxi
- BC(转)[js]js计算两个时间相差天数
- 软件测试面试题:黑盒测试、白盒测试以及单元测试、集成测试、系统测试、验收测试的区别与联系?
猜你喜欢
ora-01105 ora-03175
How DHCP works
MongoDB construction and basic operations
LiveVideoStackCon 2022 上海站明日开幕!
SV class virtual method of polymorphism
从一次数据库误操作开始了解MySQL日志【bin log、redo log、undo log】
Countdown to 1 day!From August 2nd to 4th, I will talk with you about open source and employment!
QSunSync Qiniu cloud file synchronization tool, batch upload
阶段性测试完成后,你进行缺陷分析了么?
新唐NUC980使用记录:在用户应用中使用GPIO
随机推荐
新唐NUC980使用记录:在用户应用中使用GPIO
Software testing interview questions: test life cycle, the test process is divided into several stages, and the meaning of each stage and the method used?
软件测试面试题:负载测试、容量测试、强度测试的区别?
ora-00604 ora-02429
Opencv——视频跳帧处理
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionExcep
CNI (Container Network Plugin)
torch.autograd.grad求二阶导数
TinyMCE disable escape
软件测试面试题:软件都有多少种分类?
matlab 采用描点法进行数据模拟和仿真
2022 Nioke Multi-School Training Session H Question H Take the Elevator
工具类总结
GCC: Shield dependencies between dynamic libraries
金九银十面试跳槽季;你准备好了吗?
leetcode: 269. The Martian Dictionary
OPENWIFI实践1:下载并编译SDRPi的HDL源码
4. PCIe 接口时序
2022 Hangzhou Electric Multi-School Training Session 3 1009 Package Delivery
Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”