1: Software Environment: System version: CentOS release 6.5redis version: REDIS-CLI 3.0.5 installation directory: "/usr/local/redis" Download software: "wget http:// Download.redis.io/releases/redis-3.0.5.tar.gz ": 2:redis Installation: TAR-XVF REDIS-3.0.5.TAR.GZ CD Redis-3.0.5make test usually has an error: you need TCL 8.5 or newer on order to run the Redis testmake: * * * [Test] Error 1 Workaround: wget http ://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz tar XZVF tcl8.6.1-src.tar.gz -c/usr/local/ Cd/usr/local/tcl8.6.1/unix/ ./configure make make Install the Redis software: Make prefix=/usr/local/ Redis install the following files appear in the "/usr/local/redis/bin" directory after the installation is complete:redis-benchmark redis-check-aof redis-check-dump redis-cli redis-server3: Setting up Redis service: cp /root/redis-3.0.5/utils/redis_init_script/etc/ INIT.D/REDIS4: Change Redis script: #!/bin/sh#chkconfig:2345 90# simple Redis INIT.D script conceived to work on Linux systems# as It does use of The/proc filesystem. redisport=6379exec=/usr/local/redis/bin/redis-servercliexec=/usr/local/ Redis/bin/redis-cli pidfile=/var/run/redis_${redisport}.pidconf= "/etc/redis/${redisport}.conf" case "$" in start) If [-F $PIDFILE] then &NB Sp echo "$PIDFILE exists, process is already running or crashed" else & nbsp echo "Starting Redis server ..." $EXEC $CONF & fi ;; stop) IF [!-F $PIDFILE] then &N Bsp echo "$PIDFILE does not exist, process was not running" else & nbsp pid=$ (cat $PIDFILE) Echo "Stopping ..." &NBSp $CLIEXEC-P $REDISPORT shutdown while [-x/proc/${pi D}] do &NBS P echo "Waiting for Redis to shutdown ..." sleep 1 done Echo "Redis stopped" fi ;; *) echo "Please use Start or stop as first argument" ; ; ESAC5: Copy redis configuration files to/etc/redis/${redisport}.confcp /root/redis-3.0.5/redis.conf/etc/redis/6379.conf by default, Redis does not have authentication enabled, you can specify a verification password by turning on 6379.conf Requirepass, you need to modify the profile to turn on authentication: #requirepass foobared Remove the comment before the line, and change the password to the required password, save the file ; 6: Start Redis service chkconfig--add redisservice redis start7: Add the directory where the Redis command is located to the system parameter path VI. bAsh_profileexport path= "$PATH:/usr/local/redis/bin" source. Bash_profile8: Test:redis-cli redis 127.0.0.1:6379> auth redisok redis 127.0.0.1:6379> ping PONG redis The 127.0.0.1:6379>redis was installed successfully;
Latest centos6.x under Redis installation