Install Asterisk on CentOS
Asterisk is distribution-agnostic and can be installed on almost any Linux distribution. In this chapter I will guide you through the process of installing Asterisk on CentOS, a popular Linux distribution based on Red Hat. I will install the software from source, which means that I will obtain the Asterisk source code, unpack it, compile it, and then install it.
Here are the steps for installing Asterisk on CentOS:
1. First, we need to make sure that we are using the latest packages available. To update every package installed on the system, use the following command:
yum update
2. Once the updates are installed, reboot your system. We will also need to install some additional packages required by Asterisk. Run the following command in the terminal:
yum install gcc gcc-c++ make wget subversion libxml2-devel ncurses-devel openssl-devel sqlite-devel libuuid-devel vim-enhanced jansson-devel.x86_64
3. Now, we need to download the software. We will download the Asterisk source code using a tool called wget. This tool in its most basic form accepts only a single parameter – the URL of the resource you would like to download. You can get the download links on here. Multiple Asterisk versions are available, but we will download Asterisk 13 LTS using the following command (of course, to download the file, your system needs to be connected to the Internet):
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
4. Extract the files using the following command:
tar xvfz asterisk-13-current.tar.gz
5. Now, run the configure script to make sure that all the dependencies are met:
cd asterisk-13.13.1 ./configure
6. Next, we need to compile the code (make), move it to the correct location on the filesystem (make install), and install the initialization script (make config):
make make install make config