centos伺服器搭建ntp服務
1、安裝前的準備
檢視系統上面設定的時區
[root@linux-node1 ~]# cat /etc/sysconfig/clock
ZONE="Asia/Shanghai"
思想:怎麼修改linux主機上面的解決辦法:
修改時區
vim /etc/sysconfig/clock
ZONE="Asia/Shanghai"
UTC=true
ARC=false
覆蓋系統時間檔案
cp -a /usr/share/zoneinfo/Asia/Shanghai /etc/localtime#2、開始安裝ntp伺服器
採用yum/rpm方式安裝
yum install ntp -y
檢視安裝是否成功
[root@linux-node1 ~]# rpm -qa ntp
ntp-4.2.6p5-10.el6.centos.1.x86_64
3、開始配置ntp伺服器
vim /etc/ntp.conf
下面為我修改的/etc/ntp.conf配置檔案,下面為大家解釋一部分引數的意思:
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery #預設是拒絕所有的ntp連線
restrict -6 default kod nomodify notrap nopeer noquery #拒絕IP-V6的ntp連線
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 #這裡也可以允許單個ip進行對時服務
restrict -6 ::1
# Hosts on local network are less restricted.
restrict 192.168.17.0 mask 255.255.255.0 nomodify notrap #允許哪些網段可以使用這個ntp對時服務
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 2.cn.pool.ntp.org #上層ntp伺服器
server time.nist.gov prefer
server 1.cn.pool.ntp.org
4、時間同步伺服器上面的操作
[[email protected] ~]# /etc/init.d/ntpd restart
Shutting down ntpd: [ OK ]
Starting ntpd: [ OK ]
[[email protected] ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+panel.gerardope 116.49.102.213 2 u 24 64 1 211.688 -17.119 0.122
*time-d.nist.gov .ACTS. 1 u 22 64 1 348.603 3.607 0.122
static-5-103-12 .GPS. 1 u 22 64 1 311.951 -16.711 0.122
解釋:
*號的意思:表示正在使用的上層NTP
+號的意思:表示已經連線成功的,可提供替補的時間同步伺服器
5、客戶機上面的操作
檢視當前時間
[[email protected] ~]# date
Wed Jan 11 00:08:37 CST 2017
更新時間
[[email protected] ~]# ntpdate 192.168.17.23
23 Jan 20:33:13 ntpdate[27191]: step time server 192.168.17.23 offset 1110147.826055 sec
更新時間成功
[[email protected] ~]# date
Mon Jan 23 20:33:15 CST 2017
6、在Windows伺服器上面進行操作
如下圖所示:
相關推薦
centos伺服器搭建ntp服務
1、安裝前的準備 檢視系統上面設定的時區 [root@linux-node1 ~]# cat /etc/sysconfig/clock ZONE="Asia/Shanghai" 思想:怎麼修改li
Centos 快速搭建ntp服務器
ntp Centos 快速搭建ntp服務器 centos 6.5測試成功 一、 安裝並配置yum -y install ntp ntpdate (若系統未安裝ntp服務)vi /etc/ntp.conf (以下是ntp.conf文件的內容)#設置此服務器同上層服務器做時間同步的IP地址,pref
windows 2008 R2 搭建NTP服務器方法與分析
windows 2008 r2 ntp ntp服務器 windows 2008 r2 ntp服務器搭建 NTP服務器配置方法Windows 運行打開“regedit”編輯註冊表;找到"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32T
搭建NTP服務器
服務器 linux centos Centos6.8部署內網NTP服務器一、環境簡介 二、部署拓撲圖 三、部署NTP服務3.1 安裝NTP軟件[[email protected]/* */ ~]# yum install ntp -y[[email protected]/*
centos 環境搭建git 服務器
swd min rand bsp font clas app 連接 nac 首先yum安裝git yum install git 查看git的版本 sudo git --version 服務器端創建一個git 用戶,專門來處理git服務,並為git用戶
centos 7 安裝ntp服務器
每天 entos 0.20.2 detail ntp服務器 onf cst /usr centos 7 yum install ntp ntpdate -y 第二步 查找時間同步服務器 http://www.pool.ntp.org/zone/asia 第三步
CentOS 7 搭建 VPN 服務
rect 寫入 服務器 ets 添加 cto ubuntu 成功 工作區 檢查是否支持 若你使用XEN架構的VPS,下面的步驟不用執行 檢測PPP是否開啟: cat /dev/ppp 開啟成功的標誌:cat: /dev/ppp: No such file or direct
在centos中搭建vsftpd服務器
記錄 ftp gin ges -s 步驟 inux sysconf 命令 最近在學習linux的知識,在學習中是一步一個坑,沒點脾氣,誰讓我啥都不會呢。 搭建vsftpd服務器步驟: 1、查看本機是否安裝了vsftpd,命令rpm -qa|grep vsftpd 2、如果
在CentOS上搭建PHP服務器環境(可用)
body ont localhost 本地登錄 oca 命令 user 重啟 devel 原文:https://www.cnblogs.com/zy2009/p/7047828.html 1,先安裝apache: yum install httpd 配置Se
華旭收-RedHat5.X系列linux搭建NTP服務詳細方法
華旭收-RedHat5.X系列linux搭建NTP服務詳細方法華旭是小白鼠,請勿糾結標題。ntp也就是時間伺服器原理和作用:1.大資料產生與處理系統是各種計算裝置叢集的,計算裝置將統一、同步的標準時間用於記錄各種事件發生時序,如E-MAIL資訊、檔案建立和訪問時間、資料庫處理時間等。2.大資料系統內不同計算裝
SVN伺服器搭建(服務端+客戶端)
Windows下使用VisualSVN Server搭建SVN伺服器 SVN簡介: 1、為什麼要使用SVN? 程式設計師在編寫程式的過程中,每個程式設計師都會生成很多不同的版本,這就需要程式設計師有效的管
CentOS伺服器搭建anaconda3+tensorflow環境
之前用自己的電腦跑程式,效果不是很好,老師分配了伺服器結點,所以就在伺服器上配置了一遍。作為小白,對Linux命令列並不是很熟,踩了不少坑,現在配置好了,記錄一下過程。 一、安裝Anaconda3 直接從官網下載非常慢,甚至連線不上,所以找了清華的映象https://mirro
基於滴滴雲 CentOS 伺服器搭建 Nexus Maven 私庫
本文講解如何在滴滴雲 CentOS 伺服器上搭建 Maven 私庫, 筆者假設讀者已經對於 Maven、Java有基本的瞭解,已經知道如何構建一個基本的 Maven 專案。 Maven 私庫在公司的協作開發中是必不可少的工具。 藉助於私庫可以引用公司內部工具包,提高常見 JAR 包下載速
SoftEther centos伺服器搭建
1 安裝部署 服務端 # cd /usr/local/ 開啟要安裝的路徑,可以自定義 # wget https://github.com/SoftEtherVPN/SoftEtherVPN
centos上搭建GIT服務器
版本 text RoCE 自己 author follow 創建秘鑰 sha 由於 前言:作為目前世界上最先進的分布式版本控制系統,簡單來說就是高端大氣上檔次!代碼托管倉庫有兩種類型。遠程倉庫和本地倉庫;兩者沒啥不同,純粹為了7*24小時開機並交換大家的修改。GitHub就
centos伺服器搭建代理IP 給 Python爬蟲使用
centos7伺服器 用Squid搭建HTTP代理,給python 爬 網站用 python 爬一個網站次數太多,被封IP,就用代理IP解決 可去西刺免費代理IP網站找免費代理IP(http://www.xicidaili.com/) 找了一會免費IP,發現不
專案開發環境部署:Linux上搭建ntp服務,實現時間同步
一 引言目前的專案有多個伺服器,排查BUG,發現各個伺服器的時間不一致,遂網上查詢資源,使得時間保持一致。二 步驟1)以第一臺伺服器為“服務端”,其他臺伺服器為“客戶端”,“客戶端”從“服務端”同步時間。2)所有伺服器安裝ntp服務:yum install ntp
ubuntu伺服器搭建pptp服務實現vpn伺服器
我們知道,VPN有很多種,比如Windows Server系列自己就帶了VPN伺服器,安裝配置都非常簡單,而今天我要在日誌中介紹部署的,是Linux下的VPN-Server,基於PPTP協議。Ubuntu系統是基於Debian構造的一版發行版,交流社群非常活躍,而且因為基於
Aliyun伺服器搭建Git服務
軟體安裝 首先安裝必要的外掛: apt-get install git-core openssh-server openssh-client 使用者配置 新增git使用者: adduser -m git passwd git 初始化使用者
Linux CentOS 伺服器搭建與初始化配置圖文詳解
轉載自:http://www.linuxidc.com/Linux/2017-07/145878.htm 這幾天對伺服器興趣賊為濃厚,在虛擬機器上裝了一個CentOS7玩了玩,遇到過很多問題,比如網絡卡驅動設定,不能ping 等等問題,然後掏錢買個ECS搭伺服器玩玩,