Last active
June 9, 2018 07:23
-
-
Save lotusirous/c62d08716e62df894b8d67f1d30c77f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Time | |
yum -y install ntp | |
ntpdate time.apple.com | |
# remove old kernel | |
yum install yum-utils | |
package-cleanup --oldkernels --count=2 | |
# disable ipv6 | |
# append in file `/etc/sysctl.conf` | |
cat << EOF >> /etc/sysctl.conf | |
net.ipv6.conf.all.disable_ipv6 = 1 | |
net.ipv6.conf.default.disable_ipv6 = 1 | |
net.ipv6.conf.lo.disable_ipv6 = 1 | |
EOF | |
sysctl -w net.ipv6.conf.all.disable_ipv6=1 | |
sysctl -w net.ipv6.conf.default.disable_ipv6=1 | |
# remove ::1 in `etc/hosts` | |
sed '/::1/d' /etc/hosts | |
# append active interface to hostfile | |
ip addr show ens33 | grep -Po 'inet \K[\d.]+' | |
# append all interfaces ip to hosts | |
ip addr | grep -Po 'inet \K[\d.]+' |awk '{print $1 " localhost"}' >> /etc/hosts | |
# Disable firewalld and SElinux | |
systemctl disable firewalld && systemctl stop firewalld | |
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment