您的位置:首页 > 运维架构 > Linux

CentOS 6.3 禁用IPV6

2013-04-15 19:27 323 查看
相信大家在进行系统优化的时候需要禁用IPV6,LZ之前在网上查过很多教程,一一尝试之后未果。最后通过google搜索英文相关信息得到如下解决方案:(注:我的系统版本是Centos6.3 64位)

sudo vim /boot/grub/grub.conf

原来内容如下:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-279.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/vg_centosmini-lv_root rd_NO_LUKS rd_LVM_LV=vg_centosmini/lv_swap r
d_LVM_LV=vg_centosmini/lv_root rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-279.el6.x86_64.img

在 quiet 后添加 ipv6.disable=1 修改后效果如下:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-279.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/vg_centosmini-lv_root rd_NO_LUKS rd_LVM_LV=vg_centosmini/lv_swap r
d_LVM_LV=vg_centosmini/lv_root rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet ipv6.disable=1
initrd /initramfs-2.6.32-279.el6.x86_64.img

保存重启

本文出自 “止于至善” 博客,请务必保留此出处http://frankwong1213.blog.51cto.com/6445530/1178797
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: