centos 6.5安装 redis

版本:redis-2.8.19.tar.gz

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

yum installgcc-c++

yum install -y tcl。

1、获取安装文件

redis-2.8.19.tar.gz

http://redis.io/download

2、解压文件

tar -xzvf
redis-2.8.19.tar.gz

mv
redis-2.8.19  /usr/local/redis

3、进入目录

cd redis

4、编译

make

5、安装

make install

6、设置配置文件路径

mkdir -p /etc/redis

cp redis.conf/etc/redis

7、修改配置文件

vi /etc/redis/redis.conf

仅修改: daemonize yes

8、启动

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

9、查看启动

ps -ef | grep redis

10、使用客户端

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的启动和关闭没有什么影响。

[[email protected]]# 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

时间: 2024-08-24 19:11:37

centos 6.5安装 redis的相关文章

CentOS 7 编译安装Redis

在CentOS(Linux)下编译安装Redis(V2.8.19)之后,总结的注意事项如下: 下载安装Redis: $ wget http://download.redis.io/releases/redis-2.8.19.tar.gz $ tar xzf redis-2.8.19.tar.gz $ cd redis-2.8.19 $ make TIPS: 可先到官网下载Redis文件,同时可以查看官网的编译安装方法( 传送门 ). 在Redis根目录下,直接 make make 成功后,如果需

CentOS使用yum安装Redis的方法

1.由于centOS官方yum源里面没有Redis,这里我们需要安装一个第三方的yum源,这里用了fedora的epel仓库 yum install epel-release 安装过程中会有让你确认的,输入y按回车就可以了 2.安装Redis yum install redis 安装过程中会有让你确认的,输入y按回车就可以了 3.启动Redis service redis start 4.修改端口号/密码等配置 vim /etc/redis.conf 原文地址:https://www.cnblo

centos 6.8安装redis

1. 下载到redis下载页面https://redis.io/download下载对应版本的reids安装包,如:redis-${version}.tar.gz . 2. 安装redis的详细安装步骤在安装包中的README.md文件中有详细说明,请详细阅读.以安装redis-4.0.1.tar.gz为例说明. [[email protected]]# tar xvf redis-4.0.1.tar.gz [[email protected]]# cd redis-4.0.1 [[email 

CentOS 7 下安装redis步骤

1. 从redis官网下载redis源码,本例安装在/usr/opt下 [[email protected] opt]# pwd /usr/opt [[email protected] opt]# wget http://download.redis.io/releases/redis-3.2.6.tar.gz --2016-12-16 21:55:49-- http://download.redis.io/releases/redis-3.2.6.tar.gz 正在解析主机 download.

Centos 6.9 安装 Redis 3.2.9

依赖包和常用包yum install gcc gcc-c++ make zlib-devel readline readline-devel tkutil tk tkutil-devel tk-devel openssl openssl-devel wget vim ntp -y 下载rediswget http://download.redis.io/releases/redis-3.2.9.tar.gz 解压redis tar -zxvf  redis-3.2.9.tar.gz 重命名red

centos 6.8 安装redis

通过wget命令下载 Redis 源代码 wget http://download.redis.io/releases/redis-3.2.6.tar.gz 1.通过tar -xvf redis-3.0.2.tar.gz命令解压下载Redis源码压缩包redis-3.0.2.tar.gz: 编译前记得先装 gcc yum install gcc 2.编译Redis.通过cd redis-3.0.2/进入Redis源码目录内,执行make编译Redis: 注意:make命令执行完成编译后,会在sr

CentOS 7 yum 安装 redis

一.Redis的安装(前提是已经安装了EPEL) 安装redis: yum -y install redis 启动/停止/重启 Redis 启动服务: systemctl start redis.service 停止服务: systemctl stop redis.service 重启服务: systemctl restart redis.service 检查状态: systemctl status redis.service 随系统启动服务: systemctl enable redis.se

Linux Centos下编译安装Redis

需要安装 tcl 8.5 wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz           //直接下载  sudo tar xzvf tcl8.6.1-src.tar.gz  -C /usr/local/   cd  /usr/local/tcl8.6.1/unix/   sudo ./configure   sudo make   sudo make install 没有gcc gcc安装过程     yum in

centos环境下安装redis

1.安装gcc和gcc-c++ 使用which gcc 和which g++检查是否已经安装,若已有安装,跳过下面安装步骤 安装gcc yum -y install gcc 安装gcc-c++ yum -y install gcc-c++ 2.安装redis,按步骤执行 wget http://download.redis.io/releases/redis-4.0.2.tar.gz tar xzf redis-4.0.2.tar.gz cd redis-4.0.2 make 注意: 如果在ma

Linux安装配置Redis CentOS 7 下安装Redis

Redis是一个高性能的,开源key-value型数据库.是构建高性能,可扩展的Web应用的完美解决方案,可以内存存储亦可持久化存储.因为要使用跨进程,跨服务级别的数据缓存,在对比多个方案后,决定使用Redis.顺便整理下Redis的安装过程,以便查阅. 1 . 下载Redis 目前,最新的Redist版本为3.0,使用wget下载,命令如下: # wget http://download.redis.io/releases/redis-3.0.4.tar.gz2 . 解压Redis 下载完成后