Open Redis port for remote connections

后端 未结 10 2038
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 10:00

I can ping pong Redis on the server:

# redis-cli ping
PONG

But remotely, I got problems:

$ src/redis-cli -h REMOTE.IP ping
         


        
10条回答
  •  甜味超标
    2020-12-07 10:49

    1. Open the file at location /etc/redis.conf

    2. Comment out bind 127.0.0.1

    3. Restart Redis:

       sudo systemctl start redis.service
      
    4. Disable Firewalld:

       systemctl disable firewalld
      
    5. Stop Firewalld:

       systemctl stop firewalld
      

    Then try:

    redis-cli -h 192.168.0.2(ip) -a redis(username)
    

提交回复
热议问题