Redis之如何安装Redis

1.下载Redis版本

    下载连接在这里,http://download.redis.io/releases/redis

2.解压

    执行以下命令,以下List-1bash

    List-1测试

tar -zxvf redis-3.2.10.tar.gz

3.进入redis目录,执行命令

    List-2spa

cd redis-3.2.10
sudo make test

4.执行install命令

    编译安装,以下code

    List-3server

sudo make install

5.查看结果

    List-4get

mjduan@mjduandeMacBook-Pro:/opt/software/code-tool/redis-3.2.10 % ll src/redis-*
-rwxr-xr-x  1 root    wheel    94K  9  2 23:20 src/redis-benchmark
-rw-r--r--@ 1 mjduan  wheel    29K  7 28  2017 src/redis-benchmark.c
-rw-r--r--  1 root    wheel    44K  9  2 23:20 src/redis-benchmark.o
-rwxr-xr-x  1 root    wheel    14K  9  2 23:16 src/redis-check-aof
-rw-r--r--@ 1 mjduan  wheel   6.2K  7 28  2017 src/redis-check-aof.c
-rw-r--r--  1 root    wheel    15K  9  2 23:16 src/redis-check-aof.o
-rwxr-xr-x  1 root    wheel   1.0M  9  2 23:20 src/redis-check-rdb
-rw-r--r--@ 1 mjduan  wheel    12K  7 28  2017 src/redis-check-rdb.c
-rw-r--r--  1 root    wheel    17K  9  2 23:16 src/redis-check-rdb.o
-rwxr-xr-x  1 root    wheel   159K  9  2 23:20 src/redis-cli
-rw-r--r--@ 1 mjduan  wheel    89K  7 28  2017 src/redis-cli.c
-rw-r--r--  1 root    wheel   139K  9  2 23:20 src/redis-cli.o
-rwxr-xr-x  1 root    wheel   1.0M  9  2 23:20 src/redis-sentinel
-rwxr-xr-x  1 root    wheel   1.0M  9  2 23:16 src/redis-server
-rwxr-xr-x@ 1 mjduan  wheel    59K  7 28  2017 src/redis-trib.rb

    如List-4所示,在src目录下,有咱们须要的可执行文件io

    注:redis-server用来启动服务、redis-cli用来链接redis server(这个命令能够加参数,如-h、-p、-a等,用于链接远程或者本地)、redis-sentinel与哨兵机制有关、redis-benchmark用来进行基准测试编译

相关文章
相关标签/搜索