Redis-命令操作Redis->redis简介,redis的安装(Linux版本&windows版本),redis的命令

简介: Redis-命令操作Redis->redis简介,redis的安装(Linux版本&windows版本),redis的命令
  • redis简介
  • redis的安装(Linux版本&windows版本)
  • redis的命令

1.redis简介

Redis是一个开源(BSD许可),内存存储的数据结构服务器,可用作数据库,高速缓存和消息队列代理。

  它支持字符串、哈希表、列表、集合、有序集合,位图,hyperloglogs等数据类型。内置复制、Lua脚本、LRU收回、事务以及不同级别磁盘持久化功能,

  同时通过Redis Sentinel提供高可用,通过Redis Cluster提供自动分区


NO-SQL数据库:

ROM 256g RAM 16g 基于内存,性能高一些

数据是以键值对的形式存储,可以堪称map的高级版,数据之间没有关系,非关系型数据库

redis:基于内存

ehcache: 基于文件

mongodb: 基于文档

sgl数据库:

SQL server、MySQL、oracle 硬盘,性能有待提升

数据是以表的形式存储,表与表之间存在主外键关系,数据与数据存在关系

redis常见的键类型有5种

string/hash/list/set/zset(sort set)


2.redis的安装(Linux版本&windows版本)

Linux版本

1.解压redis

tar -zxvf redis-5.0.0.tar.gz -C /usr/local/

#2.安装gcc

yum install gcc

#3.编译redis

cd /redis-5.0.0

make

#4.检测安装情况

make install

#5.修改redis.conf文件

cp redis.conf redis_bak.conf

将daemonize no 改为 daemonize yes

#6.启动redis

./redis-server ../redis.conf

#7.测试redis启动是否成功

./redis-cli

ping

#附录

# Linux在文件中查找关键字

vim xxx.conf

先"/" 然后"关键字" 再enter;"n"指找下一个

#查看redis进程:

ps -ef | grep redis

yum install -y lsof

lsof -i:6379

#杀掉redis进程:kill -9 进程pid

以上为无密码链接,修改为有密码,并且外部访问的方式如下

#1.修改redis.conf

注释:bind 127.0.0.1

修改:requirepass 123456

#2.杀掉redis进程

#3.启动redis.conf的新配置

./src/redis-server redis.conf

#4.客户端redis-cli链接redis,重新测试

./src/redis-cli -h 127.0.0.1 -p 6379 -a 123456
ping
select 1
#5.redismanager链接测试成功

windows版本

3.redis的命令

有序集合(sort set)

Redis 有序集合(sorted set)_w3cschool

目录
相关文章
|
4月前
|
安全 Linux 生物认证
Nexpose 8.25.0 for Linux & Windows - 漏洞扫描
Nexpose 8.25.0 for Linux & Windows - 漏洞扫描
197 0
Nexpose 8.25.0 for Linux & Windows - 漏洞扫描
|
4月前
|
安全 Linux iOS开发
Binary Ninja 5.1.8104 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
Binary Ninja 5.1.8104 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
502 53
Binary Ninja 5.1.8104 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
|
4月前
|
安全 Linux 生物认证
Nexpose 8.24.0 for Linux & Windows - 漏洞扫描
Nexpose 8.24.0 for Linux & Windows - 漏洞扫描
263 17
Nexpose 8.24.0 for Linux & Windows - 漏洞扫描
|
4月前
|
Linux API iOS开发
Binary Ninja 4.2.6455 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
Binary Ninja 4.2.6455 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
342 14
Binary Ninja 4.2.6455 (macOS, Linux, Windows) - 反编译器、反汇编器、调试器和二进制分析平台
|
4月前
|
SQL 安全 Linux
Metasploit Pro 4.22.8-20251014 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-20251014 (Linux, Windows) - 专业渗透测试框架
253 1
Metasploit Pro 4.22.8-20251014 (Linux, Windows) - 专业渗透测试框架
|
4月前
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.95 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.95 (macOS, Linux, Windows) - 开源渗透测试框架
362 1
Metasploit Framework 6.4.95 (macOS, Linux, Windows) - 开源渗透测试框架
|
4月前
|
Linux 虚拟化 iOS开发
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
949 0
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
|
4月前
|
开发框架 安全 .NET
Microsoft .NET Framework 3.5、4.5.2、4.8.1,适用于 Windows 版本的 .NET,Microsoft C Runtime等下载
.NET Framework是Windows平台的开发框架,包含CLR和FCL,支持多种语言开发桌面、Web应用。常用版本有3.5、4.5.2、4.8.1,系统可同时安装多个版本,确保软件兼容运行。
1019 0
Microsoft .NET Framework 3.5、4.5.2、4.8.1,适用于 Windows 版本的 .NET,Microsoft C Runtime等下载
|
4月前
|
Linux iOS开发 计算机视觉
GIMP 3.0.6 (Linux, macOS, Windows) 发布 - 免费开源图像编辑器
GIMP 3.0.6 (Linux, macOS, Windows) 发布 - 免费开源图像编辑器
369 0
|
5月前
|
数据管理 Linux iOS开发
Splunk Enterprise 9.4.5 (macOS, Linux, Windows) - 机器数据管理和分析
Splunk Enterprise 9.4.5 (macOS, Linux, Windows) - 机器数据管理和分析
181 0