givevur.blogg.se

Change timezone linux without reboot
Change timezone linux without reboot













change timezone linux without reboot

It’s possible that your original timezone files, the ones in /usr/share/zoneinfo/* get corrupted. Optional: copy the timezone files from another server If you’re running on OpenVZ or Virtuozzo, ask your administrator to change the clock for you as that is controlled by your host. That should be it to set your clock correctly, assuming your firewall allows NTP connections to remote servers. Once you’re certain the clock is correct, you can sync the settings back to your hardware clock. Then stop the ntpd first, then try the above steps again (/etc/init.d/ntpd stop). If you receive the following error when running ntpdate: # ntpdate be.Ĩ Nov 16:58:05 ntpdate: the NTP socket is in use, exiting To start with, update the time manually by calling the ntp daemon, then start the service so it updates automatically. If that’s off on runlevel 3, edit it so it will start when you reboot the system. Ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off # yum install ntpĪnd check if it’s started automatically upon boot. If that doesn’t list anything, install ntpd first. If it is, you should doublecheck your NTP (Network Time Protocol) daemon settings.įirst, check if the ntpd is installed. If your clock is off on the server, first check if the timezone (explained above) is correct. Most of your running applications will read the timezone information upon startup, so if you change this you will have to restart your applications if you want them to see the new timezone. Same story: replace the zone-info with your actual zone. That’s the file that will be read on boot the determine the timezone. To be absolutely certain, edit the file /etc/sysconfig/clock as well. That will change the timezone in the current session and should prevail upon reboots. You need to substitute the lines in bold with your actual current timezone.

change timezone linux without reboot

# ln -s /usr/share/zoneinfo/ Europe/ Brussels /etc/localtime

change timezone linux without reboot

Change your timezone # mv /etc/localtime /etc/localtime.backup Here’s what you need to know when you want to change the timezone on a CentOS or Red Hat Enterprise Linux server.















Change timezone linux without reboot