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@test Desktop]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      -                  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                  
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                  
tcp6       0      0 :::3306                 :::*                    LISTEN      -                  
tcp6       0      0 :::22                   :::*                    LISTEN      -

tcp6在监控
[donald@test Desktop]$ sudo vim /etc/default/grub
修改如下
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX=" ipv6.disable=1 rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
编译
[donald@test Desktop]$ sudo grub2-mkconfig -o /boot/grub2/grup.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-327.22.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.22.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-56671d5c978444d688c5c3492b7628fd
Found initrd image: /boot/initramfs-0-rescue-56671d5c978444d688c5c3492b7628fd.img
done
重启
[donald@test Desktop]$ reboot
再次查看端口:
[donald@test Desktop]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      -                  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                  
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                  
tcp6       0      0 :::3306                 :::*                    LISTEN      -                  
tcp6       0      0 :::22                   :::*                    LISTEN      -
然并卵。。。。。。。。。。。

你可能感兴趣的:(CentOS,linux)