CentOS安裝Redis3.0.7

來源:互聯網
上載者:User

標籤:

查看安裝環境:

[[email protected] ~]# cat /proc/version
Linux version 2.6.32-573.22.1.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Wed Mar 23 03:35:39 UTC 2016

[[email protected] ~]# cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m

 

1、下載、解壓、編譯

下載:

[[email protected] ~]# cd /usr/local/
[[email protected] local]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz
--2016-03-29 18:58:36--  http://download.redis.io/releases/redis-3.0.7.tar.gz
正在解析主機 download.redis.io... 109.74.203.151
正在串連 download.redis.io|109.74.203.151|:80...

解壓:

[[email protected] ~]# tar xzf redis-3.0.7.tar.gz

編譯:

[[email protected] redis-3.0.7]# cd redis-3.0.7

[[email protected] redis-3.0.7]# make

2、編譯好的二進位檔案(即我們的redis程式)在redis-3.0.7檔案夾下的src目錄下

啟動服務:

[[email protected] ~]# cd src

[[email protected] src]# ./redis-server

出現如上介面,說明服務啟動成功。

3、測試

始用用戶端串連:

[[email protected] src]# ./redis-cli
127.0.0.1:6379> keys *
(empty list or set)

添加、擷取資料:

127.0.0.1:6379> set username slov7ch
OK
127.0.0.1:6379> get username
"slov7ch"
127.0.0.1:6379>

CentOS安裝Redis3.0.7

相關文章

聯繫我們

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