아마존에서 EC2 인스턴스를 설치하고 나면 시간이 맞지 않는다. 그것은 기본적으로UTC 시간을 사용하기 때문인다. tzselect 유틸리티를 사용하여 해당 지역을 선택하여 시간을 설정할 수있다.
root@empower-esp:~# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 7
Please select one of the following time zone regions.
1) Lord Howe Island 8) Queensland - most locations
2) Macquarie Island 9) Queensland - Holiday Islands
3) Tasmania - most locations 10) South Australia
4) Tasmania - King Island 11) Northern Territory
5) Victoria 12) Western Australia - most locations
6) New South Wales - most locations 13) Western Australia - Eucla area
7) New South Wales - Yancowinna
#? 5
The following information has been given:
Australia
Victoria
Therefore TZ='Australia/Melbourne' will be used.
Local time is now: Thu Jul 30 18:55:59 AEST 2015.
Universal Time is now: Thu Jul 30 08:55:59 UTC 2015.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Australia/Melbourne'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Australia/Melbourne
root@empower-esp:~# TZ='Australia/Victoria'; export TZ
그리고 이것을 /etc/profile 파일에 기록해 놓으면 시스템이 부팅되더라도 유지가 되겠다.
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.
TZ='Australia/Victoria'; export TZ
.
.
생략....
'DevOps' 카테고리의 다른 글
Usage of TCPDUMP (0) | 2015.09.21 |
---|---|
NAT 서버를 통한 SQL 쿼리 Forwarding 설정 On AWS (0) | 2015.08.11 |
리눅스에서 디렉토리별 용량 확인 방법 (0) | 2015.07.30 |
GitHub에 Public key등록해서 SSH 사용하기 (0) | 2015.07.29 |
Subversion 설치 (0) | 2015.07.24 |