1. Installing Redis
First step: Download the Redis installation package
wget http://download.redis.io/releases/redis-4.0.11.tar.gz
Step two: Unpack the zip package
TAR-ZXVF redis-4.0.11.tar.gz
Step three: Yum installs GCC dependencies
Yum Install GCC
Fourth step: Jump to Redis decompression directory
cd/opt/
MV redis-4.0.11 Redis
CD Redis
Fifth step: Compile and install
Make MALLOC=LIBC
Add files from the/USR/LOCAL/REDIS-4.0.6/SRC directory to the/usr/local/bin directory
CD src && make instal
Sixth step: Test whether the installation is successful
Cd/opt/redis/src
./redis-server/usr/local/redis-4.0.6/redis.conf
2. Configuring Redis
1. Set Daemonize to Yes,requirepass as your Redis password in redis.conf to make sure the daemon is on, that is, it can be run in the background.
Vi/opt/redis/redis.conf
2. Copy the Redis profile (the startup script needs to use the profile content, so copy it)
Mkdir/etc/redis
Cp/opt/redis/redis.conf/etc/redis/6379.conf
3. Set daemonize in redis.conf to Yes to ensure that the daemon is turned on, that is, it can run in the background.
Find/-name Redis_init_script
Cp/opt/redis/utils/redis_init_script/etc/init.d/redis
4. Modify Startup Script Parameters
Vi/etc/init.d/redis
5. Start Redis
Open Redis Command: Service Redis start
Turn off Redis command: Service Redis stop
Set to boot: Chkconfig Redis on
Set to power off: chkconfig Redis off
Installing Redis && Configuring Redis boot from Linux CentOS7.2