centso关闭ipv6
参考:
http://www.centoscn.com/CentOS/config/2015/0225/4734.html
http://blog.csdn.net/yudar1024/article/details/41598057
http://blog.csdn.net/bluishglc/article/details/41390785
http://www.111cn.net/sys/CentOS/63645.htm
http://blog.csdn.net/bluishglc/article/details/41390785
试了以上方法,然而并没有什么卵用!
试了以下终极方法:
查看端口监听:
[donald@testDesktop]$netstat-ntlp
(Notallprocessescouldbeidentified,non-ownedprocessinfo
willnotbeshown,youwouldhavetoberoottoseeitall.)
ActiveInternetconnections(onlyservers)
ProtoRecv-QSend-QLocalAddressForeignAddressStatePID/Programname
tcp00192.168.122.1:530.0.0.0:*LISTEN-
tcp000.0.0.0:220.0.0.0:*LISTEN-
tcp00127.0.0.1:6310.0.0.0:*LISTEN-
tcp600:::3306:::*LISTEN-
tcp600:::22:::*LISTEN-
tcp6在监控
[donald@testDesktop]$sudovim/etc/default/grub
修改如下
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="ipv6.disable=1rd.lvm.lv=centos/rootrd.lvm.lv=centos/swapcrashkernel=autorhgbquiet"
GRUB_DISABLE_RECOVERY="true"
编译
[donald@testDesktop]$sudogrub2-mkconfig-o/boot/grub2/grup.cfg
Generatinggrubconfigurationfile...
Foundlinuximage:/boot/vmlinuz-3.10.0-327.22.2.el7.x86_64
Foundinitrdimage:/boot/initramfs-3.10.0-327.22.2.el7.x86_64.img
Foundlinuximage:/boot/vmlinuz-3.10.0-229.el7.x86_64
Foundinitrdimage:/boot/initramfs-3.10.0-229.el7.x86_64.img
Foundlinuximage:/boot/vmlinuz-0-rescue-56671d5c978444d688c5c3492b7628fd
Foundinitrdimage:/boot/initramfs-0-rescue-56671d5c978444d688c5c3492b7628fd.img
done
重启
[donald@testDesktop]$reboot
再次查看端口:
[donald@testDesktop]$netstat-ntlp
(Notallprocessescouldbeidentified,non-ownedprocessinfo
willnotbeshown,youwouldhavetoberoottoseeitall.)
ActiveInternetconnections(onlyservers)
ProtoRecv-QSend-QLocalAddressForeignAddressStatePID/Programname
tcp00192.168.122.1:530.0.0.0:*LISTEN-
tcp000.0.0.0:220.0.0.0:*LISTEN-
tcp00127.0.0.1:6310.0.0.0:*LISTEN-
tcp600:::3306:::*LISTEN-
tcp600:::22:::*LISTEN-
然并卵。。。。。。。。。。。