Last active
December 23, 2021 23:17
-
-
Save froop/224549dad2a39c584b571ee16ca66142 to your computer and use it in GitHub Desktop.
[Linux][EC2] CentOS 7環境構築
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
#cloud-config | |
timezone: Asia/Tokyo | |
runcmd: | |
- cd /home/centos | |
- curl -L -o init-os.sh https://gist.github.com/froop/224549dad2a39c584b571ee16ca66142/raw/init-centos7-ec2.sh | |
- chmod +x init-os.sh | |
- ./init-os.sh | |
- rm init-os.sh |
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 -eu | |
# swap file | |
dd if=/dev/zero of=/swapfile bs=128M count=8 | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab | |
#localectl set-locale LANG=ja_JP.UTF-8 | |
#timedatectl set-timezone Asia/Tokyo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment