Redis Installation Manuals

Source: Internet
Author: User

wget http://download.redis.io/releases/redis-2.8.3.tar.gztar xzf redis-2.8.3.tar.gzCD redis-2.8.3 Make2. After compiling, in the./src directory, there are three executables redis-server, Redis-benchmark, Redis-cli, and./redis.conf and then copied to a directory.  Mkdir/usr/redisCP Redis-server/usr/redisCP Redis-benchmark/usr/redisCP Redis-cli/usr/redisCP Redis.conf/usr/redisCd/usr/redis3. Start Redis service.  Redis-server redis.conf4, then use the client to test whether to start successfully.  redis-cliredis> set foo barOKredis> get foo"Bar" ---------------------------------------------------------------------------------------------------------then make a self-made Redis startup script for easy management1, VIM/ETC/RC.D/INIT.D/REDISD  #!/bin/sh #chkconfig: 345 #description: Startup and Shutdown script for Redis   Progdir=/usr/redis #安装路径 Progname=redis-server daemon= $PROGDIR/$PROGNAME config=/usr/redis.conf Pidfile=/var/run/redis.pid desc= "Redis daemon" SCRIPTNAME=/ETC/RC.D/INIT.D/REDISD   Start () { if Test-x $DAEMON Then echo-e "Starting $DESC: $PROGNAME" if $DAEMON $CONFIG Then echo-e "OK" Else echo-e "Failed" fi Else echo-e "couldn ' t find Redis Server ($DAEMON)" fi }   Stop () { if Test-e $PIDFILE Then echo-e "Stopping $DESC: $PROGNAME" if kill ' cat $PIDFILE ' Then echo-e "OK" Else echo-e "Failed" fi Else echo-e "No Redis Server ($DAEMON) running" fi }   Restart () { echo-e "Restarting $DESC: $PROGNAME" Stop Start }   list () { PS aux | grep $PROGNAME }   Case $ in start) Start         ;; stop) Stop         ;; restart) Restart         ;; list) List         ;;            *) echo "Usage: $SCRIPTNAME {start|stop|restart|list}" >&2 Exit 1         ;; Esac Exit 0  2. Increase the service and start the bootCP./REDISD/ETC/RC.D/INIT.D/REDISDchmod +X/ETC/RC.D/INIT.D/REDISDchkconfig--add REDISDchkconfig--level 345 REDISD onchkconfig--list REDISDafter executing the script, you can start start|stop|restart|list your service.     CP Redis-server/usr/local/redisCP redis-benchmark/usr/local/redisCP redis-cli/usr/local/redisCP redis.conf/usr/local/redis

Redis Installation Guide

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.