CentOS6.4 安装Redis

按照下面步骤依次执行
1.检查依赖,安装依赖

[[email protected] ~]# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
[[email protected] ~]# whereis tc
tc: /sbin/tc /usr/lib64/tc /usr/share/tc /usr/share/man/man8/tc.8.gz
[[email protected] ~]# whereis wget
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz
[[email protected] ~]# yum -y install tcl

2.进入/user/local/src/

[[email protected] ~]# cd /user/local/src/

3.wget下载redis

[[email protected] src]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz

4.解压

[[email protected] src]tar zxvf redis-3.0.7.tar.gz

5.将文件转存到/usr/local/redis

[[email protected] src]mkdir /usr/local/redis
[[email protected] src]mv redis-3.0.7 /usr/local/redis
[[email protected] src]ll /usr/local/redis

6.编译安装

[[email protected] src]cd /usr/local/redis
[[email protected] redis]make && make install

7.在etc目录下创建redi文件夹并创建配置文件,并修改配置文件

[[email protected] redis]mkdir -p /etc/redis
[[email protected] redis]pwd
[[email protected] redis]cp -fr /usr/local/redis/redis.conf /etc/redis/

8.vim编辑/etc/redis/redis.conf,修改daemonize属性为yes

[[email protected] redis]# vim /usr/local/redis/redis.conf
# By default Redis does not run as a daemon. Use ‘yes‘ if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

9.执行/usr/loal/bin/redis-server /etc/redis/redis.conf来启动redis服务器

[[email protected] redis]# /usr/loal/bin/redis-server /etc/redis/redis.conf
-bash: /usr/loal/bin/redis-server: No such file or directory
[[email protected]-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
73449:M 13 May 10:56:00.839 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._
           _.-``__ ‘‘-._
      _.-``    `.  `_.  ‘‘-._           Redis 3.0.7 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ‘‘-._
 (    ‘      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|‘` _.-‘|     Port: 6379
 |    `-._   `._    /     _.-‘    |     PID: 73449
  `-._    `-._  `-./  _.-‘    _.-‘
 |`-._`-._    `-.__.-‘    _.-‘_.-‘|
 |    `-._`-._        _.-‘_.-‘    |           http://redis.io
  `-._    `-._`-.__.-‘_.-‘    _.-‘
 |`-._`-._    `-.__.-‘    _.-‘_.-‘|
 |    `-._`-._        _.-‘_.-‘    |
  `-._    `-._`-.__.-‘_.-‘    _.-‘
      `-._    `-.__.-‘    _.-‘
          `-._        _.-‘
              `-.__.-‘                                               

10.再打开一个终端,切换至redis的安装目录执行redis-cli

[[email protected] bin]# redis-cli
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379>
时间: 2024-10-27 05:29:18

CentOS6.4 安装Redis的相关文章

centos6.7安装Redis

1.创建安装目录 mkdir /usr/local/redis cd /usr/local/src 2.获取安装包:wget http://download.redis.io/releases/redis-2.8.12.tar.gz 3.解压 tar xzf redis-2.8.12.tar.gz 4.安装gcc yum –y install gcc    yum –y install jemalloc 5.安装redis yum –y install redis 6.启动 service re

转:Centos6.5_x86安装Redis。

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

Centos6.6 安装Redis

一.介绍 redis在做数据库缓存,session存储,消息队列上用的比较多 二.安装 $ yum install -y wget gcc make tcl $ wget http://download.redis.io/releases/redis-3.0.2.tar.gz $ tar zxvf redis-3.0.2.tar.gz $ cd redis-3.0.2 $ make $ make test $ make install 三.配置 $ cp redis.conf /etc/ $ t

『原创』CentOS6.5安装Redis数据库

1.以安装redis2.8.19为例 下载安装包:http://redis.io tar zxvf redis-2.8.19.tar.gz #解压 cd redis-2.8.19 #进入解压后的文件夹 yum install gcc #可能需要先安装GCC make #编译 如果编译出错:error: jemalloc/jemalloc.h: No such file or directory 解决方案: make MALLOC=libc #编译 cd src && make instal

centos6.6安装redis服务安装redis服务,对于discuz来说可以作为缓存使用,减轻服务器压力

获取redis源码包 #wget http://download.redis.io/releases/redis-stable.tar.gz 解压缩 #tar xf  redis-stable.tar.gz #cd redis-stable 开始编译 #make -j 4 #cd src 安装 #make install -j 4 #cd .. #vim redis.conf 设置为守护进程 daemonize yes 启动redis-server #src/redis-server redis

centos6.5安装redis

xml代码: [[email protected] src]# wget -c http://redis.googlecode.com/files/redis-2.4.7.tar.gz   [[email protected] src]# tar -zxv -f redis-2.4.7.tar.gz    [[email protected] src]# cd /usr/local/src/redis-2.4.7   [[email protected] redis-2.4.7]# make  

CentOS6.5安装redis(3.0.3)

如果没有安装gcc需要安装gcc 才能编译成功 yum install gcc 离线安装gcc的方法 # rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm # rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm # rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm # rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm # rpm -ivh gcc-4.4.7-4.el6.x86_64.r

centos6.8 安装redis 4.0 搭建主从

环境: master:172.17.165.245 slave :172.17.165.230 redis 版本:redis 4.0 1.下载并进行安装包 [[email protected] ~]#wget http://download.redis.io/releases/redis-4.0.8.tar.gz [[email protected] ~]#tar zxvf redis-4.0.8.tar.gz -C /usr/local/ [[email protected] ~]# cd !

centos6.5 64 源码安装redis服务,建立可远程连接的redis数据库

安装环境:centos6.5 64位 使用的包:redis-2.8.19.tar.gz  tcl8.6.3-src.tar.gz 包的下载链接:http://downloads.sourceforge.net/tcl/tcl8.6.3-src.tar.gz http://download.redis.io/releases/redis-2.8.19.tar.gz 本次安装的目录/home/hadoop/redis为任意目录 代码实现: 1,安装需要的支持环境 su root cd /home/h