mac 下简单安装reids

下载
redis-3.0.7.tar.gz

官网地址:http://redis.io/download

解压

tar -zvxf redis-3.0.7.tar.gz

将解压后的文件夹放到 /usr/local目录下

编译测试
接下来在终端中切换到/usr/local/redis目录下,输入:

sudo make test

备注:如果mac上没有xcode,会下载编译包,点击下载即可

显示结果:

  43 seconds - integration/replication-4
  28 seconds - unit/obuf-limits
  48 seconds - integration/replication
  111 seconds - integration/replication-psync

\o/ All tests passed without errors!

Cleanup: may take some time... OK

\o/ All tests passed without errors!

编译安装:在终端中输入命令:

sudo make install

显示结果:

cd src && /Library/Developer/CommandLineTools/usr/bin/make install
    INSTALL redis-sentinel
    CC redis-cli.o
    LINK redis-cli
    CC redis-benchmark.o
    LINK redis-benchmark
    CC redis-check-dump.o
    LINK redis-check-dump

Hint: It's a good idea to run 'make test' ;)

    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install

启动Redis,输入命令

redis-server

显示结果:

           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 3.0.7 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 11715
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'
    原文作者:asoren
    原文地址: https://segmentfault.com/a/1190000007947539
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞