System information

The default on Ubuntu is to run a time sync server without ever changing the time on
your own machine. This won’t work for our needs, so we’ll need to change the
configuration file slightly. Because of this, we need to guide you through using a com-
mand line editor. The nano editor is already installed on your Ubuntu machine and is
remarkably easy to use
:
$ sudo nano /etc/ntp.conf
Your terminal will switch to full-screen output.
Use your arrow keys to move down to the section that looks like
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
Add two new lines after this section, to allow ntpd to synchronize your time with the
outside world, such that the above section now looks like
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict -4 127.0.0.1
restrict -6 ::1
That’s everything we need to change, so exit the editor by pressing Ctrl
+X . When
prompted whether to save the modifications, press Y; nano will additionally ask you
for the filename. Just hit Enter to confirm the default /etc/ntp.conf.
Now restart the NTP daemon:
$ sudo /etc/init.d/ntp restart
With the operating system installed, you’re ready to install the dependencies required
for Asterisk. The next section provides an in-depth review of the installation process.
If you’ve already reviewed the information in “Software Dependencies” on page 44,
you may want to refer back to “Installation Cheat Sheet” on page 31 for a high-level
review of how to install Asterisk.
Software Dependencies
The first thing you need to do once you’ve completed the installation of your operating
system is to install the software dependencies required by Asterisk. The commands
listed in Table 3-1 have been split into two columns, for Ubuntu Server and CentOS
Server. These packages will allow you to build a basic Asterisk system, along with
DAHDI and LibPRI. Not every module will be available at compile time with these
† If you’re already familiar with another editor, go ahead and use it. The nano editor has been selected for its
ease of use and its handy on-screen instructions. We even know a developer at Digium who uses it while
writing code for Asterisk, though most people tend to use more complex editors such as emacs or vim.
44 | Chapter 3:Installing Asterisk