Centos redis 3.2.11 installation and configuration

cents 7

Download and unzip

wget http://download.redis.io/releases/redis-3.2.11.tar.gz

tar xzf redis-3.2.11.tar.gz

Enter the decompression directory make

 

Modify redis.conf   

Remote access Comment out bind 127.0.0.0 Modify protectmode to no

set password requirepass set password

 

profile start

src/redis-server redis.conf start, and test whether the connection is normal

 

 

boot

1. Modify redis.conf to set daemonize to yes

2. mkdir /etc/redis ; cp redis.conf /etc/redis/6379.conf ; cp src/redis-server /usr/local/bin ; cp src/redis-cli /usr/local/bin ; cp utils/redis_init_script /etc/init.d/redis

Modify /etc/init.d/redis to add 

# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database

two lines

 

4. #Set to boot and start the server 
chkconfig redis on #Open 
the service 
service redis start  #Close
the service 
service redis stop

***
5. Restart reboot
and execute the ps command to check that the redis 6379 port has been started

 

Guess you like

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