wget http://download.redis.io/redis-stable.tar.gz
Tar xvzf redis-stable.tar.gz
CD redis-stable
Make
The first 3 steps should be no problem, the main problem is that when you execute make, an exception occurs.
Exception One:
MAKE[2]: Cc:command not found
Exception reason: GCC is not installed
Solution: Yum Install gcc-c++
Exception Two:
Zmalloc.h:51:31:error:jemalloc/jemalloc.h:no such file or directory
Exception reason: Some compiler dependencies or original compilation legacy problems
Solution: Make Distclean. Clean it up and make it again.
After make is successful, make test is required. An exception occurred in make test.
Exception One:
Couldn ' t execute "tclsh8.5": No such file or directory
Exception reason: Tcl not installed
Solution: Yum install-y tcl.
After make succeeds, there are some more executables in the SRC directory: Redis-server,redis-cli and so on.
During the convenient period, the CP command is copied to the USR directory for operation.
CP redis-server/usr/local/bin/
CP redis-cli/usr/local/bin/
Then create a new directory, store the configuration file
Mkdir/etc/redis
Mkdir/var/redis
Mkdir/var/redis/log
Mkdir/var/redis/run
mkdir/var/redis/6379
Locate the profile template in the Redis solution directory and copy it to the following location.
CP redis.conf/etc/redis/6379.conf
Modify with vim command
Daemonize Yes
Pidfile/var/redis/run/redis_6379.pid
Logfile/var/redis/log/redis_6379.log
dir/var/redis/6379
Finally, run Redis:
$ redis-server /etc/redis/6379.conf
Category: Distributed Systems Tags: redis, CentOS
Installing Redis 2.8.7 under CentOS 6.5