CentOS7彻底关闭IPV6
2017-01-04 10:38
197 查看
编辑/etc/default/grub,在GRUB_CMDLINE_LINUX加上的后面句首加上ipv6.disable=1。 修改前:
[root@localhost Desktop]# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet" GRUB_DISABLE_RECOVERY="true"
修改后:
[root@localhost Desktop]# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" 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 rhgb quiet" GRUB_DISABLE_RECOVERY="true"
修改完毕后保存,运行grub2-mkconfig -o /boot/grub2/grub.cfg重新生成grub.cfg文件。
[root@localhost Desktop]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-514.2.2.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-514.2.2.el7.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-327.36.3.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.36.3.el7.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-d885883cdb4944609bc5e3493dd2b680 Found initrd image: /boot/initramfs-0-rescue-d885883cdb4944609bc5e3493dd2b680.img done
重启系统,运行lsmod|grep ipv6,可以看到ipv6已经关闭。
相关文章推荐
- CentOS6 彻底关闭IPv6
- centos7 网速很慢解决办法----关闭ipv6
- redhat7.2 彻底关闭防火强(ipv4/ipv6)
- 彻底关闭windows server 2008 IPv6
- 在CentOS7上关闭IPv6
- linux 关闭停用ipv6方法
- win7命令提示符下关闭IPv6隧道的方法
- windows7系统下关于IPv6的命令行快速关闭问题探讨
- CentOS7使用firewalld打开关闭防火墙与端口
- 怎么彻底关闭win7脱机文件服务?
- ubuntu临时关闭ipv6
- linux下关闭ipv6提高网络访问速度
- CentOS7关闭防火墙
- centos7 关闭firewall安装iptables并配置
- 如何关闭ipv6
- Centos7 关闭ipv6网络
- Centos7 关闭防火墙
- CentOS7上临时关闭防火墙
- CentOS7如何关闭防火墙