Redis 下载安装
•
数据库
一、redis介绍
redis官网地址:http://www.redis.cn/
- Redis是当前比较热门的NoSQL系统之一
- 它是一个开源的、使用ANSI C语言编写的key-value存储系统(区别于MySQL的二维表格形式存储)
- 和Memcache类似,但很大程度补偿了Memcache的不足,Redis数据都是缓存在计算机内存中,不同的是,Memcache只能将数据缓存到内存中,无法自动定期写入硬盘,这就表示,一断电或重启,内存清空,数据丢失
二、Windows版Redis安装
3.2.100版本下载地址:https://github.com/microsoftarchive/redis/releases

5.0.14版本下载地址:https://github.com/tporadowski/redis/releases

Windows版的安装比较简单,解压Redis压缩包完成即安装完毕,安装的注意事项:
-
解压的目录不要有中文
-
目录结构层次不要太深
-
硬盘空间剩余空间最少要大于你的内存空间,建议20G以上
Redis 目录结构:

Redis 服务启动与关闭:
1、启动服务器:cmd redis-server.exe redis.windows.conf 2、默认端口号:6379 3、关闭服务器:直接关闭窗口

运行【redis-cli.exe】客户端:

三、Linux版Redis安装
2.1 下载redis安装包
cd /export/software wget http://download.redis.io/releases/redis-6.2.6.tar.gz
2.2 解压redis压缩包到指定目录
tar -zxvf redis-6.2.6.tar.gz -C ./
2.3 安装C程序运行环境
yum -y install gcc-c++
2.4 安装tcl
yum -y install tcl
2.5 编译redis
cd /export/software/redis-6.2.6/ #或者使用命令 make 进行编译 make MALLOC=libc make test && make install PREFIX=/export/server/redis-6.2.6
修改redis配置文件
cd /export/server/redis-6.2.6/ mkdir -p /export/server/redis-6.2.6/log mkdir -p /export/server/redis-6.2.6/data vim redis.conf # 1.注释第61行 #bind localhost # 2.将保护模式关闭 protected-mode no protected-mode no # 3.修改第128行 后台 daemonize yes # 4.修改第163行 logfile "/export/server/redis-6.2.6/log/redis.log" # 5.修改第247行 dir /export/server/redis-6.2.6/data
2.6 启动redis
cd /export/server/redis-6.2.6/ bin/redis-server redis.conf
2.7 关闭redis
bin/redis-cli -h localhost shutdown
2.8 连接redis客户端
cd /export/server/redis-6.2.6/ bin/redis-cli -h localhost
四、Redis Desktop Manager
一款基于Qt5的跨平台Redis桌面管理软件,支持:Windows 7+、Mac OS X 10.10+、 Ubuntu 14+,特点: C++ 编写,响应迅速,性能好
下载地址:https://github.com/RedisInsight/RedisDesktopManager/releases

安装客户端,连接Redis服务:

注意:Redis Desktoo Manager老版本免费,新版本收费
本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/4a82ed83d4.html
