一个端口可以被不同 IP 重复使用

来自姬鸿昌的知识库
Jihongchang讨论 | 贡献2022年8月14日 (日) 15:05的版本 (建立内容为“redis.windows.conf<syntaxhighlight lang="apacheconf"> bind 192.168.0.120 port 6379 </syntaxhighlight>redis.windows.new.conf<syntaxhighlight lang="apacheconf"> bin…”的新页面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索

redis.windows.conf

bind 192.168.0.120
port 6379

redis.windows.new.conf

bind 127.0.0.1
port 6379

可以同时启动两个进程不会冲突

C:\Users\Administrator>netstat -aon|findstr ":6379"
  TCP    127.0.0.1:6379         0.0.0.0:0              LISTENING       19328
  TCP    192.168.0.120:6379     0.0.0.0:0              LISTENING       16492