LoginSignup
12
8

More than 5 years have passed since last update.

AWS時刻設定(RedHat,ubuntu)

Posted at

現在時刻確認

ずれてる

[ec2-user@ip-172-31-xxx-xxx ~]$ date
2016年  2月 18日 木曜日 03:38:51 EST

RedHatの場合

sudo yum install ntp
/etc/ntp.conf
#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst
server ntp.nict.jp
server ntp.nict.jp
server ntp.nict.jp
sudo service ntpd restart

timezone変更

ln -sf  /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
ZONE="Asia/Tokyo"
UTC=false

ubuntu

sudo apt-get install ntp
/etc/ntp.conf
#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst
server ntp.nict.jp
server ntp.nict.jp
server ntp.nict.jp
sudo /etc/init.d/ntp restart

timezone変更

$ sudo echo Asia/Tokyo > /etc/timezone
$ sudo dpkg-reconfigure --frontend noninteractive tzdata
12
8
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
12
8