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用來進行基準測試編譯

相關文章
相關標籤/搜索