System information

To disable SELinux permanently, modify the /etc/selinux/config file:
$ cd /etc/selinux/
$ sudo vim config
Change the SELINUX option from enforcing to disabled.
Alternatively, you can change the value of enforcing to permissive,
which simply logs the errors instead of enforcing the policy.
When you’re done modifying the configuration file, you’ll have the following:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
Since you can’t disable SELinux without rebooting, you’ll need to do that now:
$ sudo reboot
Initial Configuration
In order to get Asterisk up and running cleanly, we need to create some configuration
files. We could potentially install the sample files that come with Asterisk (by executing
the make samples command in our Asterisk source) and then modify those files to suit
our needs, but the make samples command installs many sample files, most of them
for modules that you will never use. We want to limit which modules we are loading,
and we also believe that it’s easier to understand Asterisk configuration if you build
your config files from scratch, so we’re going to create our own minimal set of config-
uration files.
#
The first thing we need to do (assuming it does not already exist) is create the /etc/
asterisk/ directory where our configuration files will live:
$ sudo mkdir /etc/asterisk/
$ sudo chown asteriskpbx:asteriskpbx /etc/asterisk/
#If your /etc/asterisk/ folder has files in it already, move those files to another directory, or delete them if you
are sure you don’t need what is there.
52 | Chapter 3:Installing Asterisk