Redis安裝(CentOS7/tar.gz)

來源:互聯網
上載者:User

標籤:

1. 將安裝包redis-3.2.0.tar.gz上傳到linux系統,位置隨意。

2. 解壓檔案

tar -zxf redis-3.2.0.tar.gz

3. 解壓後會在目前的目錄組建檔案夾“redis-3.2.0”,將其拷貝到"/usr/local/"下,我比較習慣將軟體安裝到這個目錄。

# 非root使用者,在命令前加sudocp -rf ./redis-3.2.0 /usr/local/redis

4. 進入目錄,執行make

cd /usr/local/redis/#非root使用者,在命令前加sudomake

若提示"/bin/sh: cc: command not found",說明系統中沒有安裝gcc,可使用如下命令安裝

#非root使用者,在命令前加sudoyum -y install gcc

安裝成功後,再次執行make命令。

若提示"zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory",則執行

make MALLOC=libc

5. 我這邊便沒有報別的錯誤了,顯示結果如下,安裝成功

提示運行"make test"命令,不過執行時會報錯,如下

You need tcl 8.5 or newer in order to run the Redis test

可安裝tcl後再執行"make test"就沒有錯了,安裝tcl方式如下

yum -y install tcl

6. 啟動

./src/redis-server --protected-mode no &

啟動後,可使用命令列

./src/redis-cli

 

Redis安裝(CentOS7/tar.gz)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.