首页 > 数据库 >Redis(REmote DIctionary Server)基础

Redis(REmote DIctionary Server)基础

时间:2024-07-23 19:18:29浏览次数:17  
标签:epel REmote cn DIctionary Redis yinzhengjie org root

Redis(REmote DIctionary Server)基础

  Redis是一个开放源代码(BSD许可)的内存数据结构存储,用作数据库、缓存和消息代理。它支持字符串、哈希、列表、集合、带范围查询的排序集合、位图、超日志、带半径查询和流的地理空间索引等数据结构。Redis具有内置的复制、Lua脚本、LRU收回、事务和不同级别的磁盘上持久性,并通过Redis Sentinel和Redis群集的自动分区提供高可用性。官方地址:https://redis.io/

  在生产环境中Redis一般有三种用途,可以用作数据库(Database),缓存(Cache),消息队列(Message Queue)。因此不关你是开发还是运维人员,学习一下Redis还是很有必要的!

一.安装Redis

1.本篇博客操作环境介绍

[[email protected] ~]# 
[[email protected] ~]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
[[email protected] ~]# 
[[email protected] ~]# uname -r
3.10.0-957.el7.x86_64
[[email protected] ~]# 
[[email protected] ~]# uname -m
x86_64
[[email protected] ~]# 
[[email protected] ~]#

2.安装epel源

安装epel源
[[email protected] ~]# ll /etc/yum.repos.d/        #安装epel源之前
total 4
drwxr-xr-x. 2 root root   30 Mar 23 22:29 back
-rw-r--r--. 1 root root 2523 Mar 23 22:26 CentOS-Base.repo
drwxr-xr-x. 2 root root  187 Mar 23 22:26 default
[[email protected] ~]# 

[[email protected] ~]# yum -y install epel-release

[[email protected] ~]# ll /etc/yum.repos.d/        #安装epel源之后,会生成2个文件
total 12
drwxr-xr-x. 2 root root   30 Mar 23 22:29 back
-rw-r--r--. 1 root root 2523 Mar 23 22:26 CentOS-Base.repo
drwxr-xr-x. 2 root root  187 Mar 23 22:26 default
-rw-r--r--  1 root root  951 Oct  2  2017 epel.repo
-rw-r--r--  1 root root 1050 Oct  2  2017 epel-testing.repo
[[email protected] ~]# 

3.利用epel源安装Redis服务

yum info redis       #查看Redis安装包的相应信息
[[email protected] ~]# 
[[email protected] ~]# yum info redis
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                   | 5.8 kB  00:00:00     
 * base: mirrors.aliyun.com
 * epel: mirrors.yun-idc.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
epel                                                                                                                   | 4.7 kB  00:00:00     
(1/3): epel/x86_64/group_gz                                                                                            |  88 kB  00:00:00     
epel/x86_64/updateinfo         FAILED                                          
https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/27797f54681404f3261395d766df370206f7d92cd3e1551a698663a6317d5c5a-updateinfo.xml.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

(2/3): epel/x86_64/updateinfo                                                                                          | 1.0 MB  00:00:00     
(3/3): epel/x86_64/primary_db                                                                                          | 6.6 MB  00:00:06     
Available Packages
Name        : redis
Arch        : x86_64
Version     : 3.2.12
Release     : 2.el7
Size        : 544 k
Repo        : epel/x86_64
Summary     : A persistent key-value database
URL         : http://redis.io
License     : BSD
Description : Redis is an advanced key-value store. It is often referred to as a data
            : structure server since keys can contain strings, hashes, lists, sets and
            : sorted sets.
            : 
            : You can run atomic operations on these types, like appending to a string;
            : incrementing the value in a hash; pushing to a list; computing set
            : intersection, union and difference; or getting the member with highest
            : ranking in a sorted set.
            : 
            : In order to achieve its outstanding performance, Redis works with an
            : in-memory dataset. Depending on your use case, you can persist it either
            : by dumping the dataset to disk every once in a while, or by appending
            : each command to a log.
            : 
            : Redis also supports trivial-to-setup master-slave replication, with very
            : fast non-blocking first synchronization, auto-reconnection on net split
            : and so forth.
            : 
            : Other features include Transactions, Pub/Sub, Lua scripting, Keys with a
            : limited time-to-live, and configuration settings to make Redis behave like
            : a cache.
            : 
            : You can use Redis from most programming languages also.

[[email protected] ~]# 


标签:epel,REmote,cn,DIctionary,Redis,yinzhengjie,org,root
From: https://www.cnblogs.com/luay/p/18318970

相关文章

  • Spring Boot 如何引入redis并实际运用
    1.增加依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency>2.程序入口初始化Beanimportorg.springframework.w......
  • Redis-10大数据类型理解与测试
    Redis10大数据类型我要打10个1.redis字符串(String)2.redis列表(List)3.redis哈希表(Hash)4.redis集合(Set)5.redis有序集合(ZSet)6redis地理空间(GEO)7.redis基数统计(HyperLogLog)8.redis位图(bitmap)9.redis位域(bitfield)10.redis流(Stream)官网地址Redis键(key)常......
  • [转]从SQLite到Redis:探索C++与多种数据库的交互之道
    转自:【C++风云录】从SQLite到Redis:探索C++与多种数据库的交互之道开启数据库之旅:通过C++与各种数据库交互,事半功倍1.SQLite1.1简介SQLite是一个嵌入式关系型数据库管理系统,提供了一个轻量级的C++接口。它是一个开源的软件库,无需配置服务器或安装管理工具,可以直接在程序中使......
  • swift 混编OC 使用OC NSDictionary
     OC属性@property(nonatomic,strong)NSDictionary*_NullableextraData; swift使用打印Dictionary<AnyHashable,Any>(lldb)poextraData▿Optional<Dictionary<AnyHashable,Any>>▿some:2elements▿0:2elements▿key:An......
  • Redis常见面试题汇总
    1.Redis中的底层数据结构String(字符串、整数或浮点数):String是Redis最基本的数据类型,一个key对应一个value,value的最大值为512MString类型是二进制安全的(原理在2),意味着redis可以包含任何数据,如图片、视频(可以转换为二进制编码)和序列化对象List(列表):redis列表是简单的字符......
  • laravel: 指定redis缓存项的前缀
    一,laravel默认会为缓存项添加前缀:config/database.php中:'redis'=>['client'=>env('REDIS_CLIENT','phpredis'),'options'=>['cluster'=>env('REDIS_CLU......
  • redis主从复制实现
    redis持久化:RDB持久化: 可以在执行的时间间隔内生成数据集的时间点快照(point-in-timesnapshot),新快照会覆盖老快照。 优点: 速度快,适合于用于做备份,主从复制也是基于RDB持久化功能实现的。 缺点: 会有数据丢失。 #配置RDB持久化策略 save9001 save30010 save......
  • 智能停车场系统--前后端分离(可直接落地)使用数据:vue,springBoot,redis,mybatis,mysql等
    系统首页-统计停车车收费收费数据展示实现代码:对菜单控制代码@AutowiredprivateMenuServicemenuService;@AutowiredprivateRoleMenuServiceroleMenuService;@GetMapping("/list")publicResultlist(){List<MenuRoleVO>menuRoleList=this.menuServi......
  • org.springframework.beans.factory.BeanCreationException: Error creating bean wit
    场景:springcloud的服务service-order 启动和运行正常application.yml内容server:port:8007servlet:context-path:/service-orderspring:cloud:nacos:discovery:server-addr:192.168.56.30:8848application:name:service-......
  • 【Remotery】 Remotery-轻量级的远程实时 CPU/GPU 分析器设计浅析
    1.Remotery简介Remotery是一个轻量级的远程实时CPU/GPU分析器,主要用于监控CPU和GPU上多线程的活动。它提供了一个C文件,可以很容易的集成到项目中,并配置一个实时监控的Web界面,可以通过远程观察和分析程序的性能,适用于监控游戏的实时运行性能和分析移动端应用的性能场景。2.Remot......