編輯/etc/sysctl.conf:
vi /etc/sysctl.conf
增加如下兩行:
net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1
:wq保存退出后,執(zhí)行
sysctl -p
將立即生效。