If you do not have a Redis installation package, you can get #wget http://download.redis.io/releases/redis-2.8.13.tar.gz1 with wget. Unzip the Redis package #cd/usr#mkdir REDIS#CD #tar ZXVF redis-2.8.13.tar.gz-c/usr/redis#cd/usr/redis/redis-2.8.13 First install some necessary tools, otherwise make the error #yum install-y gcc tcl 2. Installation #make (if error error:jemalloc/jemalloc.h:no such file or directory, perform #make malloc=libc#make distclean#make) #make Test#make Install this installs, if appear make[1]: Leaving directory ' xxxxx/redis-2.8.13/src ' Don't care it #cd Utils/#./install_ Server.sh The process will be prompted to enter some configuration such as Port, config filename, etc., press ENTER to use the default can be 3. Modify the configuration #vi/etc/init.d/redis_6379 see if the following configuration path is correct
Exec=/usr/local/bin/redis-server
Cliexec=/usr/local/bin/redis-cli
Pidfile=/var/run/redis_6379.pid
conf= "/etc/redis/6379.conf"
4. Set background run #vi/usr/redis/redis-2.8.13/redis.confdaemonize No to daemonize Yes 5. Change the service name #cd/etc/init.d#mv redis_6379 REDIS6. Setting up boot #chkconfig redis on
Test#redis-CLI Accessories: https://app.yinxiang.com/shard/s41/res/c8681ee3-dadc-480c-a365-7820ce5aeb19/redis-2.8.13.tar.gz
CentOS Installation Redis