View previous topic :: View next topic |
Author |
Message |
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 4:57 pm Post subject: heure système |
|
|
mon heure système à une heure d'avance avec quel commande est-ce que je peux remédier à ça |
|
Back to top |
|
|
DuF Advocate
Joined: 09 Dec 2002 Posts: 2687 Location: Paris
|
Posted: Sat May 17, 2003 5:14 pm Post subject: |
|
|
avec date.
Sinon utilise ntpd, c'est geek mais c'est cool
emerge -s ntpd => pour voir ce que c ! |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 5:22 pm Post subject: |
|
|
il trouve pas de ntpd je pense qu'il a un autre nom mais lequel |
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 5:28 pm Post subject: |
|
|
oui c'est "emerge ntp" |
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 5:33 pm Post subject: |
|
|
Ton problème peut venir de l'heure qui est dérèglée, mais aussi de /etc/localtime. Il faut que ton système soit réglé sur l'heure GMT, et que tu fasses un "ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime". |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 5:34 pm Post subject: |
|
|
oui c'est bien ce que j'avais fait c'est bizarre qu'elle se soti déreglé mais je l'ai remis à l'heure avec date -s |
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 5:46 pm Post subject: |
|
|
Pour en revenir à ntp, tu peux mettre à jour l'heure système très facilement, en tapant "ntpdate ntp.tuxfamily.net" en tant que root. |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 6:35 pm Post subject: |
|
|
y prends combien de temps à compiler se ntp, juste pour savoir |
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 6:45 pm Post subject: |
|
|
moins de 2 min |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 7:02 pm Post subject: |
|
|
quoi non c'est pas possible ça fait au moins un demi heure que ça compile pourtant ça va vite |
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 7:05 pm Post subject: |
|
|
C'est pas possible je viens de l'installer ce soir (j'ai réinstallé mon système en début de semaine et je n'avais pas installé ntp)... Est-ce que tu as une connexion 56k ? |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 7:08 pm Post subject: |
|
|
non pas du tout j'ai l'adsl 512kb, moi c'est la compilation qui prends un siècle pour le télécharger ça m'a pris peut-être 1 minute |
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 7:11 pm Post subject: |
|
|
Je viens de le réinstaller pour chronométrer (pour m'assurer de ma santé mentale). Sans compter le temps de téléchargement (cad uniquement décompression + compilation), 1min 24s. |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat May 17, 2003 7:27 pm Post subject: |
|
|
j'ai l'impression que ça tourne en boucle c'est possible |
|
Back to top |
|
|
sieurVLD n00b
Joined: 15 Nov 2002 Posts: 27 Location: Meudon, France, Europe
|
Posted: Sat May 17, 2003 7:42 pm Post subject: |
|
|
date -s 12:00:00 pour mettre l'heure a midi
mais c'est sûrement un problème de fuseau horaire comme dit Dom ou simplement que ton bios est a l'heure local et que ton rc.conf indique UTC.
tiens une info pas très loin: http://www.gentoo.org/doc/fr/guide-localization.xml _________________ Ressource toi. Un point c'est tout. |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sat May 17, 2003 7:50 pm Post subject: |
|
|
Y'avait peut-être des dépendances que tu n'avais pas installées encore. Quelque chose là dedans :
Code: | thomas@gromit gdm $ emerge -ep ntp
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] sys-devel/patch-2.5.4-r5
[ebuild N ] sys-devel/gettext-0.11.5-r1
[ebuild N ] sys-apps/gawk-3.1.2-r3
[ebuild N ] sys-libs/zlib-1.1.4-r1
[ebuild N ] dev-python/python-fchksum-1.6.1-r1
[ebuild N ] sys-apps/bzip2-1.0.2-r2
[ebuild N ] sys-apps/debianutils-1.16.7-r1
[ebuild N ] sys-libs/ncurses-5.3-r1
[ebuild N ] sys-libs/readline-4.1-r5
[ebuild N ] app-shells/bash-2.05b-r5
[ebuild N ] dev-util/dialog-0.9_beta20030308-r1
[ebuild N ] sys-apps/grep-2.5.1-r1
[ebuild N ] sys-apps/texinfo-4.5
[ebuild N ] sys-apps/groff-1.18.1-r2
[ebuild N ] sys-apps/cronbase-0.2.1-r2
[ebuild N ] sys-apps/man-1.5l-r3
[ebuild N ] sys-devel/libtool-1.4.3-r1
[ebuild N ] sys-devel/m4-1.4
[ebuild N ] sys-libs/db-1.85-r1
[ebuild N ] sys-libs/db-3.2.9-r2
[ebuild N ] sys-libs/gdbm-1.8.0-r5
[ebuild N ] dev-lang/perl-5.6.1-r11
[ebuild N ] app-admin/gentoolkit-0.1.23
[ebuild N ] dev-lang/tcl-8.4.2
[ebuild N ] dev-perl/ExtUtils-MakeMaker-6.05-r4
[ebuild N ] dev-perl/Safe-2.09
[ebuild N ] media-libs/libpng-1.2.5-r4
[ebuild N ] sys-devel/flex-2.5.4a-r5
[ebuild N ] x11-base/opengl-update-1.5
[ebuild N ] media-libs/freetype-2.1.4
[ebuild N ] x11-misc/ttmkfdir-3.0.9
[ebuild N ] dev-libs/expat-1.95.6-r1
[ebuild N ] sys-devel/autoconf-2.57-r1
[ebuild N ] sys-apps/miscfiles-1.3-r1
[ebuild N ] sys-libs/cracklib-2.7-r7
[ebuild N ] sys-devel/gcc-config-1.3.3-r1
[ebuild N ] sys-devel/gcc-2.95.3-r8
[ebuild N ] dev-libs/glib-1.2.10-r5
[ebuild N ] sys-libs/pwdb-0.61-r4
[ebuild N ] sys-devel/automake-1.7.2
[ebuild N ] sys-libs/pam-0.75-r11
[ebuild N ] sys-apps/ed-0.2-r3
[ebuild N ] media-libs/fontconfig-2.2.0-r2
[ebuild N ] app-arch/unzip-5.50-r1
[ebuild N ] app-arch/cabextract-0.6
[ebuild N ] x11-base/xfree-4.3.0-r2
[ebuild N ] dev-lang/tk-8.4.2
[ebuild N ] dev-lang/python-2.2.2-r1
[ebuild N ] sys-apps/fileutils-4.1.11
[ebuild N ] sys-apps/portage-2.0.48_pre6
[ebuild N ] sys-kernel/linux-headers-2.4.18
[ebuild N ] sys-apps/baselayout-1.8.6.7
[ebuild N ] sys-libs/glibc-2.2.5-r8
[ebuild N ] sys-apps/sed-4.0.7
[ebuild N ] net-misc/ntp-4.1.1b-r5 |
Sinon, sur les histoires d'heure, y'a en fait deux façons de la régler: soit tu mets ta carte-mère en GMT et tu fait effectivement le lien vers la bonne timezone et tu vérifies que tu as bien CLOCK="UTC" dans /etc/rc.conf, soit tu mets ta carte-mère en GMT+2 et tu mets un CLOCK="local" dans /etc/rc.conf. La 1ère méthode est plus pure, mais elle peut interférer avec windows (au moins avec 95/98, les autres je sais pas) qui considère que tu es en heure locale.
Et une fois que tu auras installé "ntp", tu devras le configurer. Pour te faire gagner du temps, voilà à quoi ça ressemble chez moi:
Code: | thomas@gromit gdm $ more /etc/conf.d/ntpd
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.12 2003/02/03 06:52:58 vapier Exp $
# NOTES:
# - NTPDATE variables below are used if you wish to set your
# clock when you start the ntp init.d script
# - make sure that the NTPDATE_CMD will close by itself ...
# the init.d script will not attempt to kill/stop it
# - ntpd will be used to maintain synchronization with a time
# server regardless of what NTPDATE is set to
# - read each of the comments above each of the variable
# Comment this out if you dont want the init script to warn
# about not having ntpdate setup
NTPDATE_WARN="y"
# Command to run to set the clock initially
# Most people should just uncomment this line ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'
NTPDATE_CMD="ntpdate"
# Options to pass to the above command
# Most people should just uncomment this variable and
# change 'someserver' to a valid hostname which you
# can aquire from the URL's below
NTPDATE_OPTS="-b chronos.cru.fr"
##
# A list of available servers is available here:
# http://www.eecis.udel.edu/~mills/ntp/servers.html
# Please follow the rules of engagement and use a
# Stratum 2 server (unless you qualify for Stratum 1)
##
# Options to pass to the ntpd process that will *always* be run
# Most people should not uncomment this line ...
# however, if you know what you're doing, feel free to tweak
#NTPD_OPTS="" |
Puis démarrer le service et l'ajouter runlevel "default":
Code: | > /etc/init.d/ntpd start
> rc-update add ntpd default |
|
|
Back to top |
|
|
Dom Guru
Joined: 25 Mar 2003 Posts: 416 Location: Menton, France
|
Posted: Sat May 17, 2003 8:00 pm Post subject: |
|
|
Je suis bête j'ai pas pensé aux dépendances
En fait j'ai eu de la chance puisque chez moi tout était déjà installé à part ntp. |
|
Back to top |
|
|
crevette Guru
Joined: 21 May 2002 Posts: 543 Location: Chrooted in Nice, France
|
Posted: Sun May 18, 2003 7:33 am Post subject: |
|
|
A noter qu'il ya un bug dans l'ebuild : il faut faire un lien symbolique de /etc/init.d/ntp vers /etc/ntp.conf _________________ http://www.mille-mathias.info |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sun May 18, 2003 10:09 am Post subject: |
|
|
merci |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sun May 18, 2003 12:01 pm Post subject: |
|
|
crevette wrote: | A noter qu'il ya un bug dans l'ebuild : il faut faire un lien symbolique de /etc/init.d/ntp vers /etc/ntp.conf |
Ah bon ? J'en ai pas eu besoin moi. Bizarre. |
|
Back to top |
|
|
crevette Guru
Joined: 21 May 2002 Posts: 543 Location: Chrooted in Nice, France
|
Posted: Sun May 18, 2003 12:18 pm Post subject: |
|
|
j'avais editer le fichier /etc/conf.d/ntpd, puis j'ai démarré le server et ca m'affichait un msg d'erreur sur le fichier /etc/ntpd.conf, qui n'existait pas.
donc j'ai creer le symlink.
d'ailleurs je vais verifier l'ebuild et soumettre un bug report _________________ http://www.mille-mathias.info |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sun May 18, 2003 12:37 pm Post subject: |
|
|
Bah un symlink ça me parait spé. Moi j'ai un bête fichier qui contient ça:
Code: | thomas@~/ $ more /etc/ntp.conf
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0
fudge 127.127.1.0 stratum 3
server 127.127.1.0
driftfile /etc/ntp.drift
logfile /var/log/ntp.log |
Je suis incapablede me souvenir d'où il vient, si je l'ai créé ou pas... Enfin, il n'appartient en effet à aucun de mes paquets courants, mais peut-être que j'ai l'ai eu par une précédente version de ntp. |
|
Back to top |
|
|
crevette Guru
Joined: 21 May 2002 Posts: 543 Location: Chrooted in Nice, France
|
Posted: Sun May 18, 2003 12:43 pm Post subject: |
|
|
a oui c'est pas la meme chose.
je m'etait que c'est un bete symlink qui foirait.
bon je recopie ta conf alors. _________________ http://www.mille-mathias.info |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sun May 18, 2003 1:04 pm Post subject: |
|
|
Je sais pas ce qu'elle vaut ma conf hein. En fait, y'a des trucs qui me paraissent être du n'importe quoi (genre le server à 127.127.1.0, si c'est l'adresse du serveur de synchro, alors c'est n'importe quoi), mais qui doivent être en fait corrigés en option de la ligne de commande qui est lancée (le "-b chronos.cru.fr" de mon /etc/conf.d/ntpd). Enfin je pense... |
|
Back to top |
|
|
DuF Advocate
Joined: 09 Dec 2002 Posts: 2687 Location: Paris
|
Posted: Sun May 18, 2003 10:35 pm Post subject: |
|
|
Oui ne pas confondre /etc/ntp.conf et /etc/conf.d/ntpd
Chez moi voilà à quoi ils correspondent :
Code: | charli@gentoo:~$ cat /etc/ntp.conf
logfile /var/log/ntpd.log
driftfile /var/lib/misc/ntp.drift
# Name of the servers ntpd should sync with
# Please respect the access policy as stated by the responsible person.
#server ntp.example.tld iburst
##
# A list of available servers is available here:
# * http://www.eecis.udel.edu/~mills/ntp/clock1.html
# and
# * http://www.eecis.udel.edu/~mills/ntp/clock2.html
##
|
Code: | charli@gentoo:~$ cat /etc/conf.d/ntpd
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.12 2003/02/03 06:52:58 vapier Exp $
# NOTES:
# - NTPDATE variables below are used if you wish to set your
# clock when you start the ntp init.d script
# - make sure that the NTPDATE_CMD will close by itself ...
# the init.d script will not attempt to kill/stop it
# - ntpd will be used to maintain synchronization with a time
# server regardless of what NTPDATE is set to
# - read each of the comments above each of the variable
# Comment this out if you dont want the init script to warn
# about not having ntpdate setup
NTPDATE_WARN="y"
# Command to run to set the clock initially
# Most people should just uncomment this line ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'
NTPDATE_CMD="ntpdate"
# Options to pass to the above command
# Most people should just uncomment this variable and
# change 'someserver' to a valid hostname which you
# can aquire from the URL's below
NTPDATE_OPTS="-b ntp.via.ecp.fr ntp2.via.ecp.fr"
##
# A list of available servers is available here:
# http://www.eecis.udel.edu/~mills/ntp/servers.html
# Please follow the rules of engagement and use a
# Stratum 2 server (unless you qualify for Stratum 1)
##
# Options to pass to the ntpd process that will *always* be run
# Most people should not uncomment this line ...
# however, if you know what you're doing, feel free to tweak
#NTPD_OPTS=""
|
|
|
Back to top |
|
|
|