編譯安裝Redis Stable最新版本

來源:互聯網
上載者:User

編譯安裝Redis Stable最新版本

目前REDIS已經升級到3.0.5為最穩定版本,但很多系統源沒有更新,所以在這裡進行編譯安裝

適合所有系統

#wget
#tar xvf redis-stable
#cd redis-stable
#make
#make install
安裝後我們進行配置
 
#cd utils
#./install_server.sh
這裡會根據需要進行配置,我的配置如下:
連接埠:6379
配置路徑:/etc/redis/redis.conf
資料存放路徑:/var/lib/redis/
註冊服務:redis-server
 
Welcome to the redis service installer
This script will help you easily set up a running redis server
 
Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf] /etc/redis/redis.conf
Please select the redis log file name [/var/log/redis_6379.log]
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379] /var/lib/redis/
Please select the redis executable path [/usr/local/bin/redis-server]
Selected config:
Port          : 6379
Config file    : /etc/redis/redis.conf
Log file      : /var/log/redis_6379.log
Data dir      : /var/lib/redis/
Executable    : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
insserv: warning: script 'K01redis' missing LSB tags
insserv: warning: script 'redis' missing LSB tags
insserv: warning: script 'haproxy' missing LSB tags
insserv: Default-Start undefined, assuming default start runlevel(s) for script `haproxy'
insserv: Service network is missed in the runlevels 4 to use service redis_6379
redis_6379                0:off  1:off  2:on  3:on  4:on  5:on  6:off
Successfully added to chkconfig!
insserv: warning: script 'K01redis' missing LSB tags
insserv: warning: script 'redis' missing LSB tags
insserv: warning: script 'haproxy' missing LSB tags
insserv: Default-Start undefined, assuming default start runlevel(s) for script `haproxy'
insserv: warning: script 'K01redis' missing LSB tags
insserv: warning: script 'redis' missing LSB tags
insserv: warning: script 'haproxy' missing LSB tags
insserv: Default-Start undefined, assuming default start runlevel(s) for script `haproxy'
insserv: Service network is missed in the runlevels 4 to use service redis_6379
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
 
將redis註冊為redis-server服務
#mv /etc/init.d/redis{_6379,-server}
 
測試下:
# service redis-server restart
Starting Redis server...
#redis-cli -v
redis-cli 3.0.5
#redis-cli PING
PONG

以上完成編譯安裝Redis Stable最新版本

下面關於Redis的文章您也可能喜歡,不妨參考下:

Ubuntu 14.04下Redis安裝及簡單測試

Redis主從複製基本配置

Redis叢集明細文檔

Ubuntu 12.10下安裝Redis(圖文詳解)+ Jedis串連Redis

Redis系列-安裝部署維護篇

CentOS 6.3安裝Redis

Redis安裝部署學習筆記

Redis設定檔redis.conf 詳解

Redis 的詳細介紹:請點這裡
Redis 的:請點這裡

本文永久更新連結地址:

相關文章

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.