Ali cloud Centos7 yum install redis

This article is yum install redis !!!

 

1. First Source Installation epel

yum install epel-release

2. Install redis

yum install redis

3. After installation is complete, use the following command to start the service redis

# Start redis
service redis start
# Stop redis
service redis stop
# View redis running state
service redis status
# View redis process
ps -ef | grip Redis

4. Set the automatic startup to redis

chkconfig redis on

5.redis-cli enter redis service

# Spilled into the redis
redis-cli
List all key #
keys *

6. Open the configuration file, change passwords, IP, etc.

we /etc/redis.conf

① can modify the port (default is 6379)

 

 ② can change the password

 

 ③ can be modified to allow remote login

1. The default only allows the machine to log

bind 127.0.0.1

2. You can specify IP login (designated ip, separated by spaces between multiple ip)

bind 127.0.0.1 192.168.3.3

3. Allow all IP login (unsafe)

bind 0.0.0.0

 

7. After modifying the configuration file, the following command can take effect that the profile

redis-server /etc/redis.conf &

or

# Stop redis
service redis stop
# Start redis
service redis start

 

8. Telnet redis

(Which can be changed to 127.0.0.1 remote public IP)

redis-cli -h 127.0.0.1 -p 6379

If a password is required to log in by shown below:

 

9. Another open ports requires a combination of open Linux system port and Ali cloud ECS Security Group Policy instance configuration,

Details description refer to the end of another one of my blog a detailed description:

https://www.cnblogs.com/adreyan-lobster/p/11992261.html

 

10.redis-client client Introduction

Links: https://pan.baidu.com/s/1DDYddXDN6A7GJVwDHW_fcg
extraction code: wnmu

 

 

 

Guess you like

Origin www.cnblogs.com/adreyan-lobster/p/11992552.html