0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Amazon Linuxを立ち上げる時にいつも流すスクリプト

Last updated at Posted at 2018-02-13

2017年2月くらいに初めてAWSでEC2を触った時に調べました。いつも忘れて調べなおすのでメモ的に。

スクリプト

setup.sh
# 実行ユーザーはec2-userを想定してます。

# yumを最新に
sudo yum -y update

# aliasを解除して
sudo unalias cp

# timezone設定
sudo cp -f -p /usr/share/zoneinfo/Japan /etc/localtime
sudo cp /dev/null /etc/sysconfig/clock
echo -e 'ZONE=\"Asia/Tokyo\"\nUTC=false' | sudo tee -a /etc/sysconfig/clock
sudo chmod 644 /etc/sysconfig/clock
sudo /etc/init.d/crond restart

## 日本語設定
sudo cp /dev/null /etc/sysconfig/i18n
echo 'LANG=ja_JP.UTF-8' | sudo tee -a /etc/sysconfig/i18n
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?