zoukankan      html  css  js  c++  java
  • Redis(1) 初识Redis

    redis介绍:

    Redis是一个开源(BSD许可)的内存数据结构存储,用作数据库,缓存和消息代理。它支持数据结构,如字符串(String),哈希(Hash),列表(List),集合(Set),具有范围查询的排序集(ZSet)。Redis具有主从复制,缓存清理机制,部分事务和不同级别的磁盘持久化,并通过Redis Sentinel提供高可用性(哨兵模式),并通过Redis Cluster支持集群部署。

    安装Redis 4.0.6:

    Redis 4.0.6

    系统环境:

    [root@localhost ~]# uname -a
    Linux localhost.localdomain 2.6.32-220.el6.i686 #1 SMP Tue Dec 6 16:15:40 GMT 2011 i686 i686 i386 GNU/Linux

    注意:因为Redis是C语言编写,所以需要gcc环境。

    [root@localhost ~]# gcc -v
    使用内建 specs。
    目标:i686-redhat-linux
    配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
    线程模型:posix
    gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

    安装:

    解压缩:

    [root@localhost modules]# tar -zxvf redis-4.0.6.tar.gz -C ../softwares

    进入此目录编译redis:

     

    [root@localhost redis-4.0.6]# make && make install

    注意:若系统没有gcc环境会编译失败。安装gcc环境此处不赘述,请点击

    编译失败一次后,安装gcc环境之后,重新编译还会编译失败,是因为上次编译失败后又残留文件。

    此时执行:

    [root@localhost redis-4.0.6]# make distclean

    再次执行编译就不会报错。

  • 相关阅读:
    吸烟的女人有着一种让人心动的美
    怎么样的女人让男人不变心
    姐妹们!一起来做狐狸精!
    清华图书馆机器人
    大地实习程序
    《非2》里的两首诗
    GIS拓扑生成
    一点小发现
    directX下的三维坐标系
    Let's start from here
  • 原文地址:https://www.cnblogs.com/chinda/p/8124004.html
Copyright © 2011-2022 走看看