相信大家在进行系统优化的时候需要禁用IPV6,LZ之前在网上查过很多教程,一一尝试之后未果。最后通过google搜索英文相关信息得到如下解决方案:(注:我的系统版本是Centos6.3 64位)
- sudo vim /boot/grub/grub.conf
原来内容如下:
- default=0
- timeout=5
- splashp_w_picpath=(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
- splashp_w_picpath=(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
保存重启
转载于:https://blog.51cto.com/frankwong1213/1178797