Synchronize NTP Server and Change Timezone in Oracle Linux

I’m using Oracle Linux 6.5.

For synchronize your machine with the known NTP/Time server you can change the config in /etc/ntp.conf

look at the file, and you can see in the bottom the NTP server destination :

fudge stratum 10
restrict mask nomodify notrap noquery

The first two lines point to local time, and the next two lines are the Indonesia NTP domain. You can more NTP Server if you want.

Then you need to stop it first.

/etc/init.d/ntpd status

/etc/init.d/ntpd stop

After you stop the ntpd service, you need to sync the NTP with NTP server with this command

ntpdate -s <NTP_SERVER>

ntpdate -s

Then you start the ntpd service again

/etc/init.d/ntpd start

If you check from NTPSTAT you’ll see that your machine will undergo the synchonization, so it’s normal if it’s unsynchonize after the restart. After a while (maybe 10-15 minutes, or more), your machine will be synchronize with the new NTP Server.

I found that my timezone is messed up before (registered as EDT/Eastern Daylight Time), check it using date.. so below are the reposted way how to change the timezone.

repost from here.

There are several different ways to manage time in Linux. This quick tip will show you how to quickly change the local time to the correct time zone for the server. In this Linux tip I’ll show you how to change the localtime to your (or a) current time zone.

Location of the local time file
Linux looks at /etc/localtime to determine the current time of your machine. This can either be a symbolic link to the correct time zone or a direct copy of the time zone file.

Timezone files are located in /usr/share/zoninfo/
For this tip we will assume your server is located in America and will be under the Chicago CST zone.

I change the Linux time zone by copying or making a symbolic link to from /usr/share/zoneinfo/America/Chicago to /etc/localtime

Two methods to do this

1) cp /usr/share/zoneinfo/America/Chicago /etc/localtime
2) ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime

To test it, you can do :



2 Comments Add yours

  1. otidh berkata:

    Wah baru tahu ane ada Oracle Linux. Beda memang corporate mainannya.

    1. Rizky berkata:

      OL, RHEL versi komersilnya CentOS

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s