Centos6.6 Installing Redis

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.