【Redis】Redis安裝及常見問題

來源:互聯網
上載者:User

1、解壓:tar -zxvf redis-3.0.0.tar.gz
2、ll
3、cd redis-3.0.0
編譯時間必須有makefile

4、make

[root@localhost redis-3.0.0]# makecd src && make allmake[1]: 進入目錄“/usr/java/redis-3.0.0/src”    CC adlist.oIn file included from adlist.c:34:0:zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個檔案或目錄編譯中斷。make[1]: *** [adlist.o] 錯誤 1make[1]: 離開目錄“/usr/java/redis-3.0.0/src”make: *** [all] 錯誤 2

解決:make MALLOC=libc
參考連結:http://blog.csdn.net/honchou56/article/details/53994708

5、make install PREFIX=/usr/local/redis
     安裝,設定安裝路徑(PREFIX)

6、cd /usr/local/redis/bin路徑下執行:./redis-server
     按ctrl+c退出

7、將redis.conf複製到目前的目錄下
[root@localhost bin]# cp /usr/java/redis-3.0.0/redis.conf .
[root@localhost bin]# ll
總用量 3316
-rw-r–r–. 1 root root 18 1月 20 18:43 dump.rdb
-rwxr-xr-x. 1 root root 289504 1月 20 18:33 redis-benchmark
-rwxr-xr-x. 1 root root 25165 1月 20 18:33 redis-check-aof
-rwxr-xr-x. 1 root root 56012 1月 20 18:33 redis-check-dump
-rwxr-xr-x. 1 root root 417979 1月 20 18:33 redis-cli
-rw-r–r–. 1 root root 41403 1月 20 18:53 redis.conf
lrwxrwxrwx. 1 root root 12 1月 20 18:33 redis-sentinel -> redis-server
-rwxr-xr-x. 1 root root 2546423 1月 20 18:33 redis-server

8、編輯conf:vim redis.conf
     改為yes,在後台運行

9、進程是否啟動:
     ps aux|grep redis

10、連結的伺服器:

./redis-cliping    如果指定ip和連接埠號碼:./redis-cli -h 192.168.25.100 -p 6379

總結:
      redis安裝,希望能幫到您。

感謝您的閱讀。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.