The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

server time problem

Discussion in 'General Discussion' started by baldor, Nov 23, 2007.

  1. baldor

    baldor Active Member

    Joined:
    Oct 3, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    there is problem with my server's mainboard, time is going faster. i am adjusting it via WHM Server Time manually. i am clicking "Sync time with time server" button. how can i add a cron for this job, what is the command?

    thanks for help
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    locate a ntp server of choice, google for a list or ask your dc for a time server address. Then crontab -e

    This will update every 6 hours starting at midnight.

    00 00,06,12,18 * * * rdate -s time.server.com > /dev/null 2>&1
     
  3. madan.cpanelnet

    madan.cpanelnet Well-Known Member

    Joined:
    Apr 1, 2006
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    INDIA
    Steps to setup NTP and run it as service
    ##############################

    [root@server ~]# cat /etc/ntp.conf
    # A very simple client-only ntp configuration.
    server 127.127.1.0 # local clock
    server 0.pool.ntp.org
    server 1.pool.ntp.org
    server 2.pool.ntp.org
    server pool.ntp.org
    fudge 127.127.1.0 stratum 10
    driftfile /var/lib/ntp/drift
    restrict default ignore
    restrict 127.0.0.0 mask 255.0.0.0
    authenticate no

    [root@server ~]# cat /etc/ntp/step-tickers
    server 127.127.1.0 # local clock
    server 0.pool.ntp.org
    server 1.pool.ntp.org
    server 2.pool.ntp.org
    server pool.ntp.org

    [root@server ~]# chkconfig --level 2345 ntpd on
    [root@server ~]# chkconfig --list ntpd
    [root@server ~]# service ntpd start
    [root@server ~]# date
     
  4. baldor

    baldor Active Member

    Joined:
    Oct 3, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    thanks for your help, i have done cronjob
     
Loading...

Share This Page