How To : Disable IPv6 in CentOs 7

  Linux
# vi /etc/sysctl.conf
......
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
......

Reboot the server or run the following command

# sysctl -p