Wiki source code of GNU Linux (obecně)
Last modified by bac0025 on 29.08.2017 12:43
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | Nejprve si pod uživatelem pro správu správně nastavte časovou zónu (ukázka změny na časovou zónu Europe/Prague): |
2 | |||
3 | |||
4 | ##**# tzconfig **## | ||
5 | (% style="color: rgb(255, 0, 0);" %)## Your current time zone is set to Africa/Abidjan##(%%) | ||
6 | ##** Do you want to change that? [n]: y** ## | ||
7 | |||
8 | ## Please enter the number of the geographic area in which you live: ## | ||
9 | |||
10 | |||
11 | |1) Africa|7) Australia | ||
12 | |2) America|8) (% style="color: rgb(255, 0, 0);" %)Europe | ||
13 | |3) US time zones|9) Indian Ocean | ||
14 | |4) Canada time zones|10) Pacific Ocean | ||
15 | |5) Asia|11) Use System V style time zones | ||
16 | |6) Atlantic Ocean |12) None of the above | ||
17 | |||
![]() |
2.2 | 18 | Then you will be shown a list of cities which represent the time zone in which they are located. You should choose a city in your time zone. |
![]() |
1.1 | 19 | |
20 | |||
![]() |
2.1 | 21 | **Number: 8** |
![]() |
2.6 | 22 | ##Amsterdam Andorra Athens Belfast Belgrade Berlin Bratislava Brussels |
![]() |
1.1 | 23 | Bucharest Budapest Chisinau Copenhagen Dublin Gibraltar Guernsey Helsinki |
24 | Isle_of_Man Istanbul Jersey Kaliningrad Kiev Lisbon Ljubljana London | ||
25 | Luxembourg Madrid Malta Mariehamn Minsk Monaco Moscow Nicosia Oslo Paris | ||
![]() |
2.1 | 26 | Podgorica (% style="color: rgb(255, 0, 0);" %)Prague(%%) Riga Rome Samara San_Marino Sarajevo Simferopol Skopje |
![]() |
1.1 | 27 | Sofia Stockholm Tallinn Tirane Tiraspol Uzhgorod Vaduz Vatican Vienna |
![]() |
2.6 | 28 | Vilnius Volgograd Warsaw Zagreb Zaporozhye Zurich ## |
![]() |
1.1 | 29 | |
![]() |
2.6 | 30 | ##Please enter the name of one of these cities or zones |
![]() |
1.1 | 31 | You just need to type enough letters to resolve ambiguities |
![]() |
2.6 | 32 | Press Enter to view all of them again## |
![]() |
1.1 | 33 | |
![]() |
2.6 | 34 | ##**Name: [] Prague**## |
35 | (% style="color: rgb(255, 0, 0);" %)##Your default time zone is set to 'Europe/Prague'.##(%%) | ||
36 | ##Local time is now: Tue Nov 6 07:55:25 CET 2007.## | ||
37 | ##Universal Time is now: Tue Nov 6 06:55:25 UTC 2007.## | ||
![]() |
1.1 | 38 | |
39 | |||
40 | V závislosti na správci balíčkového systému nainstalujeme potřebný balíček **ntpdate** (ukázka pro Ubuntu/Debian): | ||
41 | |||
![]() |
2.2 | 42 | ##** # apt-get install ntpdate**## |
![]() |
1.1 | 43 | ## Reading package lists... Done## |
44 | ## Building dependency tree... Done## | ||
45 | ## The following NEW packages will be installed:## | ||
46 | ## ntpdate## | ||
47 | ## 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.## | ||
48 | ## Need to get 57.7kB of archives.## | ||
49 | ## After unpacking 213kB of additional disk space will be used.## | ||
![]() |
2.2 | 50 | ## Get:1 http:~/~/ftp.dk.debian.org etch/main ntpdate 1:4.2.2.p4+dfsg-2 [57.7kB]## |
![]() |
1.1 | 51 | ## Fetched 57.7kB in 10s (5475B/s)## |
52 | ## Selecting previously deselected package ntpdate.## | ||
53 | ## (Reading database ... 23025 files and directories currently installed.)## | ||
54 | ## Unpacking ntpdate (from .../ntpdate_1%3a4.2.2.p4+dfsg-2_i386.deb) ...## | ||
55 | ## Setting up ntpdate (4.2.2.p4+dfsg-2) ...## | ||
![]() |
2.3 | 56 | |
57 | |||
58 | Aktuální čas systému: | ||
59 | |||
![]() |
2.5 | 60 | ##** # date **## |
![]() |
2.3 | 61 | ## Sun Nov 4 12:27:06 CET 2007## |
62 | |||
63 | |||
![]() |
2.4 | 64 | Pro synchronizaci času s našim ntp serverem použijeme program **ntpdate** takto: |
65 | |||
![]() |
2.5 | 66 | ##** # ntpdate ntp1.vsb.cz**## |
![]() |
2.4 | 67 | ## 4 Nov 10:46:39 ntpdate[2218]: step time server 158.196.0.2 offset -6072.831130 sec## |
68 | |||
69 | |||
70 | Aktuální čas systému (po synchronizaci): | ||
71 | |||
![]() |
2.5 | 72 | ##** # date **## |
![]() |
2.4 | 73 | ## Sun Nov 4 10:46:52 CET 2007## |
74 | |||
75 | |||
![]() |
2.3 | 76 | V případě, že je náš server nedostupný, vypíše se toto oznámení: |
77 | |||
![]() |
2.5 | 78 | ##**# ntpdate ntp2.vsb.cz **## |
![]() |
2.3 | 79 | ## 4 Nov 12:27:38 ntpdate[2219]: no server suitable for synchronization found ## |
80 | |||
81 | |||
82 | Pro pravidelnou synchronizaci času přidáme do Cronu (/etc/crontab) tento řádek: | ||
83 | |||
84 | ## 1 * * * * root /usr/sbin/ntpdate ntp1.vsb.cz >/dev/null 2>&1 ## |