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

在CentOS 5/Redhat 5上编译源码安装Redis

[日期:2015-09-19] 来源:Linux社区  作者:傲风 [字体: ]

CentOS 5/RedHat 5上编译源码安装Redis | Install Redis on CentOS 5 / Redhat 5

环境

Redhat 5.7 64bit / CentOS 5 64bit

Gcc 4.1.2

编译安装Redis

三步曲:下载、解压、编译安装。

wget http://download.redis.io/releases/redis-2.8.4.tar.gz
tar xzvf redis-2.8.4.tar.gz -C /home/nieyong/download/build
cd /home/nieyong/download/build/redis-2.8.4
make PREFIX=/home/nieyong/local/redis-2.8.4 install

注:

1)更详细的安装说明可查看Redis的README。

2)淡黄底色部分根据自己的实际环境进行修改。

启动Redis

进入Redis安装目录的bin子目录。

cd /home/nieyong/local/redis-2.8.4/bin
./redis-server --port 9999

控制台出现如下提示信息:

[31726] 16 Jan 15:30:32.946 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 992.
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 2.8.4 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 9999
 |    `-._   `._    /     _.-'    |     PID: 31726
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

[31726] 16 Jan 15:30:32.955 # Server started, Redis version 2.8.4
[31726] 16 Jan 15:30:32.955 * The server is now ready to accept connections on port 9999

测试Redis

进入Redis安装目录的bin子目录。

./redis-cli -h 127.0.0.1 -p 9999
127.0.0.1:9999> ping
PONG
127.0.0.1:9999> set name 聂勇
OK
127.0.0.1:9999> get name
"\xe8\x81\x82\xe5\x8b\x87"
127.0.0.1:9999> set username nieyong
OK
127.0.0.1:9999> get username
"nieyong"

参考资料

 
<正文结束>

下面关于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-09/123297.htm

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

       

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