83 lines
5.4 KiB
HTML
83 lines
5.4 KiB
HTML
<h1 id="setting-the-server-time">Setting the server time</h1>
|
||
|
||
<p>Accurate time keeping on your server is vital for LibreTime performance. You can confirm that the date and time of your server are set correctly with the <strong>date</strong> command:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>date
|
||
</code></pre></div></div>
|
||
|
||
<p>The server should respond with the date, time, time zone and year in a format similar to the following example:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Tue Jul 2 15:08:57 BST 2013
|
||
</code></pre></div></div>
|
||
|
||
<p>If the time on your server is wrong, it is recommended that you take LibreTime off-air until the problem is fixed.</p>
|
||
|
||
<h2 id="configuring-ntp">Configuring NTP</h2>
|
||
|
||
<p>Although it is possible to set the date and time of the server manually, this is not recommended because the server clock can drift over time, compromising the accuracy of your broadcast schedule. If your LibreTime server is permanently connected to the Internet, you can synchronize your server to a time server with the <strong>ntp</strong> ** program. If <strong>ntp</strong> is not yet installed, you can enter the following command on Debian or Ubuntu:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo apt-get install ntp
|
||
</code></pre></div></div>
|
||
|
||
<p>Optionally, open the <strong>ntp</strong> configuration file in the <strong>nano</strong> editor to add further time server names:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/ntp.conf
|
||
</code></pre></div></div>
|
||
|
||
<p>On Ubuntu GNU/Linux, the default time server is <em>ntp.ubuntu.com</em>, but there are many other time servers available on the public Internet, including the group of servers listed at <a href="http://www.pool.ntp.org/">http://www.pool.ntp.org/</a> for each country. Using a variety of NTP servers located closely to your LibreTime server should produce the most accurate results. For example, for a server in the United Kingdom you could use the following list:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code># You do need to talk to an NTP server or two (or three).
|
||
server ntp.ubuntu.com
|
||
server 0.uk.pool.ntp.org
|
||
server 1.uk.pool.ntp.org
|
||
server 2.uk.pool.ntp.org
|
||
server 3.uk.pool.ntp.org
|
||
</code></pre></div></div>
|
||
|
||
<p>Enter the server names you require, press <strong>Ctrl+O</strong> to write out the <em>/etc/ntp.conf</em> file, then <strong>Ctrl+X</strong> to exit <strong>nano</strong>. Restart the <strong>ntp</strong> service with:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo invoke-rc.d ntp restart
|
||
</code></pre></div></div>
|
||
|
||
<p>The server should respond:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* Stopping NTP server ntpd [ OK ]
|
||
* Starting NTP server ntpd [ OK ]
|
||
</code></pre></div></div>
|
||
|
||
<p>Then use the <strong>ntpq -p</strong> command to confirm that <strong>ntp</strong> is working. This command should produce output similar to the following:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ntpq -p
|
||
remote refid st t when poll reach delay offset jitter
|
||
==================================================================
|
||
europium. 193.79.237.14 2 u 28 64 3 39.571 12.600 3.590
|
||
norb.v4.c 46.227.200.72 3 u 28 64 3 47.856 -6.908 10.028
|
||
82.113.15 193.62.22.82 2 u 29 64 3 11.458 -0.513 2.629
|
||
ntppub.le 158.43.192.66 2 u 91 64 2 122.781 44.864 0.001
|
||
dns0.rmpl 195.66.241.3 2 u 27 64 3 22.171 1.464 4.242
|
||
</code></pre></div></div>
|
||
|
||
<h2 id="adjusting-the-server-time-zone">Adjusting the server time zone</h2>
|
||
|
||
<p>The data centre which hosts your LibreTime server could be located anywhere in the world. Some servers are set to <em>Coordinated Universal Time</em> or UTC (similar to <em>Greenwich Mean Time</em> or GMT), regardless of their location. LibreTime uses UTC time in its database for scheduling purposes, independent of the server time zone.</p>
|
||
|
||
<p>If the server time zone is not appropriate for integration with your station’s other systems, on a Debian or Ubuntu server you can reconfigure the <strong>tzdata</strong> (time zone data) package with the command:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo dpkg-reconfigure tzdata
|
||
</code></pre></div></div>
|
||
|
||
<p>This command opens a menu in which you can select the continent that you require, by pressing the Enter key.</p>
|
||
|
||
<p><img src="img/Screenshot15-Configuring_tzdata.png" alt="" /></p>
|
||
|
||
<p>The next step is to select your nearest city, again by pressing the Enter key. The appropriate time zone is selected according to the information that you have entered.</p>
|
||
|
||
<p><img src="img/Screenshot16-Configure_city.png" alt="" /></p>
|
||
|
||
<p>The console output from the <strong>dpkg-reconfigure tzdata</strong> command will confirm the new setting:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Current default time zone: 'Europe/London'
|
||
Local time is now: Tue Jul 2 15:18:01 BST 2013.
|
||
Universal Time is now: Tue Jul 2 14:18:01 UTC 2013.
|
||
</code></pre></div></div>
|