System information

Change the last line of the dahdi.rules file to the following:
SUBSYSTEM=="dahdi", OWNER="asteriskpbx", GROUP="asteriskpbx", MODE="0660"
With that out of the way, we can move on to performing the base configuration that
should be done after all installations.
Base Configuration
Now that we’ve got Asterisk installed, we can get our system up and running. The
purpose here is to get Asterisk loaded up and ready to go, as it isn’t doing anything
useful yet. These are the steps that all system administrators will need to start out with
when installing a new system. If the commands that need to be run differ on CentOS
and Ubuntu, you will see a table with rows labeled for each distribution; otherwise,
you will see a single command that should be run regardless of which Linux distribution
you have chosen.
Disable SELinux
This section applies only to CentOS users, so if you’re using Ubuntu,
you can skip to the next section.
In CentOS, the Security-Enhanced Linux (SELinux) system is enabled by default, and
it often gets in the way of Asterisk. Sometimes the issues are quite subtle, and at least
one of the authors has spent a good number of hours debugging issues in Asterisk that
turned out to be resolved by disabling SELinux. There are many articles on the Internet
that describe the correct configuration of SELinux, but we’re going to disable it for the
sake of simplicity.
While disabling SELinux is not the ideal situation, the configuration of
SELinux is beyond the scope of this book, and frankly, we just don’t
have enough experience with it to configure it correctly.
To temporarily switch off SELinux, perhaps in order to verify whether an issue you’re
having is being caused by SELinux, run the following command as root:
$ sudo echo 0 > /selinux/enforce
You can reenable SELinux by doing the same thing, but replacing the 0 with a 1:
$ sudo echo 1 > /selinux/enforce
Base Configuration | 51