zoukankan      html  css  js  c++  java
  • redis 安装

    <pre name="code" class="html"><pre name="code" class="html"><pre name="code" class="sql">1.查看安装的redis版本
    jrhrpt01:/root# redis-server --version
    Redis server v=2.8.19 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=1138bcb7ae3eee58
    
    源码包为redis-2.8.19.tar.gz
    
    2.
    yum -y install  gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses* libmcrypt* libtool-ltdl-devel* make cmake 
    
    
    
    3.
    demo:/root/redis-2.8.19# make 
    cd src && make install
    make[1]: Entering directory `/root/redis-2.8.19/src'
        CC adlist.o
    In file included from adlist.c:34:
    zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
    zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
    make[1]: *** [adlist.o] Error 1
    make[1]: Leaving directory `/root/redis-2.8.19/src'
    make: *** [install] Error 2
    demo:/root/redis-2.8.19# 
    
    
    
    解决:
    make MALLOC=libc
    
    Hint: It's a good idea to run 'make test' ;)
    
    make[1]: Leaving directory `/root/redis-2.8.19/src'
    test-redis2:/root/redis-2.8.19# make install
    cd src && make install
    make[1]: Entering directory `/root/redis-2.8.19/src'
    
    Hint: It's a good idea to run 'make test' ;)
    
        INSTALL install
        INSTALL install
        INSTALL install
        INSTALL install
        INSTALL install
    make[1]: Leaving directory `/root/redis-2.8.19/src'
    
    
    4.
    
    安装成功之后会在src文件夹内有redis-server和redis-cli两个命令
    建议将其放到bin下
    cp redis-server /usr/local/bin/
    cp redis-cli /usr/local/bin/
    
    test-redis:/root/redis-2.8.19# cp redis.conf /etc/
    
    
    5.启动redis
    
    redis-server /etc/redis.conf
    
     yum -y install  gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses* libmcrypt* libtool-ltdl-devel* make cmake 
       23  ls -ltr
       24  tar -zxvf redis-2.8.19.tar.gz 
       25  cd redis-2.8.19
       26  make MALLOC=libc
       27  cd src
       28  ls
       29  cp redis-server /usr/local/redis/bin
       30  cp redis-cli /usr/local/redis/bin
    运行redis:
    [root@wx03 ~]# /usr/local/bin/redis-server /etc/redis/redis.conf 
    


    
    
    
    
    
                                        
    
  • 相关阅读:
    贪心算法与动态规划
    Linux重要目录结构
    博客园添加目录索引
    冒泡排序&插入排序&其他排序
    Linux下部署自己写的Web项目
    Java算法入门-数组&链表&队列
    Java集合-数据结构之栈、队列、数组、链表和红黑树
    Java集合-单例模式斗地主&Collections类的shuffle方法了解
    什么是反向代理服务器
    Linux信号处理
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351684.html
Copyright © 2011-2022 走看看