Created
December 8, 2018 12:23
-
-
Save niiku-y/e1d2feced0b22137bdeab9432b41904b to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# init_ubu16.sh | |
echo "backup resolv.conf, resolv.conf.d/base" | |
cp /etc/resolv.conf /etc/.resolv.conf.org | |
cp /etc/resolvconf/resolv.conf.d/base /etc/resolvconf/resolv.conf.d/.base.org | |
echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/base | |
resolvconf -u | |
echo "" | |
echo "/etc/resolv.conf (after) : " | |
cat /etc/resolv.conf | |
echo "" | |
echo "package update ..." | |
sudo apt-get update && sudo apt-get upgrade -y | |
cat <<EOF >> /etc/hosts | |
192.168.0.108 lb01.openstacklocal lb01 | |
192.168.0.109 master01 | |
192.168.0.110 master02 | |
192.168.0.111 master03 | |
EOF | |
echo "" | |
echo "/etc/hosts : " | |
cat /etc/hosts | |
echo "" | |
echo "finish." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment