手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

编译安装Redis Stable最新版本

[日期:2015-11-27] 来源:Linux社区  作者:xiangcun168 [字体: ]

目前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安装及简单测试 http://www.linuxidc.com/Linux/2014-05/101544.htm

Redis主从复制基本配置 http://www.linuxidc.com/Linux/2015-03/115610.htm

Redis集群明细文档 http://www.linuxidc.com/Linux/2013-09/90118.htm

Ubuntu 12.10下安装Redis(图文详解)+ Jedis连接Redis http://www.linuxidc.com/Linux/2013-06/85816.htm

Redis系列-安装部署维护篇 http://www.linuxidc.com/Linux/2012-12/75627.htm

CentOS 6.3安装Redis http://www.linuxidc.com/Linux/2012-12/75314.htm

Redis安装部署学习笔记 http://www.linuxidc.com/Linux/2014-07/104306.htm

Redis配置文件redis.conf 详解 http://www.linuxidc.com/Linux/2013-11/92524.htm

Redis 的详细介绍请点这里
Redis 的下载地址请点这里

本文永久更新链接地址http://www.linuxidc.com/Linux/2015-11/125601.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款