Just add or edit the lines below to the relevant files.
/etc/sysctl.conf : net.ipv6.conf.all.disable_ipv6 = 1
/etc/sysconfig/network : NETWORKING_IPV6=no
/etc/sysconfig/network-scripts/ifcfg-eth0 : IPV6INIT=”no”
If you have a different interface than eth0, just replace the last line above with it.
Now you don’t need to reboot your server (as everybody else says on the internet), simply restart the network service and you’re good to go.
service network restart
Don’t forget that, since you’re not using ipv6 anymore, you can disable the ip6tables if active, to avoid extra resource usage.
service ip6tables stopchkconfig –level 345 ip6tables off