{"id":2546,"date":"2016-08-23T16:51:10","date_gmt":"2016-08-23T20:51:10","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2546"},"modified":"2017-10-10T12:40:36","modified_gmt":"2017-10-10T16:40:36","slug":"use-network-time-service-centos-6","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/","title":{"rendered":"How to use Network Time Services on CentOS 6"},"content":{"rendered":"<p>Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Today, it is one of the most crucial services that computers take advantage of. The protocol for network time synchronization in common use is called NTP, or Network Time Protocol.<\/p>\n<p>NTP works via a hierarchy of servers organized into different strata. Stratum 0 is reserved for devices that report the time accurately, such as atomic clocks. Stratum 1 contains servers that directly get their time from devices in Stratum 0, and thus has in theory the highest level of accuracy. Servers in Stratum 2 obtain their time from servers in Stratum 1, and the time thus propagates downward through the strata to a maximum depth of 15.<\/p>\n<p>Using a Network Time Server (NTP) is a very good way to make sure that your server time is always accurate, as it will continuously adjusts system time from upstream NTP servers. Without an accurate time system like NTP, there would be no way to be sure that timestamps on files are correct, making tasks like automated backups, collaboration on group projects, and version control much more difficult and fraught with error.<\/p>\n<p>This guide will show you how to set up the date and time on your CentOS 6 server using NTP.<\/p>\n<h2>Getting started<\/h2>\n<p>\u2022\tA server with CentOS 6<\/p>\n<h2>Step-by-step guide<\/h2>\n<p>First, after making sure your system is fully up to date, install ntp and ntpdate. You will use the package manager yum for this.<\/p>\n<p><code>yum install ntp ntpdate<\/code><\/p>\n<p><code class=\"rouge\">ntp is used to have a continuously adjusted system time from upstream NTP server ntpdate is an utility to set the date and time via NTP.<\/code><\/p>\n<p>Now you can adjust your system date and time using the following command. Run this one time, and then only when necessary in the future.<\/p>\n<p><code>ntpdate pool.ntp.org<\/code><\/p>\n<p>Try editing your NTP config. Open the file with a text editor, and add the NTP server you would like to use.<\/p>\n<p><code>vim \/etc\/ntp.conf<\/code><\/p>\n<p>You can also set which public servers you&#8217;ll use from the pool.ntp.org project.<\/p>\n<p><code>server 0.north-america.pool.ntp.org<br \/>\nserver 1.north-america.pool.ntp.org<br \/>\nserver 2.north-america.pool.ntp.org<br \/>\nserver 3.north-america.pool.ntp.org<\/code><\/p>\n<p>Now you can start the ntpd server for automatic time updating.<\/p>\n<p><code>\/etc\/init.d\/ntpd start<\/code><\/p>\n<p>You&#8217;ll probably want to have ntpd start automatically on system boot. Use this command to enable that feature.<\/p>\n<p><code>chkconfig ntpd on<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>With accurate time reporting provided by ntpd, you can rest easy knowing that your system is in step with the rest of the internet. If you liked this KB article, please share it with your friends. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Today, it is one of the most crucial services that computers take advantage of. The protocol for network time synchronization in common use is called NTP, or Network Time Protocol. NTP works via a<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-2546","post","type-post","status-publish","format-standard","hentry","category-web-hosting","operating_system-centos-6"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use Network Time Services on CentOS 6 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Read now to learn more!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use Network Time Services on CentOS 6 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Read now to learn more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-23T20:51:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-10-10T16:40:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/\",\"name\":\"How to use Network Time Services on CentOS 6 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-08-23T20:51:10+00:00\",\"dateModified\":\"2017-10-10T16:40:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Read now to learn more!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Network Time Services on CentOS 6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Network Time Services on CentOS 6 - Globo.Tech","description":"Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Read now to learn more!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/","og_locale":"en_US","og_type":"article","og_title":"How to use Network Time Services on CentOS 6 - Globo.Tech","og_description":"Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Read now to learn more!","og_url":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/","og_site_name":"Globo.Tech","article_published_time":"2016-08-23T20:51:10+00:00","article_modified_time":"2017-10-10T16:40:36+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/","url":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/","name":"How to use Network Time Services on CentOS 6 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-08-23T20:51:10+00:00","dateModified":"2017-10-10T16:40:36+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"Way back in 1979, network time synchronization was one of the first applications of the internet demonstrated to the general public. Read now to learn more!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/use-network-time-service-centos-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to use Network Time Services on CentOS 6"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2546"}],"version-history":[{"count":5,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2546\/revisions"}],"predecessor-version":[{"id":3139,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2546\/revisions\/3139"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}