1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
you need to make sure ntp-client and ntpd (from openntpd) have been |
5 |
started, and you have a valid time server. |
6 |
|
7 |
Below I have included everything I hope will help you |
8 |
|
9 |
- ------------ |
10 |
xaero@Leviathan ~ $ emerge -vp openntpd |
11 |
|
12 |
These are the packages that would be merged, in order: |
13 |
|
14 |
Calculating dependencies... done! |
15 |
[ebuild R ] net-misc/openntpd-3.9_p1-r1 USE="ssl (-selinux)" 150 kB |
16 |
|
17 |
Total: 1 package (1 reinstall), Size of downloads: 150 kB |
18 |
xaero@Leviathan ~ $ cat /etc/conf.d/ntpd |
19 |
# /etc/conf.d/ntpd: config file for openntpd's ntpd |
20 |
|
21 |
NTPD_HOME=/var/empty |
22 |
|
23 |
# See ntpd(8) man page ... some popular options: |
24 |
# -s Set the time immediately at startup |
25 |
NTPD_OPTS="" |
26 |
xaero@Leviathan ~ $ cat /etc/conf.d/ntp-client |
27 |
# /etc/conf.d/ntp-client |
28 |
|
29 |
# Command to run to set the clock initially |
30 |
# Most people should just leave this line alone ... |
31 |
# however, if you know what you're doing, and you |
32 |
# want to use ntpd to set the clock, change this to 'ntpd' |
33 |
NTPCLIENT_CMD="ntpdate" |
34 |
|
35 |
# Options to pass to the above command |
36 |
# This default setting should work fine but you should |
37 |
# change the default 'pool.ntp.org' to something closer |
38 |
# to your machine. See http://www.pool.ntp.org/ or |
39 |
# try running `netselect -s 3 pool.ntp.org`. |
40 |
NTPCLIENT_OPTS="-s -b -u pool.ntp.org" |
41 |
xaero@Leviathan ~ $ cat /etc/ntp |
42 |
ntp.conf ntp.conf~ ntpd.conf |
43 |
xaero@Leviathan ~ $ cat /etc/ntpd.conf |
44 |
# $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $ |
45 |
# sample ntpd configuration file, see ntpd.conf(5) |
46 |
|
47 |
# Addresses to listen on (ntpd does not listen by default) |
48 |
#listen on * |
49 |
#listen on 127.0.0.1 |
50 |
#listen on ::1 |
51 |
|
52 |
# sync to a single server |
53 |
#server ntp.example.org |
54 |
|
55 |
# use a random selection of 8 public stratum 2 servers |
56 |
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers |
57 |
servers pool.ntp.org |
58 |
xaero@Leviathan ~ $ cat /etc/ntp.conf |
59 |
# NOTES: |
60 |
# - you should only have to update the server line below |
61 |
# - if you start getting lines like 'restrict' and 'fudge' |
62 |
# and you didnt add them, AND you run dhcpcd on your |
63 |
# network interfaces, be sure to add '-Y -N' to the |
64 |
# dhcpcd_ethX variables in /etc/conf.d/net |
65 |
|
66 |
# Name of the servers ntpd should sync with |
67 |
# Please respect the access policy as stated by the responsible person. |
68 |
#server ntp.example.tld iburst |
69 |
|
70 |
server pool.ntp.org |
71 |
netselect -s 3 pool.ntp.org |
72 |
|
73 |
## |
74 |
# A list of available servers can be found here: |
75 |
# http://www.pool.ntp.org/ |
76 |
# http://www.pool.ntp.org/#use |
77 |
# A good way to get servers for your machine is: |
78 |
# netselect -s 3 pool.ntp.org |
79 |
## |
80 |
|
81 |
# you should not need to modify the following paths |
82 |
driftfile /var/lib/ntp/ntp.drift |
83 |
|
84 |
#server ntplocal.example.com prefer |
85 |
#server timeserver.example.org |
86 |
|
87 |
# Warning: Using default NTP settings will leave your NTP |
88 |
# server accessible to all hosts on the Internet. |
89 |
|
90 |
# If you want to deny all machines (including your own) |
91 |
# from accessing the NTP server, uncomment: |
92 |
#restrict default ignore |
93 |
|
94 |
|
95 |
# To deny other machines from changing the |
96 |
# configuration but allow localhost: |
97 |
restrict default nomodify nopeer |
98 |
restrict 127.0.0.1 |
99 |
|
100 |
|
101 |
# To allow machines within your network to synchronize |
102 |
# their clocks with your server, but ensure they are |
103 |
# not allowed to configure the server or used as peers |
104 |
# to synchronize against, uncomment this line. |
105 |
# |
106 |
restrict 192.168.1.0 mask 255.255.255.0 nomodify nopeer notrap |
107 |
xaero@Leviathan ~ $ |
108 |
|
109 |
- --------- |
110 |
EOF |
111 |
|
112 |
|
113 |
John J. Foster wrote: |
114 |
| Hi all - it's been awhile |
115 |
| |
116 |
| This past week I've set up Gentoo running in a VM built by |
117 |
| http://www.easyvmx.com/ under a XP host. Installation and configuration |
118 |
| went fine. I normally leave the VM running when I walk away from the |
119 |
| machine, but when I return, time is way off. Shutting down Gentoo & the |
120 |
| VM & rebooting solvles the problem, as vmplayer must initially get the |
121 |
| date and time from the host, but it sure doesn't keep it right after |
122 |
| that. I tried openntpd, but it kept setting the time further and further |
123 |
| off. I live in Fort Collins, Co and my locatime is set correctly |
124 |
| (America/Denver). This is my 1st time playing with VM's. Is this common? |
125 |
| Is there any way around it? I'm not really sure why openntpd didn't |
126 |
| work. |
127 |
| |
128 |
| Any and all help appreciated. |
129 |
| |
130 |
| Thanks, |
131 |
| festus |
132 |
-----BEGIN PGP SIGNATURE----- |
133 |
Version: GnuPG v2.0.7 (GNU/Linux) |
134 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
135 |
|
136 |
iD8DBQFHz2xd8hUIAnGfls4RAhofAKCKc3nbVbdY7Pu8m7UNu192PuLJ4QCeLpCz |
137 |
suznhio3Jt+UMeQSE4zOwL4= |
138 |
=/XSs |
139 |
-----END PGP SIGNATURE----- |
140 |
-- |
141 |
gentoo-user@l.g.o mailing list |