AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / server / Perguntas / 913968
Accepted
BentCoder
BentCoder
Asked: 2018-05-28 00:12:07 +0800 CST2018-05-28 00:12:07 +0800 CST 2018-05-28 00:12:07 +0800 CST

O NTP não parece estar ativado e sincronizado no Debian Jessie

  • 772

Quando sigo as etapas abaixo no Ubuntu, o NTP é ativado e sincronizado. No entanto, o caso é oposto no Debian Jessie. Alguém sabe a razão pela qual o Debian diz "não"? Também devo me preocupar, pois a "hora local" está correta?

Passos dados

$ timedatectl set-timezone Europe/London

$ sudo apt-get install -y ntp

$ cat /etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
server 0.uk.pool.ntp.org iburst
server 1.uk.pool.ntp.org iburst
server 2.uk.pool.ntp.org iburst
server 3.uk.pool.ntp.org iburst
restrict 127.0.0.1
restrict ::1

$ service ntp stop
$ ntpd -gq
$ service ntp start

$ systemctl enable ntp
$ systemctl restart ntp

Status do Debian

$ timedatectl
      Local time: Sun 2018-05-27 08:57:32 BST
  Universal time: Sun 2018-05-27 07:57:32 UTC
        RTC time: Sun 2018-05-27 07:57:30
       Time zone: Europe/London (BST, +0100)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2018-03-25 00:59:59 GMT
                  Sun 2018-03-25 02:00:00 BST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2018-10-28 01:59:59 BST
                  Sun 2018-10-28 01:00:00 GMT


$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+h88-150-240-202 217.114.59.66    3 u   36   64    1   10.349   -1.919   0.882
*ntp3.wirehive.n 195.66.241.2     2 u   33   64    3   13.717   -0.094   1.398
+ns1.do.steersne 195.66.241.3     2 u   32   64    3    9.994   -1.230   0.947

Status do Ubuntu

$ timedatectl
      Local time: Sun 2018-03-14 10:51:48 GMT
  Universal time: Sun 2018-03-14 10:51:48 UTC
        RTC time: Sun 2018-03-14 10:51:46
       Time zone: Europe/London (GMT, +0000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no
ntp
  • 1 1 respostas
  • 3940 Views

1 respostas

  • Voted
  1. Best Answer
    Thomas
    2018-05-28T01:42:17+08:002018-05-28T01:42:17+08:00

    Para habilitar a sincronização de tempo com timedatectluse o comando a seguir.

    timedatectl set-ntp true
    

    Isso habilitará o systemdserviço systemd-timesyncd.service. De man timedatectl.

    set-ntp [BOOL]
         Takes a boolean argument. Controls whether network time synchronization is active and enabled (if
         available). This enables and starts, or disables and stops the systemd-timesyncd.service unit. It does not
         affect the state of any other, unrelated network time synchronization services that might be installed on
         the system. This command is hence mostly equivalent to: systemctl enable --now systemd-timesyncd.service
         and systemctl disable --now systemd-timesyncd.service, but is protected by a different access policy.
    
         Note that even if time synchronization is turned off with this command, another unrelated system service
         might still synchronize the clock with the network. Also note that, strictly speaking,
         systemd-timesyncd.service does more than just network time synchronization, as it ensures a monotonic
         clock on systems without RTC even if no network is available. See systemd-timesyncd.service(8) for details
         about this.
    

    Portanto, é possível que, por exemplo , ntpou chronyjá estejam em execução, mas timedatectlpodem não estar cientes disso.

    Além disso, você pode ter que configurar seus servidores NTP, a /etc/systemd/timesyncd.confmenos que obtenha seus servidores NTP via DHCP ou eles também podem ser configurados em uma systemd-networkd.serviceconfiguração correspondente. Para mais informações consulte man systemd-timesyncd.service.

    • 4

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve