{"id":276,"date":"2012-12-27T21:15:12","date_gmt":"2012-12-27T21:15:12","guid":{"rendered":"https:\/\/shan.info\/new\/centos-linux-fix-bash-ntpdate-command-not-found-centos\/"},"modified":"2012-12-27T21:15:12","modified_gmt":"2012-12-27T21:15:12","slug":"centos-linux-fix-bash-ntpdate-command-not-found-centos","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/centos-linux-fix-bash-ntpdate-command-not-found-centos\/","title":{"rendered":"CentOS Linux: Fix bash: ntpdate: command not found centos"},"content":{"rendered":"<p style=\"margin: 0px; padding: 5px 10px; font-size: 10pt; color: #000000; font-family: 'Trebuchet MS', sans-serif; line-height: normal;\">First you have to install ntp:<\/p>\n<p style=\"margin: 0px; padding: 5px 10px; font-size: 10pt; color: #000000; font-family: 'Trebuchet MS', sans-serif; line-height: normal;\">Run as root:<\/p>\n<div class=\"wp_syntax\" style=\"margin: 0px 0px 1.5em; padding: 0px; color: #110000; background-color: #f9f9f9; border: 1px solid silver; overflow-y: hidden; overflow-x: auto; width: 800px; font-family: 'Trebuchet MS', sans-serif; font-size: medium; line-height: normal;\">\n<table style=\"margin: 0px !important; padding: 0px !important; border: none !important; border-collapse: collapse !important; width: 800px;\">\n<tbody style=\"margin: 0px; padding: 0px;\">\n<tr style=\"margin: 0px; padding: 0px;\">\n<td class=\"code\" style=\"margin: 0px; padding: 0px !important; border: none !important; vertical-align: top !important; background-image: none !important;\">\n<pre class=\"bash\" style=\"font-family: monospace; margin: 0px !important; padding: 0px !important; background-color: transparent !important; width: auto !important; float: none !important; clear: none !important; overflow: visible !important; font-size: 12px !important; line-height: 16px !important; -webkit-box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important;\"><span style=\"margin: 0px; padding: 0px; color: #c20cb9; font-weight: bold;\">yum install<\/span> ntp<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin: 0px; padding: 5px 10px; font-size: 10pt; color: #000000; font-family: 'Trebuchet MS', sans-serif; line-height: normal;\">Then if you run ntpdate again you might get the error again. You can run ntpdate with:<\/p>\n<div class=\"wp_syntax\" style=\"margin: 0px 0px 1.5em; padding: 0px; color: #110000; background-color: #f9f9f9; border: 1px solid silver; overflow-y: hidden; overflow-x: auto; width: 800px; font-family: 'Trebuchet MS', sans-serif; font-size: medium; line-height: normal;\">\n<table style=\"margin: 0px !important; padding: 0px !important; border: none !important; border-collapse: collapse !important; width: 800px;\">\n<tbody style=\"margin: 0px; padding: 0px;\">\n<tr style=\"margin: 0px; padding: 0px;\">\n<td class=\"code\" style=\"margin: 0px; padding: 0px !important; border: none !important; vertical-align: top !important; background-image: none !important;\">\n<pre class=\"bash\" style=\"font-family: monospace; margin: 0px !important; padding: 0px !important; background-color: transparent !important; width: auto !important; float: none !important; clear: none !important; overflow: visible !important; font-size: 12px !important; line-height: 16px !important; -webkit-box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important;\"><span style=\"margin: 0px; padding: 0px; font-weight: bold;\">\/<\/span>usr<span style=\"margin: 0px; padding: 0px; font-weight: bold;\">\/<\/span>sbin<span style=\"margin: 0px; padding: 0px; font-weight: bold;\">\/<\/span>ntpdate <span style=\"margin: 0px; padding: 0px;\">2<\/span>.pool.ntp.org<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin: 0px; padding: 5px 10px; font-size: 10pt; color: #000000; font-family: 'Trebuchet MS', sans-serif; line-height: normal;\">Replace 2.pool.ntp.org with another server if that doesn\u2019t work.<\/p>\n<p style=\"margin: 0px; padding: 5px 10px; font-size: 10pt; color: #000000; font-family: 'Trebuchet MS', sans-serif; line-height: normal;\">If you get a\u00a0<strong style=\"margin: 0px; padding: 0px;\"><em style=\"margin: 0px; padding: 0px;\">ntpdate[585863]: the NTP socket is in use, exiting<\/em><\/strong>\u00a0Error, then run:<\/p>\n<div class=\"wp_syntax\" style=\"margin: 0px 0px 1.5em; padding: 0px; color: #110000; background-color: #f9f9f9; border: 1px solid silver; overflow-y: hidden; overflow-x: auto; width: 800px; font-family: 'Trebuchet MS', sans-serif; font-size: medium; line-height: normal;\">\n<table style=\"margin: 0px !important; padding: 0px !important; border: none !important; border-collapse: collapse !important; width: 800px;\">\n<tbody style=\"margin: 0px; padding: 0px;\">\n<tr style=\"margin: 0px; padding: 0px;\">\n<td class=\"code\" style=\"margin: 0px; padding: 0px !important; border: none !important; vertical-align: top !important; background-image: none !important;\">\n<pre class=\"bash\" style=\"font-family: monospace; margin: 0px !important; padding: 0px !important; background-color: transparent !important; width: auto !important; float: none !important; clear: none !important; overflow: visible !important; font-size: 12px !important; line-height: 16px !important; -webkit-box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important;\"><span style=\"margin: 0px; padding: 0px; font-weight: bold;\">\/<\/span>etc<span style=\"margin: 0px; padding: 0px; font-weight: bold;\">\/<\/span>init.d<span style=\"margin: 0px; padding: 0px; font-weight: bold;\">\/<\/span>ntpd stop<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin: 0px; padding: 5px 10px; font-size: 10pt; color: #000000; font-family: 'Trebuchet MS', sans-serif; line-height: normal;\">Took me 10 precious minutes to update the time in a server \u2026 That\u2019s a lot!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First you have to install ntp: Run as root: yum install ntp Then if you run ntpdate again you might get the error again. You can run ntpdate with: \/usr\/sbin\/ntpdate 2.pool.ntp.org Replace 2.pool.ntp.org with another server if that doesn\u2019t work. If you get a\u00a0ntpdate[585863]: the NTP socket is in use, exiting\u00a0Error, then run: \/etc\/init.d\/ntpd stop [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-276","post","type-post","status-publish","format-standard","hentry","category-centos-6"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=276"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/276\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}