1. Download:
# wget http://download.redis.io/releases/redis-4.0.10.tar.gz
2. Unzip:
# tar ZXVF redis-4.0.10.tar.gz
3. Installation:
# CD redis-4.0.10/
# make
Error 1:
Reason:
Redis installation relies on the GCC service
Solve:
# yum Install gcc
Error 2:
Reason:
# VI Readme.md
Use Jemallo Allocator by default
Solve:
Specify the make parameter to use the LIBC allocator:
# Make MALLOC=LIBC
4. Start: 4.1 Start:
#./src/redis-server
Open a new server connection:
4.2 Connections:
# cd/usr/local/src/redis-4.0.10/src/
#./redis-cli
4.3 Close:
#./REDIS-CLI shutdown
5. Configuration: 5.1 By default, Redis is not running in the background and we need to put Redis in the background:
# VI Redis.conf
Change the value of daemonize to Yes
Start the specified configuration file:
#./redis-server. /redis.conf
5.2 Enable Redis to start:
# vi/etc/rc.local
File Trailer added:
/usr/local/src/redis-4.0.10/src/redis-server/usr/local/src/redis-4.0.10/redis.conf
To restart the server test:
5.3 Add authentication, set Password:
# VI.. /redis.conf
Change # Requirepass foobared to:
Requirepass nriet123
5.4 Specifies the IP to which Redis can be accessed (default bind 127.0.0.1, only native access):
# VI.. /redis.conf
Comment out bind 127.0.0.1 (Unrestricted IP access)
6. Rdb and aof Persistence:
Redis default RDB persisted data
RDB persisted data trigger condition
Save 900 1 15 minutes at least one key has been changed
Save 300 10 5 minutes with at least 10 keys changed
Save 60 10000 1 minutes with at least 10,000 keys changed
dir/usr/clz/redis-4.0.9/databak/: Specifying a persisted file path
Dbfilename Dump.rdb: Specify RDB Persistence mode file
Appendfilename "appendonly.aof": Specifies the AOF persistence mode file
AppendOnly Yes: Open aof persistence mode (default AppendOnly No)
Linux installation Redis