I. INTRODUCTION
Redis is doing database cache, session storage, Message Queuing is used more
Two. Installation
$ 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
Three. Configuration
$ CP redis.conf/etc/$ touch /etc/init.d/redis$ chmod 755 /etc/init.d/redis$ VI /etc/init.d/ Redis#!/bin/bash## Init File forredis## chkconfig:- the A# description:redis daemon## processname:redis# config:/etc/redis.conf# pidfile:/var/run/Redis.pidsource/etc/init.d/Functions#bin="/usr/local/bin"BIN="/usr/local/bin"CONFIG="/etc/redis.conf"Pidfile="/var/run/redis.pid"# # Read configuration[-R"$SYSCONFIG"] && Source"$SYSCONFIG"RETVAL=0Prog="Redis-server"desc="Redis Server"start () {if[ -e $PIDFILE];then Echo"$desc already running ...."Exit1fi echo-N $"starting $desc:"Daemon $BIN/$prog $CONFIG RETVAL=$?Echo [$RETVAL-eq0] && Touch/var/Lock/subsys/$progreturn$RETVAL}stop () {echo-N $"Stop $desc:"Killproc $prog RETVAL=$?Echo [$RETVAL-eq0] && rm-f/var/Lock/subsys/$prog $PIDFILEreturn$RETVAL}restart () {Stop start} Case " $" inchstart) Start; stop) stop;; restart) restart;; Condrestart) [-E/var/Lock/subsys/$prog] &&Restart RETVAL=$? ;; Status) status $prog RETVAL=$? ;; *) echo $"Usage: $ {start|stop|restart|condrestart|status}"RETVAL=1Esacexit $RETVAL
#记得在redis. conf changes in
daemonize Yes
Four. Running
$/etc/init.d/redis start$ chkconfig redis on
Five. Check
Centos6.6 Installing Redis