遇事不决 上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,简直就是百科全书,包括安装、简单使用、常用命令等。
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 ManagerRedis 内部
直接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 高可用组件
网友评论