美文网首页
在mac上玩Redis

在mac上玩Redis

作者: 我叫何家明 | 来源:发表于2022-01-26 07:23 被阅读0次

遇事不决 上Redis官网

官方介绍 Redis is often referred as a data structures server. What this means is that Redis provides access to mutable data structures via a set of commands, which are sent using a server-client model with TCP sockets and a simple protocol. So different processes can query and modify the same data structures in a shared way.

Quick Start

https://redis.io/topics/quickstart
直接进下载页面,下载mac对应的redis,解压后,看最外层的README.md,简直就是百科全书,包括安装、简单使用、常用命令等。

image.png

install

进入文件夹

make install

运行

cd src
./redis-server
# 走配置
# ./redis-server /path/to/redis.conf
# 执行参数
# ./redis-server --port 9999 --replicaof 127.0.0.1 6379
image.png

执行命令

新开一个tab页面,敲击命令,这里可以看到还有语法提示。

cd src
./redis-cli
image.png

mac redis 客户端

Redis Desktop Manager

Redis 内部

直接copy了,原汁原味,redis内部的每个文件夹作用

  • src: contains the Redis implementation, written in C.
  • tests: contains the unit tests, implemented in Tcl.
  • deps: contains libraries Redis uses. Everything needed to compile Redis is inside this directory; your system just needs to provide libc, a POSIX compatible interface and a C compiler. Notably deps contains a copy of jemalloc, which is the default allocator of Redis under Linux. Note that under deps there are also things which started with the Redis project, but for which the main repository is not antirez/redis. An exception to this rule is deps/geohash-int which is the low level geocoding library used by Redis: it originated from a different project, but at this point it diverged so much that it is developed as a separated entity directly inside the Redis repository.

src目录中已经带有了redis-sentinel 高可用组件

相关文章

网友评论

      本文标题:在mac上玩Redis

      本文链接:https://www.haomeiwen.com/subject/naoghrtx.html