Redis only stand-alone mode before 3.0, and no cluster mode, so choose version 2.8 to test
Build steps:
1. Upload Decompression Redis
ROOT@HADOOP01 ~]# MV Redis-2.8.18/opt/software/(move to software directory for good Management)
2. Download GCC,TCL command compiler yum-y install GCC tcl (to use the Redis server must have a compiler called GCC support, but also have a language support called TCL)
3. Find the Redis directory to see a makefile command
(Compile, create directory, copy make && make Prefix=/opt/software/redis install)
When this operation is complete, it is equivalent to copy the Redis launcher to the/opt/software/redis directory.
4. Configure Redis Environment variables
After configuration remember reload
. /etc/profile
5. Installation of Redis services (/opt/software/redis-2.8.18/utils directory)
Welcome to the Redis service installer
This script would help you to easily set up a running Redis server
# If you do not use the default configuration, you need to manually enter the port number, we use the default port, press ENTER
Please select the Redis port for this instance: [6379]
Selecting default:6379
# Select the name of the default profile, press Enter, and use a different path and name to manually specify
Please select the redis config file name [/etc/redis/6379.conf]
Selected Default-/etc/redis/6379.conf
# Log storage location, handling IBID.
Please select the Redis log file name [/var/log/redis_6379.log]
Selected Default-/var/log/redis_6379.log
# Persistent Data directory, processing ibid
Please select the data directory for this instance [/var/lib/redis/6379]
Selected Default-/var/lib/redis/6379
# Specifies the Redis command execution path because it has already been configured in the environment variable and is no longer processed here
Please select the Redis executable path [/opt/sxt/redis/bin/redis-server]
Selected Config:
port:6379
Config File:/etc/redis/6379.conf
Log File:/var/log/redis_6379.log
Data dir:/var/lib/redis/6379
Executable:/opt/sxt/redis/bin/redis-server
Cli executable:/OPT/SXT/REDIS/BIN/REDIS-CLI
Is this OK? Then Press ENTER to go in or ctrl-c to abort. # Enter
copied/tmp/6379.conf =>/etc/init.d/redis_6379
Installing service ...
Successfully added to chkconfig!
Successfully added to Runlevels 345!
Starting Redis server ...
Installation successful!
You can perform install_server.sh scripts to install Redis services under different ports multiple times
6. Start Redis Client