User:Sfiggins/Asterisk 18 on CentOS7
Install and Configure Base OS
Install from CentOS 7 CD (Minimal Install)
Log into newly installed server
Seans-MacBook-Pro:~ sfiggins$ ssh cn38-inverness-co.suburbanbroadband.net Warning: Permanently added 'cn38-inverness-co.suburbanbroadband.net,216.112.193.139' (RSA) to the list of known hosts. sfiggins@cn38-inverness-co.suburbanbroadband.net's password:
Setting up PSK login access, if desired
Copy authorized_keys from another server
I have another server that already has my authorized keys, so I"ll copy it from there. You can also past in your RSA key into ~/.ssh/authorized_keys, if you prefer.
[sfiggins@cn38-inverness-co ~]$ scp -r 216.112.193.138:.ssh/ . The authenticity of host '216.112.193.138 (216.112.193.138)' can't be established. RSA key fingerprint is 5f:61:91:46:5c:c8:4c:a1:2e:25:0b:61:1e:97:d9:ed. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '216.112.193.138' (RSA) to the list of known hosts. sfiggins@216.112.193.138's password: known_hosts 100% 397 0.4KB/s 00:00 authorized_keys 100% 414 0.4KB/s 00:00 [sfiggins@cn38-inverness-co ~]$ logout Connection to cn38-inverness-co.suburbanbroadband.net closed.
Login in using private key
Seans-MacBook-Pro:~ sfiggins$ ssh cn38-inverness-co.suburbanbroadband.net Warning: Permanently added 'cn38-inverness-co.suburbanbroadband.net,216.112.193.139' (RSA) to the list of known hosts. Last login: Wed Dec 2 17:21:54 2020 from 209.116.189.54
Sudo to Root
All the installation steps in this guide must be performed as root. You can either prefix each command with "sudo" or just use sudo to become the root account and execute them as listed.
[sfiggins@cn38-inverness-co ~]$ sudo su - We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for sfiggins: Last login: Wed Dec 2 16:46:45 MST 2020 on tty1
Fix Sudoers
This fix will remove the need to reenter your puser password when running the "sudo" command. This is a preference, and does not need to be done if you prefer to enter the password each time.
[root@cn38-inverness-co ~]# vi /etc/sudoers
Comment out the below matching line, by adding "# " in beginning of the line.
%wheel ALL=(ALL) ALL
Remove the comment from the below matching line by removing the "# " from the beginning of the line.
# %wheel ALL=(ALL) NOPASSWD: ALL
Save this file using the ":wq!" command, as this file is read-only.
Disable and remove NetworkManager
The NetworkManager packages are not needed on a Linux server and they just get in the way. Removing them is the best option. They are more useful on a workstation that will be changing networks frequently.
[root@cn38-inverness-co ~]# /bin/systemctl disable NetworkManager rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service' rm '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service' rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service' [root@cn38-inverness-co ~]# /bin/systemctl disable NetworkManager-dispatcher [root@cn38-inverness-co ~]# yum erase NetworkManager-tui NetworkManager-glib NetworkManager Loaded plugins: fastestmirror No Match for argument: NetworkManager-glib Resolving Dependencies --> Running transaction check ---> Package NetworkManager.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 will be erased ---> Package NetworkManager-tui.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Removing: NetworkManager x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 @anaconda 8.8 M NetworkManager-tui x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 @anaconda 258 k Transaction Summary ============================================================================================================== Remove 2 Packages Installed size: 9.1 M Is this ok [y/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : 1:NetworkManager-tui-1.0.0-14.git20150121.b4ea599c.el7.x86_64 1/2 Erasing : 1:NetworkManager-1.0.0-14.git20150121.b4ea599c.el7.x86_64 2/2 Verifying : 1:NetworkManager-tui-1.0.0-14.git20150121.b4ea599c.el7.x86_64 1/2 Verifying : 1:NetworkManager-1.0.0-14.git20150121.b4ea599c.el7.x86_64 2/2 Removed: NetworkManager.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 NetworkManager-tui.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 Complete!
Disable SELinux
This mostly gets in the way, and we will disable it. There are steps that can be taken to leave this intact and functioning and still allow the system to function propperly, but I'll not discuss that here.
[root@cn38-inverness-co ~]# setenforce 0 [root@cn38-inverness-co ~]# sed -i.bak "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
Update System Packages
Update the system packages. Some of the later steps will require give errors depending on system package levels that are available, and it is just good measure to make sure the latest packages are installed.
[root@cn38-inverness-co ~]# yum -y update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.dal10.us.leaseweb.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org Resolving Dependencies --> Running transaction check ---> Package NetworkManager-libnm.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7 will be updated === SNIP === ---> Package libstdc++.i686 0:4.8.5-44.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: === SNIP === Updating: === SNIP === Installing for dependencies: === SNIP === Transaction Summary ============================================================================================================== Install 8 Packages (+47 Dependent packages) Upgrade 240 Packages Total size: 325 M Total download size: 275 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/230): acl-2.2.51-15.el7.x86_64.rpm | 81 kB 00:00:00 === SNIP === (230/230): tzdata-2020d-2.el7.noarch.rpm | 499 kB 00:00:00 -------------------------------------------------------------------------------------------------------------- Total 17 MB/s | 275 MB 00:00:16 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : libgcc-4.8.5-44.el7.x86_64 1/539 Installing : 1:grub2-common-2.02-0.86.el7.centos.noarch 2/539 Updating : centos-release-7-9.2009.1.el7.centos.x86_64 3/539 === SNIP === Installing : rdma-core-22.4-5.el7.i686 295/539 Cleanup : tuned-2.4.1-1.el7.noarch 296/539 === SNIP === Cleanup : 12:dhclient-4.2.5-36.el7.centos.x86_64 385/539 UPGRADE: Automatically re-enabling default systemd units: brandbot.path rhel-autorelabel.service rhel-autorelabel-mark.service rhel-configure.service rhel-dmesg.service rhel-domainname.service rhel-import-state.service rhel-loadmodules.service rhel-readonly.service Cleanup : initscripts-9.49.24-1.el7.x86_64 386/539 === SNIP === Cleanup : libgcc-4.8.3-9.el7.x86_64 539/539 Verifying : glibc-common-2.17-317.el7.x86_64 1/539 === SNIP === Verifying : 7:device-mapper-1.02.93-3.el7.x86_64 539/539 Installed: grub2.x86_64 1:2.02-0.86.el7.centos grub2-tools.x86_64 1:2.02-0.86.el7.centos grub2-tools-extra.x86_64 1:2.02-0.86.el7.centos grub2-tools-minimal.x86_64 1:2.02-0.86.el7.centos kernel.x86_64 0:3.10.0-1160.6.1.el7 python-gobject-base.x86_64 0:3.22.0-1.el7_4.1 rdma-core.i686 0:22.4-5.el7 rdma-core.x86_64 0:22.4-5.el7 Dependency Installed: GeoIP.x86_64 0:1.5.0-14.el7 audit-libs.i686 0:2.8.5-4.el7 === SNIP === zlib.i686 0:1.2.7-18.el7 Updated: NetworkManager-libnm.x86_64 1:1.18.8-2.el7_9 === SNIP === zlib.x86_64 0:1.2.7-18.el7 Replaced: grub2.x86_64 1:2.02-0.16.el7.centos grub2-tools.x86_64 1:2.02-0.16.el7.centos pygobject3-base.x86_64 0:3.8.2-6.el7 rdma.noarch 0:7.1_3.17-5.el7 Complete!
Install Additional Packages
These are useful utilities that have been stripped from the base install in CentOS7. Adding these back in allows for easier troubleshooting of the server.
[root@cn38-inverness-co ~]# yum -y install finger nc net-snmp net-snmp-perl net-snmp-utils ntp perl-Date-Manip \ perl-DBD-SQLite sssd tcp_wrappers tcpdump telnet tftp tog-pegasus traceroute \ vim-enhanced wget oddjob-mkhomedir net-tools yum-cron bind-utils Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.dal10.us.leaseweb.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org Resolving Dependencies --> Running transaction check ---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.2 will be installed --> Processing Dependency: bind-libs(x86-64) = 32:9.11.4-26.P2.el7_9.2 for package: 32:bind-utils-9.11.4-26.P2.el7_9.2.x86_64 === SNIP === ---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: bind-utils x86_64 32:9.11.4-26.P2.el7_9.2 updates 260 k === SNIP === yum-cron noarch 3.4.3-168.el7.centos base 66 k Installing for dependencies: autogen-libopts x86_64 5.18-5.el7 base 66 k === SNIP === zlib-devel x86_64 1.2.7-18.el7 base 50 k Transaction Summary ============================================================================================================== Install 21 Packages (+114 Dependent packages) Total size: 59 M Installed size: 166 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libtalloc-2.1.16-1.el7.x86_64 1/135 === SNIP === Installing : finger-0.17-52.el7.x86_64 135/135 Verifying : perl-HTTP-Tiny-0.033-3.el7.noarch 1/135 === SNIP === Verifying : 2:nmap-ncat-6.40-19.el7.x86_64 135/135 Installed: bind-utils.x86_64 32:9.11.4-26.P2.el7_9.2 finger.x86_64 0:0.17-52.el7 net-snmp.x86_64 1:5.7.2-49.el7 net-snmp-perl.x86_64 1:5.7.2-49.el7 net-snmp-utils.x86_64 1:5.7.2-49.el7 net-tools.x86_64 0:2.0-0.25.20131004git.el7 nmap-ncat.x86_64 2:6.40-19.el7 ntp.x86_64 0:4.2.6p5-29.el7.centos.2 oddjob-mkhomedir.x86_64 0:0.31.5-4.el7 perl-DBD-SQLite.x86_64 0:1.39-3.el7 perl-Date-Manip.noarch 0:6.41-2.el7 sssd.x86_64 0:1.16.5-10.el7_9.5 tcp_wrappers.x86_64 0:7.6-77.el7 tcpdump.x86_64 14:4.9.2-4.el7_7.1 telnet.x86_64 1:0.17-66.el7 tftp.x86_64 0:5.2-22.el7 tog-pegasus.x86_64 2:2.14.1-8.el7 traceroute.x86_64 3:2.0.22-2.el7 vim-enhanced.x86_64 2:7.4.629-7.el7 wget.x86_64 0:1.14-18.el7_6.1 yum-cron.noarch 0:3.4.3-168.el7.centos Dependency Installed: autogen-libopts.x86_64 0:5.18-5.el7 === SNIP === zlib-devel.x86_64 0:1.2.7-18.el7 Complete!
Fix Timezone
This is just a preference, but it will standardize the timezone.
[root@cn38-inverness-co ~]# rm -f /etc/localtime [root@cn38-inverness-co ~]# ln -s /usr/share/zoneinfo/MST7MDT /etc/localtime
Disable RPF
Reverse Path Forwarding (RPF) is a security protection that will prevent inbound packets from entering an IP interface that does not have outbound routes to the source IP. It is not important to disable this if your server only has one interface, however if you have multiple network interfaces, and you may be receiving asymmetric traffic, this needs to be disabled to allow the packets to enter the system.
[root@cn38-inverness-co ~]# echo "net.ipv4.conf.default.rp_filter = 0" > /etc/sysctl.d/rpfilter.conf
Install vmtools (if virtual)
Only do this step if you are installing on a virtual platform. This is not required if you are installing on bare metal.
[root@cn38-inverness-co ~]# yum -y install open-vm-tools Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.dal10.us.leaseweb.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org Resolving Dependencies --> Running transaction check ---> Package open-vm-tools.x86_64 0:11.0.5-3.el7_9.1 will be installed --> Processing Dependency: xmlsec1-openssl for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libfuse.so.2(FUSE_2.6)(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libfuse.so.2(FUSE_2.5)(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: fuse for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libxslt.so.1()(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libxmlsec1.so.1()(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libmspack.so.0()(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libltdl.so.7()(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Processing Dependency: libfuse.so.2()(64bit) for package: open-vm-tools-11.0.5-3.el7_9.1.x86_64 --> Running transaction check ---> Package fuse.x86_64 0:2.9.2-11.el7 will be installed ---> Package fuse-libs.x86_64 0:2.9.2-11.el7 will be installed ---> Package libmspack.x86_64 0:0.5-0.8.alpha.el7 will be installed ---> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed ---> Package libxslt.x86_64 0:1.1.28-6.el7 will be installed ---> Package xmlsec1.x86_64 0:1.2.20-7.el7_4 will be installed ---> Package xmlsec1-openssl.x86_64 0:1.2.20-7.el7_4 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: open-vm-tools x86_64 11.0.5-3.el7_9.1 updates 676 k Installing for dependencies: fuse x86_64 2.9.2-11.el7 base 86 k fuse-libs x86_64 2.9.2-11.el7 base 93 k libmspack x86_64 0.5-0.8.alpha.el7 base 64 k libtool-ltdl x86_64 2.4.2-22.el7_3 base 49 k libxslt x86_64 1.1.28-6.el7 base 242 k xmlsec1 x86_64 1.2.20-7.el7_4 base 177 k xmlsec1-openssl x86_64 1.2.20-7.el7_4 base 76 k Transaction Summary ============================================================================================================== Install 1 Package (+7 Dependent packages) Total download size: 1.4 M Installed size: 4.0 M Downloading packages: (1/8): fuse-2.9.2-11.el7.x86_64.rpm | 86 kB 00:00:00 (2/8): fuse-libs-2.9.2-11.el7.x86_64.rpm | 93 kB 00:00:00 (3/8): libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm | 49 kB 00:00:00 (4/8): libmspack-0.5-0.8.alpha.el7.x86_64.rpm | 64 kB 00:00:00 (5/8): xmlsec1-1.2.20-7.el7_4.x86_64.rpm | 177 kB 00:00:00 (6/8): libxslt-1.1.28-6.el7.x86_64.rpm | 242 kB 00:00:00 (7/8): xmlsec1-openssl-1.2.20-7.el7_4.x86_64.rpm | 76 kB 00:00:00 (8/8): open-vm-tools-11.0.5-3.el7_9.1.x86_64.rpm | 676 kB 00:00:00 -------------------------------------------------------------------------------------------------------------- Total 1.4 MB/s | 1.4 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libtool-ltdl-2.4.2-22.el7_3.x86_64 1/8 Installing : libxslt-1.1.28-6.el7.x86_64 2/8 Installing : xmlsec1-1.2.20-7.el7_4.x86_64 3/8 Installing : xmlsec1-openssl-1.2.20-7.el7_4.x86_64 4/8 Installing : fuse-2.9.2-11.el7.x86_64 5/8 Installing : fuse-libs-2.9.2-11.el7.x86_64 6/8 Installing : libmspack-0.5-0.8.alpha.el7.x86_64 7/8 Installing : open-vm-tools-11.0.5-3.el7_9.1.x86_64 8/8 Verifying : libmspack-0.5-0.8.alpha.el7.x86_64 1/8 Verifying : fuse-libs-2.9.2-11.el7.x86_64 2/8 Verifying : fuse-2.9.2-11.el7.x86_64 3/8 Verifying : xmlsec1-openssl-1.2.20-7.el7_4.x86_64 4/8 Verifying : libxslt-1.1.28-6.el7.x86_64 5/8 Verifying : xmlsec1-1.2.20-7.el7_4.x86_64 6/8 Verifying : open-vm-tools-11.0.5-3.el7_9.1.x86_64 7/8 Verifying : libtool-ltdl-2.4.2-22.el7_3.x86_64 8/8 Installed: open-vm-tools.x86_64 0:11.0.5-3.el7_9.1 Dependency Installed: fuse.x86_64 0:2.9.2-11.el7 fuse-libs.x86_64 0:2.9.2-11.el7 libmspack.x86_64 0:0.5-0.8.alpha.el7 libtool-ltdl.x86_64 0:2.4.2-22.el7_3 libxslt.x86_64 0:1.1.28-6.el7 xmlsec1.x86_64 0:1.2.20-7.el7_4 xmlsec1-openssl.x86_64 0:1.2.20-7.el7_4 Complete!
Reboot Server
[root@cn38-inverness-co ~]# shutdown -r now Connection to cn38-inverness-co.suburbanbroadband.net closed by remote host. Connection to cn38-inverness-co.suburbanbroadband.net closed.
Remove old kernel
[root@cn38-inverness-co ~]# rpm -qa | grep kernel kernel-tools-libs-3.10.0-1160.6.1.el7.x86_64 kernel-headers-3.10.0-1160.6.1.el7.x86_64 kernel-3.10.0-1160.6.1.el7.x86_64 kernel-3.10.0-229.el7.x86_64 kernel-tools-3.10.0-1160.6.1.el7.x86_64 [root@cn38-inverness-co ~]# yum -y erase kernel-3.10.0-229.el7.x86_64 Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package kernel.x86_64 0:3.10.0-229.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Removing: kernel x86_64 3.10.0-229.el7 @anaconda 131 M Transaction Summary ============================================================================================================== Remove 1 Package Installed size: 131 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : kernel-3.10.0-229.el7.x86_64 1/1 warning: file /lib/modules/3.10.0-229.el7.x86_64/modules.softdep: remove failed: No such file or directory warning: file /lib/modules/3.10.0-229.el7.x86_64/modules.devname: remove failed: No such file or directory Verifying : kernel-3.10.0-229.el7.x86_64 1/1 Removed: kernel.x86_64 0:3.10.0-229.el7 Complete!
Download and Compile Asterisk 18.1.0
Install Development Packages
We will be compiling Asterisk from source, so we will need to install some development tools. There may be some duplicates int he list that have already been installed earlier.
[root@cn38-inverness-co ~]# yum -y install gcc ncurses-devel openssl-devel gcc-c++ gnutls-devel \ make wget openssh openssh-clients openssh-server ntp sendmail rsync ftp mysql mysql-server \ mysql-devel curl curl-devel traceroute telnet which rpm-build flex gcc newt-devel libusb-devel \ net-snmp-utils bison byacc libxml2-devel vixie-cron mailx xinetd tcpdump Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.dal10.us.leaseweb.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org Package gcc-4.8.5-44.el7.x86_64 already installed and latest version === SNIP === Package 1:net-snmp-utils-5.7.2-49.el7.x86_64 already installed and latest version No package vixie-cron available. Package 14:tcpdump-4.9.2-4.el7_7.1.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package bison.x86_64 0:3.0.4-2.el7 will be installed === SNIP === ---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: bison x86_64 3.0.4-2.el7 base 674 k === SNIP === xinetd x86_64 2:2.3.15-14.el7 base 128 k Installing for dependencies: bzip2 x86_64 1.0.6-13.el7 base 52 k === SNIP === zip x86_64 3.0-11.el7 base 260 k Transaction Summary ============================================================================================================== Install 18 Packages (+27 Dependent packages) Total download size: 30 M Installed size: 110 M Downloading packages: (1/45): byacc-1.9.20130304-3.el7.x86_64.rpm | 65 kB 00:00:00 === SNIP === (45/45): zip-3.0-11.el7.x86_64.rpm | 260 kB 00:00:00 -------------------------------------------------------------------------------------------------------------- Total 13 MB/s | 30 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : m4-1.4.16-10.el7.x86_64 1/45 === SNIP === Installing : 2:xinetd-2.3.15-14.el7.x86_64 45/45 Verifying : gcc-c++-4.8.5-44.el7.x86_64 1/45 === SNIP === Verifying : gnutls-devel-3.3.29-9.el7_6.x86_64 45/45 Installed: bison.x86_64 0:3.0.4-2.el7 byacc.x86_64 0:1.9.20130304-3.el7 flex.x86_64 0:2.5.37-6.el7 ftp.x86_64 0:0.17-67.el7 gcc-c++.x86_64 0:4.8.5-44.el7 gnutls-devel.x86_64 0:3.3.29-9.el7_6 libcurl-devel.x86_64 0:7.29.0-59.el7_9.1 libusb-devel.x86_64 1:0.1.4-3.el7 libxml2-devel.x86_64 0:2.9.1-6.el7.5 mailx.x86_64 0:12.5-19.el7 mariadb.x86_64 1:5.5.68-1.el7 mariadb-devel.x86_64 1:5.5.68-1.el7 ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 newt-devel.x86_64 0:0.52.15-4.el7 rpm-build.x86_64 0:4.11.3-45.el7 rsync.x86_64 0:3.1.2-10.el7 sendmail.x86_64 0:8.14.7-6.el7 xinetd.x86_64 2:2.3.15-14.el7 Dependency Installed: bzip2.x86_64 0:1.0.6-13.el7 cyrus-sasl.x86_64 0:2.1.26-23.el7 dwz.x86_64 0:0.11-3.el7 elfutils.x86_64 0:0.176-5.el7 gdb.x86_64 0:7.6.1-120.el7 gmp-devel.x86_64 1:6.0.0-15.el7 gnutls-c++.x86_64 0:3.3.29-9.el7_6 gnutls-dane.x86_64 0:3.3.29-9.el7_6 hesiod.x86_64 0:3.2.1-3.el7 libevent.x86_64 0:2.0.21-4.el7 libstdc++-devel.x86_64 0:4.8.5-44.el7 libtasn1-devel.x86_64 0:4.10-1.el7 libusb.x86_64 1:0.1.4-3.el7 libusbx.x86_64 0:1.0.21-1.el7 m4.x86_64 0:1.4.16-10.el7 nettle-devel.x86_64 0:2.7.1-8.el7 p11-kit-devel.x86_64 0:0.23.5-3.el7 patch.x86_64 0:2.7.1-12.el7_7 perl-Thread-Queue.noarch 0:3.02-2.el7 perl-srpm-macros.noarch 0:1-8.el7 procmail.x86_64 0:3.22-36.el7_4.1 python-srpm-macros.noarch 0:3-34.el7 redhat-rpm-config.noarch 0:9.1.0-88.el7.centos slang-devel.x86_64 0:2.2.4-11.el7 unbound-libs.x86_64 0:1.6.6-5.el7_8 unzip.x86_64 0:6.0-21.el7 zip.x86_64 0:3.0-11.el7 Complete! == Generate RSA Key == <pre> [root@cn38-inverness-co ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:FKpB44T5QoKCZtkOoU4ZF6w7T0G98QZ60gHU9QpQM9k root@cn38-inverness-co.suburbanbroadband.net The key's randomart image is: +---[RSA 2048]----+ |oo*OX++.. | |*=BB.OoE.. | |===.=.B .. | |o..=.*.+. | | ...= ..S | | o . | | + | | . | | | +----[SHA256]-----+
Download Asterisk 18.1.0
Change directory to /usr/local/src and download the Asterisk source code.
[root@cn38-inverness-co ~]# cd /usr/local/src/ [root@cn38-inverness-co src]# wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz --2020-12-02 17:39:25-- https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 27886299 (27M) [application/x-gzip] Saving to: ‘asterisk-18-current.tar.gz’ 100%[====================================================================>] 27,886,299 8.03MB/s in 3.3s 2020-12-02 17:39:29 (8.03 MB/s) - ‘asterisk-18-current.tar.gz’ saved [27886299/27886299]
For future reference, you can also find it directly here:
https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18.1.0.tar.gz
Uncompress Asterisk 18.1.0
[root@cn38-inverness-co src]# tar -zxf asterisk-18-current.tar.gz [root@cn38-inverness-co src]# ls asterisk-18.1.0 [root@cn38-inverness-co src]# cd asterisk-18.1.0/ [root@cn38-inverness-co asterisk-18.1.0]# ls addons channels include README-SERIOUSLY.bestpractices.md agi codecs install-sh res apps config.guess LICENSE rest-api asterisk-18.1.0-summary.html configs main rest-api-templates asterisk-18.1.0-summary.txt config.sub Makefile sample.call autoconf configure Makefile.moddir_rules sounds bootstrap.sh configure.ac Makefile.rules static-http bridges contrib makeopts.in tests BSDmakefile COPYING menuselect third-party BUGS CREDITS missing UPGRADE.txt build_tools default.exports mkinstalldirs utils cdr doc pbx Zaptel-to-DAHDI.txt cel formats phoneprov ChangeLog funcs README-addons.txt CHANGES images README.md
Test the prereqs
Run the "./contrib/scripts/install_prereq test" command in order to test the installed prerequesits. After it returns the things that need to be installed, you can just copy and paste that command. If there are packages that are not installed afterthe command due to not existing in the CentOS 7 main repo, they are probably not required.
[root@cn38-inverness-co asterisk-18.1.0]# ./contrib/scripts/install_prereq test ############################################# ## test: test mode. ## Use the commands here to install your system. ############################################# yum install --skip-broken --assumeyes libedit-devel jansson-devel \ libuuid-devel sqlite-devel speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-lib-devel \ portaudio-devel xmlstarlet postgresql-devel unixODBC-devel neon-devel gmime-devel lua-devel uriparser-devel \ libxslt-devel mysql-devel bluez-libs-devel radcli-devel freetds-devel jack-audio-connection-kit-devel \ libcap-devel iksemel-devel corosynclib-devel libical-devel spandsp-devel libresample-devel uw-imap-devel \ binutils-devel libsrtp-devel gsm-devel doxygen graphviz openldap-devel hoard codec2-devel fftw-devel \ libsndfile-devel unbound-devel subversion [root@cn38-inverness-co asterisk-18.1.0]# yum install --skip-broken --assumeyes libedit-devel jansson-devel \ libuuid-devel sqlite-devel speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-lib-devel \ portaudio-devel xmlstarlet postgresql-devel unixODBC-devel neon-devel gmime-devel lua-devel uriparser-devel \ libxslt-devel mysql-devel bluez-libs-devel radcli-devel freetds-devel jack-audio-connection-kit-devel \ libcap-devel iksemel-devel corosynclib-devel libical-devel spandsp-devel libresample-devel uw-imap-devel \ binutils-devel libsrtp-devel gsm-devel doxygen graphviz openldap-devel hoard codec2-devel fftw-devel \ libsndfile-devel unbound-devel subversion Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.dal10.us.leaseweb.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org No package speexdsp-devel available. No package portaudio-devel available. No package xmlstarlet available. No package gmime-devel available. Package 1:mariadb-devel-5.5.68-1.el7.x86_64 already installed and latest version No package radcli-devel available. No package freetds-devel available. No package jack-audio-connection-kit-devel available. No package iksemel-devel available. No package spandsp-devel available. No package libresample-devel available. No package uw-imap-devel available. No package hoard available. No package codec2-devel available. Resolving Dependencies --> Running transaction check ---> Package alsa-lib-devel.x86_64 0:1.1.8-1.el7 will be installed === SNIP === ---> Package mesa-libglapi.x86_64 0:18.3.4-12.el7_9 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: alsa-lib-devel x86_64 1.1.8-1.el7 base 963 k === SNIP === uriparser-devel x86_64 0.7.5-10.el7 base 138 k Installing for dependencies: adobe-mappings-cmap noarch 20171205-3.el7 base 2.1 M === SNIP === xorg-x11-server-utils x86_64 7.7-20.el7 base 178 k Transaction Summary ============================================================================================================== Install 28 Packages (+117 Dependent packages) Total download size: 56 M Installed size: 216 M Downloading packages: (1/145): adobe-mappings-cmap-deprecated-20171205-3.el7.noarch.rpm | 114 kB 00:00:00 === SNIP === (145/145): xorg-x11-server-utils-7.7-20.el7.x86_64.rpm | 178 kB 00:00:00 -------------------------------------------------------------------------------------------------------------- Total 9.3 MB/s | 56 MB 00:00:06 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libjpeg-turbo-1.2.90-8.el7.x86_64 1/145 === SNIP === Installing : libedit-devel-3.0-12.20121213cvs.el7.x86_64 145/145 Verifying : libXext-1.3.3-3.el7.x86_64 1/145 === SNIP === Verifying : libcgroup-0.41-21.el7.x86_64 145/145 Installed: alsa-lib-devel.x86_64 0:1.1.8-1.el7 binutils-devel.x86_64 0:2.27-44.base.el7 === SNIP === Dependency Installed: adobe-mappings-cmap.noarch 0:20171205-3.el7 === SNIP === Complete!
Run ./configure for Asterisk
For CentOS 7.X, you will get an error about needing a newer version of jansson library. It may be possible to manually install the newer version, however it is probaly fine to just use the --with-jansson-bundled flag to include the version bundled with Asterisk source code.
Hopefully this completed without any issues, however you should look over the output to ensure it is what you are expecting.
[root@cn38-inverness-co asterisk-18.1.0]# ./configure --with-jansson-bundled checking build system type... x86_64-pc-linux-gnu === SNIP === checking for pkg-config... /bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for GTK2... no configure: creating ./config.status config.status: creating makeopts config.status: creating autoconfig.h configure: Menuselect build configuration successfully completed .$$$$$$$$$$$$$$$=.. .$7$7.. .7$$7:. .$$:. ,$7.7 .$7. 7$$$$ .$$77 ..$$. $$$$$ .$$$7 ..7$ .?. $$$$$ .?. 7$$$. $.$. .$$$7. $$$$7 .7$$$. .$$$. .777. .$$$$$$77$$$77$$$$$7. $$$, $$$~ .7$$$$$$$$$$$$$7. .$$$. .$$7 .7$$$$$$$7: ?$$$. $$$ ?7$$$$$$$$$$I .$$$7 $$$ .7$$$$$$$$$$$$$$$$ :$$$. $$$ $$$$$$7$$$$$$$$$$$$ .$$$. $$$ $$$ 7$$$7 .$$$ .$$$. $$$$ $$$$7 .$$$. 7$$$7 7$$$$ 7$$$ $$$$$ $$$ $$$$7. $$ (TM) $$$$$$$. .7$$$$$$ $$ $$$$$$$$$$$$7$$$$$$$$$.$$$$$$ $$$$$$$$$$$$$$$$. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64 configure: build-cpu:vendor:os: x86_64 : pc : linux-gnu : configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu :
Install UW-IMAP library for IMAP integration for Voice Mails
We will want to configure Asterisk to store voicemails via IMAP instead of the local file system. This will allow better deployment of HA down the road.
Download uw-imap for storage
The UW-IMAP code is no longer maintained after the creator's death, so it's a good idea to archive the important parts.
[root@cn38-inverness-co ~]# wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/u/uw-imap-2007f-16.el7.x86_64.rpm --2020-12-02 18:34:30-- https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/u/uw-imap-2007f-16.el7.x86_64.rpm Resolving download-ib01.fedoraproject.org (download-ib01.fedoraproject.org)... 152.19.134.145, 2610:28:3090:3001:dead:beef:cafe:fed6 Connecting to download-ib01.fedoraproject.org (download-ib01.fedoraproject.org)|152.19.134.145|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 68284 (67K) [application/x-rpm] Saving to: ‘uw-imap-2007f-16.el7.x86_64.rpm’ 100%[====================================================================>] 68,284 --.-K/s in 0.09s 2020-12-02 18:34:31 (703 KB/s) - ‘uw-imap-2007f-16.el7.x86_64.rpm’ saved [68284/68284]
Install EPEL repo
We'll use EPEL to install UW-IMAP, so we have to install that first. After installation, we can go back in and disable teh EPEL repo, if we desire.
[root@cn38-inverness-co ~]# yum -y install epel-release Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.dal10.us.leaseweb.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:7-11 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: epel-release noarch 7-11 extras 15 k Transaction Summary ============================================================================================================== Install 1 Package Total download size: 15 k Installed size: 24 k Downloading packages: epel-release-7-11.noarch.rpm | 15 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : epel-release-7-11.noarch 1/1 Verifying : epel-release-7-11.noarch 1/1 Installed: epel-release.noarch 0:7-11 Complete!
Install uw-imap
Finally, the install of UW-IMAP. It will require an additional dependency be installed.
[root@cn38-inverness-co ~]# yum install uw-imap Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 13 kB 00:00:00 * base: mirror.dal10.us.leaseweb.net * epel: mirror.dal.nexril.net * extras: mirrors.tummy.com * updates: mirror.centos.iad1.serverforge.org epel | 4.7 kB 00:00:00 (1/3): epel/x86_64/group_gz | 95 kB 00:00:00 (2/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00 (3/3): epel/x86_64/primary_db | 6.9 MB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package uw-imap.x86_64 0:2007f-16.el7 will be installed --> Processing Dependency: libc-client(x86-64) = 2007f-16.el7 for package: uw-imap-2007f-16.el7.x86_64 --> Processing Dependency: libc-client.so.2007()(64bit) for package: uw-imap-2007f-16.el7.x86_64 --> Running transaction check ---> Package libc-client.x86_64 0:2007f-16.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: uw-imap x86_64 2007f-16.el7 epel 67 k Installing for dependencies: libc-client x86_64 2007f-16.el7 epel 562 k Transaction Summary ============================================================================================================== Install 1 Package (+1 Dependent package) Total download size: 628 k Installed size: 1.6 M Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/7/epel/packages/libc-client-2007f-16.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Public key for libc-client-2007f-16.el7.x86_64.rpm is not installed (1/2): libc-client-2007f-16.el7.x86_64.rpm | 562 kB 00:00:00 (2/2): uw-imap-2007f-16.el7.x86_64.rpm | 67 kB 00:00:00 -------------------------------------------------------------------------------------------------------------- Total 1.0 MB/s | 628 kB 00:00:00 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-11.noarch (@extras) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libc-client-2007f-16.el7.x86_64 1/2 Installing : uw-imap-2007f-16.el7.x86_64 2/2 Verifying : libc-client-2007f-16.el7.x86_64 1/2 Verifying : uw-imap-2007f-16.el7.x86_64 2/2 Installed: uw-imap.x86_64 0:2007f-16.el7 Dependency Installed: libc-client.x86_64 0:2007f-16.el7 Complete!
By default, a lot of options are not included in the Asterisk build, and need to be configured. This is done by running the "make menu" command in the asterisk build directory.
[root@cn38-inverness-co asterisk-18.1.0]# make menuselect CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" gmenuselect make[1]: Entering directory `/usr/local/src/asterisk-18.1.0/menuselect' make[1]: Nothing to be done for `gmenuselect'. make[1]: Leaving directory `/usr/local/src/asterisk-18.1.0/menuselect' make[1]: Entering directory `/usr/local/src/asterisk-18.1.0' menuselect changes saved! make[1]: Leaving directory `/usr/local/src/asterisk-18.1.0'
In Add-ons, select chan_ooh323, foemat_mp3, res_config_mysql, app_mysql and crd_mysql.
In Core Sound Packages, select EN-WAV, EN-ULAW, EN-ALAW, EN-GSM, EN-G729, EN-G722, EN-SLN16, EN-SIREN7, and EN-SIREN14.
Download MP# sources
[root@cn38-inverness-co asterisk-18.1.0]# sudo contrib/scripts/get_mp3_source.sh A addons/mp3 A addons/mp3/MPGLIB_TODO A addons/mp3/mpg123.h A addons/mp3/layer3.c A addons/mp3/mpglib.h A addons/mp3/decode_ntom.c A addons/mp3/interface.c A addons/mp3/MPGLIB_README A addons/mp3/common.c A addons/mp3/huffman.h A addons/mp3/tabinit.c A addons/mp3/Makefile A addons/mp3/README A addons/mp3/decode_i386.c A addons/mp3/dct64_i386.c Exported revision 202.
Build Asterisk 18.1.0
[root@cn38-inverness-co asterisk-18.1.0]# make [CC] astcanary.c -> astcanary.o [LD] astcanary.o -> astcanary [CC] astdb2sqlite3.c -> astdb2sqlite3.o [CC] hash/hash.c -> hash/hash.o [CC] hash/hash_bigkey.c -> hash/hash_bigkey.o [CC] hash/hash_buf.c -> hash/hash_buf.o [CC] hash/hash_func.c -> hash/hash_func.o [CC] hash/hash_log2.c -> hash/hash_log2.o [CC] hash/hash_page.c -> hash/hash_page.o === SNIP === [LD] chan_ooh323.o ooh323c/src/ooCmdChannel.o ooh323c/src/ooLogChan.o ooh323c/src/ooUtils.o ooh323c/src/ooGkClient.o ooh323c/src/context.o ooh323c/src/ooDateTime.o ooh323c/src/decode.o ooh323c/src/dlist.o ooh323c/src/encode.o ooh323c/src/errmgmt.o ooh323c/src/memheap.o ooh323c/src/ootrace.o ooh323c/src/oochannels.o ooh323c/src/ooh245.o ooh323c/src/ooports.o ooh323c/src/ooq931.o ooh323c/src/ooCapability.o ooh323c/src/ooSocket.o ooh323c/src/perutil.o ooh323c/src/eventHandler.o ooh323c/src/ooCalls.o ooh323c/src/ooStackCmds.o ooh323c/src/ooh323.o ooh323c/src/ooh323ep.o ooh323c/src/printHandler.o ooh323c/src/rtctype.o ooh323c/src/ooTimer.o ooh323c/src/h323/H235-SECURITY-MESSAGESDec.o ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.o ooh323c/src/h323/H323-MESSAGES.o ooh323c/src/h323/H323-MESSAGESDec.o ooh323c/src/h323/H323-MESSAGESEnc.o ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.o ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.o ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.o ooh323cDriver.o -> chan_ooh323.so [CC] format_mp3.c -> format_mp3.o [CC] mp3/common.c -> mp3/common.o [CC] mp3/dct64_i386.c -> mp3/dct64_i386.o [CC] mp3/decode_ntom.c -> mp3/decode_ntom.o [CC] mp3/layer3.c -> mp3/layer3.o [CC] mp3/tabinit.c -> mp3/tabinit.o [CC] mp3/interface.c -> mp3/interface.o [LD] format_mp3.o mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o -> format_mp3.so [CC] res_config_mysql.c -> res_config_mysql.o [LD] res_config_mysql.o -> res_config_mysql.so Building Documentation For: third-party channels pbx apps codecs formats cdr cel bridges funcs tests main res addons +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+
Run make install for Asterist 18.1.0
[root@cn38-inverness-co asterisk-18.1.0]# make install Installing modules from channels... Installing modules from pbx... Installing modules from apps... Installing modules from codecs... Installing modules from formats... Installing modules from cdr... Installing modules from cel... Installing modules from bridges... Installing modules from funcs... Installing modules from tests... Installing modules from main... Installing modules from res... Installing modules from addons... /bin/install -c -m 755 contrib/scripts/astversion "/usr/sbin/" /bin/install -c -m 755 contrib/scripts/astgenkey "/usr/sbin/" /bin/install -c -m 755 contrib/scripts/autosupport "/usr/sbin/" if [ ! -f /sbin/launchd ]; then \ ./build_tools/install_subst contrib/scripts/safe_asterisk "/usr/sbin/safe_asterisk"; \ fi /bin/install -c -m 644 doc/core-*.xml "/var/lib/asterisk/documentation" /bin/install -c -m 644 doc/appdocsxml.xslt "/var/lib/asterisk/documentation" /bin/install -c -m 644 doc/appdocsxml.dtd "/var/lib/asterisk/documentation" /bin/install -c -m 644 doc/asterisk.8 "/usr/share/man/man8" /bin/install -c -m 644 doc/astdb*.8 "/usr/share/man/man8" /bin/install -c -m 644 contrib/scripts/astgenkey.8 "/usr/share/man/man8" /bin/install -c -m 644 contrib/scripts/autosupport.8 "/usr/share/man/man8" /bin/install -c -m 644 contrib/scripts/safe_asterisk.8 "/usr/share/man/man8" if [ -f contrib/firmware/iax/iaxy.bin ] ; then \ /bin/install -c -m 644 contrib/firmware/iax/iaxy.bin "/var/lib/asterisk/firmware/iax/iaxy.bin"; \ fi CFLAGS=" -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 " build_tools/mkpkgconfig "/usr/lib/pkgconfig"; find static-http | while read x; do \ if test -d $x; then \ /bin/install -c -m 755 -d "/var/lib/asterisk/$x"; \ else \ /bin/install -c -m 644 $x "/var/lib/asterisk/$x" ; \ fi \ done /bin/install -c -m 644 doc/core-en_US.xml "/var/lib/asterisk/static-http"; /bin/install -c -m 644 doc/appdocsxml.xslt "/var/lib/asterisk/static-http"; if [ -d doc/tex/asterisk ] ; then \ /bin/install -c -d "/var/lib/asterisk/static-http/docs" ; \ for n in doc/tex/asterisk/* ; do \ /bin/install -c -m 644 $n "/var/lib/asterisk/static-http/docs" ; \ done \ fi for x in images/*.jpg; do \ /bin/install -c -m 644 $x "/var/lib/asterisk/images" ; \ done make -C sounds install make[1]: Entering directory `/usr/local/src/asterisk-18.1.0/sounds' --2020-12-02 18:52:05-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-wav-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 20176188 (19M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-wav-1.6.1.tar.gz’ 100%[====================================================================>] 20,176,188 7.79MB/s in 2.5s 2020-12-02 18:52:08 (7.79 MB/s) - ‘asterisk-core-sounds-en-wav-1.6.1.tar.gz’ saved [20176188/20176188] --2020-12-02 18:52:09-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-ulaw-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 10241447 (9.8M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-ulaw-1.6.1.tar.gz’ 100%[====================================================================>] 10,241,447 1.71MB/s in 6.4s 2020-12-02 18:52:15 (1.52 MB/s) - ‘asterisk-core-sounds-en-ulaw-1.6.1.tar.gz’ saved [10241447/10241447] --2020-12-02 18:52:16-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-alaw-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 9937284 (9.5M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-alaw-1.6.1.tar.gz’ 100%[====================================================================>] 9,937,284 3.40MB/s in 2.8s 2020-12-02 18:52:18 (3.40 MB/s) - ‘asterisk-core-sounds-en-alaw-1.6.1.tar.gz’ saved [9937284/9937284] --2020-12-02 18:52:19-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-g729-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1557751 (1.5M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-g729-1.6.1.tar.gz’ 100%[====================================================================>] 1,557,751 2.78MB/s in 0.5s 2020-12-02 18:52:20 (2.78 MB/s) - ‘asterisk-core-sounds-en-g729-1.6.1.tar.gz’ saved [1557751/1557751] --2020-12-02 18:52:20-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-g722-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 10756090 (10M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-g722-1.6.1.tar.gz’ 100%[====================================================================>] 10,756,090 6.58MB/s in 1.6s 2020-12-02 18:52:21 (6.58 MB/s) - ‘asterisk-core-sounds-en-g722-1.6.1.tar.gz’ saved [10756090/10756090] --2020-12-02 18:52:22-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-sln16-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 41366110 (39M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-sln16-1.6.1.tar.gz’ 100%[====================================================================>] 41,366,110 11.1MB/s in 3.9s 2020-12-02 18:52:26 (10.1 MB/s) - ‘asterisk-core-sounds-en-sln16-1.6.1.tar.gz’ saved [41366110/41366110] --2020-12-02 18:52:27-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-siren7-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 6028362 (5.7M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-siren7-1.6.1.tar.gz’ 100%[====================================================================>] 6,028,362 7.39MB/s in 0.8s 2020-12-02 18:52:27 (7.39 MB/s) - ‘asterisk-core-sounds-en-siren7-1.6.1.tar.gz’ saved [6028362/6028362] --2020-12-02 18:52:28-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-siren14-1.6.1.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 9120763 (8.7M) [application/x-gzip] Saving to: ‘asterisk-core-sounds-en-siren14-1.6.1.tar.gz’ 100%[====================================================================>] 9,120,763 8.37MB/s in 1.0s 2020-12-02 18:52:29 (8.37 MB/s) - ‘asterisk-core-sounds-en-siren14-1.6.1.tar.gz’ saved [9120763/9120763] --2020-12-02 18:52:29-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-wav-1.5.2.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 35362826 (34M) [application/x-gzip] Saving to: ‘asterisk-extra-sounds-en-wav-1.5.2.tar.gz’ 100%[====================================================================>] 35,362,826 8.66MB/s in 4.1s 2020-12-02 18:52:33 (8.29 MB/s) - ‘asterisk-extra-sounds-en-wav-1.5.2.tar.gz’ saved [35362826/35362826] --2020-12-02 18:52:34-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-ulaw-1.5.2.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 18007258 (17M) [application/x-gzip] Saving to: ‘asterisk-extra-sounds-en-ulaw-1.5.2.tar.gz’ 100%[====================================================================>] 18,007,258 9.70MB/s in 1.8s 2020-12-02 18:52:36 (9.70 MB/s) - ‘asterisk-extra-sounds-en-ulaw-1.5.2.tar.gz’ saved [18007258/18007258] --2020-12-02 18:52:37-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-alaw-1.5.2.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 17464549 (17M) [application/x-gzip] Saving to: ‘asterisk-extra-sounds-en-alaw-1.5.2.tar.gz’ 100%[====================================================================>] 17,464,549 9.37MB/s in 1.8s 2020-12-02 18:52:39 (9.37 MB/s) - ‘asterisk-extra-sounds-en-alaw-1.5.2.tar.gz’ saved [17464549/17464549] --2020-12-02 18:52:39-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4253587 (4.1M) [application/x-gzip] Saving to: ‘asterisk-extra-sounds-en-gsm-1.5.2.tar.gz’ 100%[====================================================================>] 4,253,587 6.67MB/s in 0.6s 2020-12-02 18:52:40 (6.67 MB/s) - ‘asterisk-extra-sounds-en-gsm-1.5.2.tar.gz’ saved [4253587/4253587] --2020-12-02 18:52:41-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-ulaw-2.03.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7479839 (7.1M) [application/x-gzip] Saving to: ‘asterisk-moh-opsound-ulaw-2.03.tar.gz’ 100%[====================================================================>] 7,479,839 7.98MB/s in 0.9s 2020-12-02 18:52:42 (7.98 MB/s) - ‘asterisk-moh-opsound-ulaw-2.03.tar.gz’ saved [7479839/7479839] --2020-12-02 18:52:42-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-alaw-2.03.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7496413 (7.1M) [application/x-gzip] Saving to: ‘asterisk-moh-opsound-alaw-2.03.tar.gz’ 100%[====================================================================>] 7,496,413 8.03MB/s in 0.9s 2020-12-02 18:52:43 (8.03 MB/s) - ‘asterisk-moh-opsound-alaw-2.03.tar.gz’ saved [7496413/7496413] --2020-12-02 18:52:43-- http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-gsm-2.03.tar.gz Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1777967 (1.7M) [application/x-gzip] Saving to: ‘asterisk-moh-opsound-gsm-2.03.tar.gz’ 100%[====================================================================>] 1,777,967 4.09MB/s in 0.4s 2020-12-02 18:52:44 (4.09 MB/s) - ‘asterisk-moh-opsound-gsm-2.03.tar.gz’ saved [1777967/1777967] make[1]: Leaving directory `/usr/local/src/asterisk-18.1.0/sounds' find rest-api -name "*.json" | while read x; do \ /bin/install -c -m 644 $x "/var/lib/asterisk/rest-api" ; \ done +---- Asterisk Installation Complete -------+ + + + YOU MUST READ THE SECURITY DOCUMENT + + + + Asterisk has successfully been installed. + + If you would like to install the sample + + configuration files (overwriting any + + existing config files), run: + + + + For generic reference documentation: + + make samples + + + + For a sample basic PBX: + + make basic-pbx + + + + + +----------------- or ---------------------+ + + + You can go ahead and install the asterisk + + program documentation now or later run: + + + + make progdocs + + + + **Note** This requires that you have + + doxygen installed on your local system + +-------------------------------------------+
Install Program Docs
[root@cn38-inverness-co asterisk-18.1.0]# make progdocs # Enable DOT # Set Doxygen PROJECT_NUMBER variable # Validate and auto-update local copy Warning: Tag `SYMBOL_CACHE_SIZE' at line 291 of file doc/asterisk-ng-doxygen has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" Warning: Tag `SHOW_DIRECTORIES' at line 491 of file doc/asterisk-ng-doxygen has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" Warning: Tag `HTML_ALIGN_MEMBERS' at line 859 of file doc/asterisk-ng-doxygen has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" Warning: Tag `USE_INLINE_TREES' at line 1044 of file doc/asterisk-ng-doxygen has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" Configuration file `doc/asterisk-ng-doxygen' updated. # Run Doxygen Warning: doxygen no longer ships with the FreeSans font. You may want to clear or change DOT_FONTNAME. Otherwise you run the risk that the wrong font is being used for dot generated graphs. Searching for include files... Searching for files in directory /usr/local/src/asterisk-18.1.0 Searching for files in directory /usr/local/src/asterisk-18.1.0/addons Searching for files in directory /usr/local/src/asterisk-18.1.0/addons/mp3 Searching for files in directory /usr/local/src/asterisk-18.1.0/addons/ooh323c === SNIP === Patching output file 2546/2550 Patching output file 2547/2550 Patching output file 2548/2550 Patching output file 2549/2550 Patching output file 2550/2550 lookup cache used 65536/65536 hits=1461947 misses=70524 finished... # Remove configuration backup file
Make the Asterisk 18.1.0 configuration
[root@cn38-inverness-co asterisk-18.1.0]# make config
Set ldconfig
[root@cn38-inverness-co asterisk-18.1.0]# ldconfig
Setup user, group and permissions
[root@cn38-inverness-co asterisk-18.1.0]# groupadd asterisk [root@cn38-inverness-co asterisk-18.1.0]# useradd -r -d /var/lib/asterisk -g asterisk asterisk [root@cn38-inverness-co asterisk-18.1.0]# usermod -aG audio,dialout asterisk [root@cn38-inverness-co asterisk-18.1.0]# chown -R asterisk.asterisk /etc/asterisk [root@cn38-inverness-co asterisk-18.1.0]# chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk [root@cn38-inverness-co asterisk-18.1.0]# chown -R asterisk.asterisk /usr/lib/asterisk
Set runtime parameters
Need to change things in there.
[root@cn38-inverness-co asterisk-18.1.0]# sudo vim /etc/sysconfig/asterisk [root@cn38-inverness-co asterisk-18.1.0]# sudo vim /etc/asterisk/asterisk.conf
Enable and Start Asterisk 18.1.0
[root@cn38-inverness-co asterisk-18.1.0]# sudo systemctl enable asterisk asterisk.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig asterisk on [root@cn38-inverness-co asterisk-18.1.0]# sudo systemctl start asterisk
Connect to Asterisk and verify version
[root@cn38-inverness-co asterisk-18.1.0]# asterisk -rvv parse error: No category context for line 1 of /etc/asterisk/asterisk.conf Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults Asterisk 18.1.0, Copyright (C) 1999 - 2018, Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 18.1.0 currently running on cn38-inverness-co (pid = 18370) cn38-inverness-co*CLI> Disconnected from Asterisk server Asterisk cleanly ending (0). Executing last minute cleanups