1, set the redis.conf daemonize to Yes, to ensure that the daemon open;
Find #requirepass foorbared This line, replace it directly, change to requirepass new password
2, write the boot from the start script
The script reads as follows:
#!/bin/sh #chkconfig: 2345 # simple Redis INIT.D script conceived to work on Linux systems
# as it does use of the/proc filesystem. redisport=6379 Exec=/usr/local/bin/redis-server cliexec=/usr/local/bin/redis-cli PIDFILE=/var/run/redis_${ Redisport}.pid conf= "/etc/redis/${redisport}.conf" case "the" in Start "if [-f $PIDFILE] then echo" $PI
Dfile exists, process is already running or crashed "else echo" starting Redis server ... "$EXEC $CONF
fi;; STOP) if [! f $PIDFILE] then echo "$PIDFILE does not exist, the process is not running" else PI
d=$ (cat $PIDFILE) echo "Stopping ..." $CLIEXEC-p $REDISPORT shutdown while [-x/proc/${pid}]
Do echo ' Waiting for Redis to shutdown ... ' sleep 1 is done echo ' Redis stopped '
fi;;
*) echo "Please use start or stop as the" "argument";; Esac
3. Save and exit after writing
4, set permissions
5. Start test
6. Connection test
Redis-cli-a New password-p 6379
7, set the boot from start
The above is a small set to introduce the Linux under the Redis settings password and boot from the start, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!