当前位置:网站首页>Redis5.0 installation and production startup steps

Redis5.0 installation and production startup steps

2022-06-21 14:32:00 Internet Walker

Download address http://download.redis.io/releases Various versions can be selected .

After downloading, unzip tar -zxvf redis-5.0.8.tar.gz tar xzf redis-5.0.8.tar.gz

Yes redis.conf To configure , after ./src/redis-server redis.conf start-up . No external access and no password verification by default .

Get rid of requirepass notes , Add password . Comment out bind 127.0.0.1 Open external access . modify daemonize no by yes, This eliminates the need for interaction

Command accessed , Will generate /var/run/redis_6379.pid.

Set up redis Boot up

Need to put src/utils Below redis_init_script Copy the script to /etc/init.d/ below , Modify according to the content

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"

Change to your actual directory , And turn on password verification , stay $CLIEXEC -p $REDISPORT shutdown, add to -a 123456( password )

chkconfig redis 

service redis start

 

原网站

版权声明
本文为[Internet Walker]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221423319551.html