1. Get Redis's latest stable version on the Redis website and download the Redis source code:
wget http://120.52.72.71/download.redis.io/c3pr90ntcsf0/releases/redis-3.0.6.tar.gz
Note: When downloading must let the virtual machine networking, need to log in information to log in, the precedent! Also see the download of the file is correct or complete, or the next decompression will be a problem oh!
Redis compiling
1, through the TAR-XVF redis-3.0.6.tar.gz command decompression download Redis source compression package redis-3.0.6.tar.gz;
2, compile Redis. Access to the Redis source directory via CD redis-3.0.6/, perform make to compile Redis;
Attention:
- After the make command finishes compiling, 6 executables are generated in the SRC directory, namely Redis-server, REDIS-CLI, Redis-benchmark, redis-check-aof, Redis-check-dump, Redis-sentinel.
- When you execute the make command, you may encounter errors during compilation:
If you report an error make[3]: Gcc:command not found
Install the GCC command on the call to the Yum command as follows yum-y install GCC
If you report the following error
Zmalloc.h:50:31:error:jemalloc/jemalloc.h:no such file or directory
Zmalloc.h:55:2: Error: #error "Newer version of Jemalloc required"
MAKE[1]: * * * [ADLIST.O] Error 1
MAKE[1]: Leaving directory '/ROOT/REDIS-3.0.6/SRC '
Make: * * * [ALL] Error 2
then enter
Make MALLOC=LIBC
Re-compiling
Redis Installation Configuration
1. Install Redis and execute make install. The executable file generated by make compilation is copied to the/usr/local/bin directory;
2. Execute./utils/install_server.sh After configuring Redis configuration, Redis can boot with the system.
3. View boot entry: Chkconfig--list
Redis service View, open, close
1, through the Ps-ef|grep redis command to view the Redis process;
2, open Redis service operation through/etc/init.d/redis_6379 Start command, also can pass (service redis_6379 start);
3. Turn off Redis service operation via/etc/init.d/redis_6379 Stop command, also available via (service redis_6379 stop);
Reference resources: http://jingyan.baidu.com/article/6dad507510ea07a123e36e95.html
Http://jingyan.baidu.com/article/fb48e8be37c1696e622e142e.html
http://my.oschina.net/gccr/blog/307725
Installing Redis instructions on Linux