1. 下载安装包
  wget url
  tar zxvf redis-3.2.4.tar.gz
2. 编译安装
  cd redis-3.2.4/src/
  sudo make && make install
3. redis创建启动文件
  cd /usr/local/redis-3.2.4
  cp redis.conf /etc/
4. 添加启动配置文件
  touch /etc/init.d/redis
  chmod 755 /etc/init.d/redis
  vim /etc/init.d/redis
  内容如下
  #!/bin/bash
  #
  # Init file for redis
  #
  # chkconfig: - 80 12
  # description: redis daemon
  #
  # processname: redis
  # config: /etc/redis.conf
  # pidfile: /var/run/redis.pid
  source /etc/init.d/functions
  BIN="/usr/local/bin"
  CONFIG="/etc/redis.conf"
  PIDFILE="/var/run/redis.pid"
  ### Read configuration
  [ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
  RETVAL=0
  prog="redis-server"
  desc="Redis Server"
  start() {
          if [ -e $PIDFILE ];then
              echo "$desc already running...."
              exit 1
          fi
          echo -n $"Starting $desc: "
          daemon $BIN/$prog $CONFIG
          RETVAL=$?
          echo
          [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
          return $RETVAL
  }
  stop() {
          echo -n $"Stop $desc: "
          killproc $prog
          RETVAL=$?
          echo
          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog $PIDFILE
          return $RETVAL
  }
  restart() {
          stop
          start
  }
  case "$1" in
    start)
          start
          ;;
    stop)
          stop
          ;;
    restart)
          restart
          ;;
    condrestart)
          [ -e /var/lock/subsys/$prog ] && restart
          RETVAL=$?
          ;;
    status)
          status $prog
          RETVAL=$?
          ;;
    *)
          echo $"Usage: $0 {start|stop|restart|condrestart|status}"
          RETVAL=1
  esac
  exit $RETVAL
 
5. 修改配置文件 /etc/redis.conf
 
  daemonize yes修改为yes
  bind 127.0.0.1(指定访问IP)
  修改端口为6899(默认为6379)
  开启密码requirepass
 
6. 启动redis
  /etc/init.d/redis start

Redis 3.2.4编译安装的更多相关文章

  1. redis(4.0.11)编译安装

    一: redis数据库安装 系统环境:linux系统(centos/redhat):Red Hat Enterprise Linux Server release 6.8 (Santiago) red ...

  2. redis 的源码编译安装

    首先我们下载软件包到指定的目录下 tar -zxvf redis-2.8.19.tar.gz cd redis-2.8.19 make make PREFIX=/usr/local/redis ins ...

  3. 编译安装PHP7并安装Redis扩展Swoole扩展(未实验)

    用PECL自动安装Redis扩展.Swoole扩展 pecl install redis pecl install swool 编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机 ...

  4. redis3.2.9编译安装

    Redis 3.2.9 安装 Redis 3.2.9 编译安装 1,   安装相关软件包 2,   下载redis源码包 wget http://source.goyun.org:8000/sourc ...

  5. Mac Pro 编译安装 Redis 的 PHP 客户端 phpredis

    1.去官网下载 redis 扩展源码包 https://github.com/phpredis/phpredis 2.安装 redis 扩展 /usr/local/src/mac-sdk/source ...

  6. 编译安装PHP7并安装Redis扩展Swoole扩展

    编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...

  7. PHP扩展Redis编译安装

    PHP扩展Redis编译安装 1.下载PHP官方Redis源码包  wget http://pecl.php.net/get/redis-2.2.4.tgz  注:我用的是Redhat系统,ubunt ...

  8. Redis 入门之编译安装

    Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工作由VMware主 ...

  9. CentOS6.5编译安装Redis

    一.首先要检测是否安装gcc yum install gcc-c++ yum install -y tcl 进入redis目录 cd /usr/local/redis .编译安装 make make ...

随机推荐

  1. JavaScript阻止冒泡和取消事件默认行为

    //功能:停止事件冒泡 function stopBubble(e) { if ( e && e.stopPropagation ) { e.stopPropagation(); } ...

  2. 刷题总结——二逼平衡树(bzoj3224线段树套splay)

    题目: Description 您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:1.查询k在区间内的排名2.查询区间内排名为k的值3.修改某一位值上的数值4.查询k在 ...

  3. java面试题之osi七层网络模型,五层网络模型,每层分别有哪些协议(阿里面试题)

    OSI七层网络模型 TCP/IP五层网络模型 对应网络协议 应用层 应用层 HTTP.TFTP.FTP.NFS.WAIS.SMTP 表示层 应用层 Telnet.Rlogin.SNMP.Gopher ...

  4. java集合四种遍历方式

    package conection; import java.util.Iterator;import java.util.LinkedList;import java.util.List; publ ...

  5. 实时监控linux

    https://www.cnblogs.com/tinywan/p/6826125.html

  6. hdu 3501 容斥原理或欧拉函数

    Calculation 2 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tot ...

  7. ZOJ 3772 Calculate the Function 线段树+矩阵

    Calculate the Function Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %ll ...

  8. 【NOIP2016练习】T1 string (计数)

    题意: 思路: ; ..]of int64; n,k,i:longint; ans,x,y:int64; s,t:ansistring; function c(x,y:longint):int64; ...

  9. [leetcode]84.Largest Rectangle in Histogram ,O(n)解法剖析

    Given n non-negative integers representing the histogram's bar height where the width of each bar is ...

  10. tomcat7.0.55配置单向和双向HTTPS连接(二)

    上一篇文章:tomcat7.0.55配置单向和双向HTTPS连接 只是简要的配置了一下HTTPS,还有许多问题没有解决,本篇来解决这些文件 首先按照这篇文章:Widows下利用OpenSSL生成证书来 ...