Skip to content

Instantly share code, notes, and snippets.

@tokida
Last active December 21, 2022 13:34
Show Gist options
  • Select an option

  • Save tokida/8be2bc9e0e00e6a69565 to your computer and use it in GitHub Desktop.

Select an option

Save tokida/8be2bc9e0e00e6a69565 to your computer and use it in GitHub Desktop.
Provisioning Script
#=======================================================================
# 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
@tokida

tokida commented Oct 7, 2015

Copy link
Copy Markdown
Author

add configure firewall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment