問題:安裝Tomcat併成功啓動,本機wget測試能夠正常訪問,但遠程不能訪問
shell
可能緣由:dom
默認開啓了fedora20默認開啓ipv6,須要關閉ipv6oop
被防火牆攔截測試
解決辦法:spa
關閉ipv6code
查看網卡信息,能夠看到ipv6的信息ip
[hadoop@localhost ~]$ ifconfig lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 7 bytes 588 (588.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 7 bytes 588 (588.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 p33p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.80.200 netmask 255.255.255.0 broadcast 0.0.0.0 inet6 fe80::2e0:4cff:fedc:d0d prefixlen 64 scopeid 0x20<link> ether 00:e0:4c:dc:0d:0d txqueuelen 1000 (Ethernet) RX packets 3958 bytes 357579 (349.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 758 bytes 105401 (102.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
編輯配置文件hadoop
$ sudo vi /etc/sysctl.conf
添加如下兩行get
net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1
執行如下命令
io
$ sudo ip addr del ::1/128 dev lo $ sudo ip addr del fe80::2e0:4cff:fedc:d0d/64 dev p33p1
再次查看網卡信息,能夠發現ipv6已經不見了
[hadoop@localhost ~]$ ifconfig lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 0 (Local Loopback) RX packets 7 bytes 588 (588.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 7 bytes 588 (588.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 p33p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.80.200 netmask 255.255.255.0 broadcast 0.0.0.0 ether 00:e0:4c:dc:0d:0d txqueuelen 1000 (Ethernet) RX packets 5192 bytes 474839 (463.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 949 bytes 128096 (125.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
註釋 ::1
$ sudo vi /etc/hosts # ::1 localhost6.localdomain6 localhost6
關閉防火牆
systemctl stop firewalld.service systemctl disable firewalld.service