1.修改/etc/sysconfig/network,追加:
NETWORKING_IPV6=no
2.修改/etc/hosts,把ipv6的那句本地主机名解析的也注释掉:
#::1 localhost localhost6 localhost6.localdomain6
3.让系统不加载ipv6相关模块,新建设定文件/etc/modprobe.d/ipv6off.conf(名字随便起)(RHEL6.0之后没有了/etc/modprobe.conf这个文件),内容如下:
alias net-pf-10 offoptions ipv6 disable=1