Because Redis is quite fast, when a server is better, an external user can make a 150K (150,000) password attempt in a second, which means you need to set up a very strong password to prevent brute force.
1. Set the password
(1). Open Redis.conf Profile VI through the VI editor redis.conf
(2). Through the VI editor/requirepass, find the location of Requirepass, using the VI Editor N key to jump to the next position, eventually need to locate the annotated password line # Requirepass Foobared/requirepas S
(3). Through the VI editor i key, execute insert, password write, such as Requirepass Hexu
(4). Through the VI editor ESC, exit Inisert operation, typing command: Wq save and exit
(5). Re-view Confirm password saved successfully
2. Restart the Redis service
[Email protected] src]# Pkill redis-server
[Email protected] src]# redis-server/home/tony/step/redis-3.0.6/redis.conf
3. Authorization
[Email protected] src]# REDIS-CLI
127.0.0.1:6379> Ping
(Error) Noauth Authentication required.
127.0.0.1:6379> Auth Hexu
Ok
127.0.0.1:6379>
Two. Redis Security