版本:redis-2.8.19.tar.gz

检查下面依赖是否安装,如果没有要先安装,不然会有异常。

yum install gcc-c++

yum install -y tcl。

、获取安装文件

redis-2.8.19.tar.gz

http://redis.io/download

、解压文件

tar -xzvf
redis-2.8.19.tar.gz

mv
redis-2.8.19  /usr/local/redis

、进入目录

cd redis

、编译

make

、安装

make install

、设置配置文件路径

mkdir -p /etc/redis

cp redis.conf/etc/redis

、修改配置文件

vi /etc/redis/redis.conf





仅修改: daemonize yes

、启动

/usr/local/bin/redis-server   /etc/redis/redis.conf

、查看启动

ps -ef | grep redis

、使用客户端

redis-cli

>set namedavid

OK

11.关闭客户端

redis-cli  shutdown

12.异常及解决方法

异常一:

make[2]: cc:Command not found

异常原因:没有安装gcc

解决方案:yum install gcc-c++

异常二:

zmalloc.h:51:31:error: jemalloc/jemalloc.h: No such file or directory

异常原因:一些编译依赖或原来编译遗留出现的问题

解决方案:make distclean。清理一下,然后再make。

在make成功以后,需要make test。在make test出现异常。

异常一:

couldn'texecute "tclsh8.5": no such file or directory

异常原因:没有安装tcl

如果不先安装tcl在编译redis的时候,执行make
test 会报以下错误,这步也可以省略,不执行make test直接执行make install对redis的启动和关闭没有什么影响。

[root@localhostredis]# make test

cd src &&make test

make[1]: Enteringdirectory `/usr/local/webserver/redis/src'

You need tcl 8.5 ornewer in order to run the Redis test

make[1]: *** [test]Error 1

make[1]: Leavingdirectory `/usr/local/webserver/redis/src'

make: *** [test]Error 2

版权声明:本文为博主原创文章,未经博主允许不得转载。

centos 6.5安装 redis的更多相关文章

  1. Redis学习笔记(1)- CentOS 6.4 安装Redis

    Redis学习笔记(1)- CentOS 6.4 安装Redis 2013.10.13     学习环境 vm 10.1 + 默认.新装的干净 CentOS 6.4  64BIT系统     准备 1 ...

  2. CentOS 7.3 安装redis 4.0.2服务

    CentOS 7.3 安装redis 4.0.2服务 1.下载解压 下载地址:/home/xiaoming/ wget http://download.redis.io/releases/redis- ...

  3. centos上如何安装redis?|centos傻瓜式安装redis教程

    本文介绍centos安装redis,请不要安装2.4.3,是有问题的. 首先安装gcc yum -y install gcc yum -y install gcc-c++ yum install ma ...

  4. 如何在 CentOS 7 上安装 Redis 服务器

    大家好,本文的主题是 Redis,我们将要在 CentOS 7 上安装它.编译源代码,安装二进制文件,创建.安装文件.在安装了它的组件之后,我们还会配置 redis ,就像配置操作系统参数一样,目标就 ...

  5. CentOS 7 服务器配置--安装Redis

    #下载Redis wget -r -np -nd http://download.redis.io/releases/redis-3.2.8.tar.gz #解压文件 tar zxvf redis-3 ...

  6. [从零开始搭网站八]CentOS使用yum安装Redis的方法

    1.由于centOS官方yum源里面没有Redis,这里我们需要安装一个第三方的yum源,这里用了fedora的epel仓库 yum install epel-release 安装过程中会有让你确认的 ...

  7. CentOS 7 yum 安装redis(更简单)

    一.安装redis 1.检查是否有redis yum 源 1 yum install redis 2.下载fedora的epel仓库 1 yum install epel-release 3.安装re ...

  8. redis学习之——CentOS 6 下载安装redis

    一.检查当前环境: 安装过程中没有这些,命令,在CentOS 6,最小安装导致..如果执行完命令,Noting  to  do...字样说明环境正常. yum -y install rpm gcc w ...

  9. CentOS 7 下安装redis步骤

    1. 从redis官网下载redis源码,本例安装在/usr/opt下 [root@localhost opt]# pwd /usr/opt [root@localhost opt]# wget ht ...

  10. centos 6.5 安装 redis

    下载软件: wget wget http://download.redis.io/releases/redis-2.8.7.tar.gz 2.解压软件并编译安装: tar -zxvf redis-2. ...

随机推荐

  1. abd 命令

    adb全称Android Debug Bridge ,安卓调试桥接器.它是Android SDK里面的一个工具,用这个工具可以直接操作管理Android模拟器或者真实Android设备.adb的工作方 ...

  2. Spring mvc服务端消息推送(SSE技术)

    SSE技术是基于单工通信模式,只是单纯的客户端向服务端发送请求,服务端不会主动发送给客户端.服务端采取的策略是抓住这个请求不放,等数据更新的时候才返回给客户端,当客户端接收到消息后,再向服务端发送请求 ...

  3. 初识Linux--虚拟机下安装Ubuntu16

    最近接收到任务,说是下半年可能要搞全文检索.听到后顿时炸锅了,一方面是对新技术的兴奋,另一方面,我TM连Linux都不会玩,怎么搞全文检索.怀揣着对开源世界的无线向往(恐惧),我决定试水Linux. ...

  4. 20181229模拟 T1 palindrome

    20181229模拟 T1 palindrome 题意 : \(S\)是字符串\(s\)的子串可重集,求\(\sum\limits_{x\in S}\sum\limits_{y\in S}(|x|+| ...

  5. js整数千分化

    function numToQfh(num){ var num_str = num.toString(); var strTo = " "; while(num_str.lengt ...

  6. 使用cef

    win10的同学注意了按右键以管理员模式启动cmake-gui.exe在Where is the source code:里填上你解压的CEF3路径,如:F:\cef3\cef_binary_3.23 ...

  7. navicat链接远程数据库

    1.之前使用的是常规的连接方式 学习源头: https://jingyan.baidu.com/article/0aa2237573c1e688cc0d6427.html 这里的ip地址是服务器的ip ...

  8. sleep 和 usleep的实现方法

    一.sleep 和 usleep 1.不属于系统调用,是glibc 库函数实现的: 2.glibc函数库中通过调用内核的nanosleep实现的: 3.内核nanosleep通过调用 hrtimer_ ...

  9. ZOJ 4016 Mergeable Stack(栈的数组实现)

    Mergeable Stack Time Limit: 2 Seconds      Memory Limit: 65536 KB Given  initially empty stacks, the ...

  10. Java-API-Package:org.springframwork.transaction.annotation

    ylbtech-Java-API-Package:org.springframwork.transaction.annotation 1.返回顶部 1. @NonNullApi @NonNullFie ...