“一个端口可以被不同 IP 重复使用”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) (建立内容为“redis.windows.conf<syntaxhighlight lang="apacheconf"> bind 192.168.0.120 port 6379 </syntaxhighlight>redis.windows.new.conf<syntaxhighlight lang="apacheconf"> bin…”的新页面) |
Jihongchang(讨论 | 贡献) |
||
第2行: | 第2行: | ||
bind 192.168.0.120 | bind 192.168.0.120 | ||
port 6379 | port 6379 | ||
− | </syntaxhighlight>redis.windows.new.conf<syntaxhighlight lang="apacheconf"> | + | </syntaxhighlight> |
+ | |||
+ | |||
+ | |||
+ | redis.windows.new.conf<syntaxhighlight lang="apacheconf"> | ||
bind 127.0.0.1 | bind 127.0.0.1 | ||
port 6379 | port 6379 | ||
− | </syntaxhighlight>可以同时启动两个进程不会冲突<syntaxhighlight lang="powershell"> | + | </syntaxhighlight> |
+ | |||
+ | |||
+ | |||
+ | 可以同时启动两个进程不会冲突<syntaxhighlight lang="powershell"> | ||
C:\Users\Administrator>netstat -aon|findstr ":6379" | C:\Users\Administrator>netstat -aon|findstr ":6379" | ||
TCP 127.0.0.1:6379 0.0.0.0:0 LISTENING 19328 | 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 | TCP 192.168.0.120:6379 0.0.0.0:0 LISTENING 16492 | ||
</syntaxhighlight> | </syntaxhighlight> |
2022年8月14日 (日) 15:05的最新版本
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