Centos7 yum install and configure redis and set the password

Original text: https://www.cnblogs.com/fanlinglong/p/6635828.html

 

Centos7 yum install and configure redis and set the password

 

1. Set the repository address of Redis

yum install epel-release

2. Install redis

yum install redis

  Modify the configuration file to listen on all IP addresses

copy code
vim   /etc/redis.conf
find the line below

bind 127.0.0.1
comment out

#bind 127.0.0.1
copy code

3. Start redis, this is done

service redis start  

 

If you need to set the boot to start automatically

chkconfig redis on






另外:

If you need redis to configure authentication password

1. Configuration through configuration files
The redis configuration file installed by yum is usually in /etc/redis.conf, open the configuration file to find

#requirepass foobared

Remove the comment before the line, and change the password to the desired password, save the file

requirepass youpwd

 

restart redis to complete




Centos7 yum install and configure redis and set the password

 

1. Set the repository address of Redis

yum install epel-release

2. Install redis

yum install redis

  Modify the configuration file to listen on all IP addresses

copy code
vim   /etc/redis.conf
find the line below

bind 127.0.0.1
comment out

#bind 127.0.0.1
copy code

3. Start redis, this is done

service redis start  

 

If you need to set the boot to start automatically

chkconfig redis on






另外:

If you need redis to configure authentication password

1. Configuration through configuration files
The redis configuration file installed by yum is usually in /etc/redis.conf, open the configuration file to find

#requirepass foobared

Remove the comment before the line, and change the password to the desired password, save the file

requirepass youpwd

 

restart redis to complete




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324400714&siteId=291194637