You will need a Linux OS to install Asterisk.
- Download Asterisk from the following URL:
- http://asterisk.org/downloads/asterisk/all-asterisk-versions
- Linux OS can be downloaded from the following URL:
- http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso
The above is version 7 32 or 64 depending on CPU and is a minimal install
- Stuff to do once Linux OS is installed
- vi /etc/sysconfig/network-scripts/ifcfg-eth0
- Make sure onboot=yes change that from disabled
- service network restart
- ip addr show ( should show an ip address for eth0 )
- yum -y update ( update the system without prompting )
- shutdown -r now ( reboot system after updating to apply )
- cd /usr/src
- yum -y install wget ( install wget package to download files from the internet)
- You can either wget Asterisk from up above or use CentOS repos to install Asterisk ( A word of caution is to make sure it is a LTS version or certified version of Asterisk)
- yum method: yum -y install asterisk ( this will install asterisk with all dependencies )
- It is also a good idea with CentOS to install the epel-release repo
- yum -y install epel-release; yum repolist ( should install the epel-release and then list repos and should see epel)
- If you download asterisk using wget
- wget url-for-asterisk.tgz
- tar zxfv name.of.file.tgz
- cd name.of.folder
- ** Have to install some custom files to run asterisk if you just run ./configure it’ll error out and complain**
- yum -y install gcc gcc-c++ libxml2-devel sqlite-devel ncurses-devel
- ./configure
- make menuselect
- make
- make install
- make samples ( install sample configuration files )
- Have Asterisk start as a service
- cd /usr/src/name-of-folder; cp contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk
- vi /etc/init.d/asterisk ( locate AST_SBIN= ) replace that with AST_BIN=/usr/sbin/
- service asterisk start ( if it complains about 64bit libraries do the following)
- ln -s /usr/lib/libasteriskssl.so.1 /usr/lib64/libasteriskssl.so.1 ( only if it complaines about 64bit .so file)
- Disable selinux by vi /etc/selinux/config ( change SELINUX=enabled to SELINUX=disabled
- shutdown -r now ( need to reboot otherwise selinux will enforce still )
- chkconfig asterisk on ( enable to start on reboot ) or if chkconfig does not exist because of systemctl then use systemctl enable asterisk
- systemctl status iptables or service iptables status ( if iptables is running need to disable )
- systemctl disable iptables ( or firewalld ) service iptables stop systemctl stop iptables
- chkconfig iptables off systemctl disable firewalld