1. Configure the compilation environment
yum -y install gcc-c++Copy the code
2. Download the Redis installation package
Wget HTTP: / / http://download.redis.io/releases/redis-3.2.8.tar.gzCopy the code
3. Decompress the source code
Tar -zxvf redis-3.2.8.tar.gz -c /usr/local/Copy the code
4. Access the source directory
cd /usr/local/ redis - 3.2.8Copy the code
5. Compiling redis
make MALLOC=libcCopy the code
Tips: After the make command is compiled, six executables are generated in the SRC directory. They are redis-server, Redis-CLI, Redis-benchmark, Redis-check-aof, redis-check-rDB, and Redis-sentinel.
6. Install redis
make installCopy the code
7. Configure Redis to start with the system
./utils/install_server.shCopy the code
Enter all the way to the end
Check the Redis process
ps =ef|grep redisCopy the code
9. Operate the Redis service
D /redis_6379 start Start (service redis_6379 start) /etc/init.d/redis_6379 stop Stop (service redis_6379 stop) /etc/init.d/redis_6379 status (service redis_6379 status)Copy the code