Last active
December 21, 2022 13:34
-
-
Save tokida/8be2bc9e0e00e6a69565 to your computer and use it in GitHub Desktop.
Provisioning Script
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
#======================================================================= | |
# bootstrap4Ubuntu.sh on SoftLayer | |
#======================================================================= | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Install Util | |
sudo apt-get install git curl -y | |
# Install SoftLayer Command line Interface | |
sudo apt-get install python-pip -y | |
pip install softlayer | |
# Japanese Locale | |
sudo apt-get install -y language-pack-ja-base language-pack-ja | |
update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja" | |
source /etc/default/locale | |
# Japan TimeZone | |
cp -p /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
echo "Asia/Tokyo" > /etc/timezone | |
# Please make sure to set SSH-KEY | |
sed -ri 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config | |
sed -ri 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config | |
sed -ri 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/g' /etc/ssh/sshd_config | |
service ssh restart | |
# confire firewall(iptables) | |
ufw allow ssh | |
ufw allow http | |
ufw logging low | |
echo y | ufw enable | |
#--------------------------------- | |
# get User_data | |
# curl -k https://api.service.softlayer.com/rest/v3/SoftLayer_Resource_Metadata/getUserMetadata > ~/userMetadata.txt | |
# apt-get install -y apache2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add configure firewall