We’ve had a few questions about whether or not Asterisk could easily install on CentOS 8. A few months ago the answer to that question was no. However, given some time, a few added packages later, and a custom open source repository contribution we now believe that answer has changed. In this post I’ll explain what steps need to be taken in order to install the necessary dependencies required for most user setups.
After installing CentOS 8, and if you haven’t already, ensure that your system is “up to date”:
$ dnf update
Several Asterisk modules have dependencies that are found in the Extra Packages for Enterprise Linux (EPEL) repository, so next we’ll add that:
$ dnf install epel-release
The same goes for the PowerTools repository, and can be enabled with the following command:
$ dnf config-manager –set-enabled PowerTools
Updating, installing, and enabling the above should allow most users to locate, and download the majority of dependencies used by the various Asterisk modules. However, a few potentially needed libraries will still be missing. More about those later. At this point you can either manually install the packages you need for a specific module, or use the install_prereq script found in the Asterisk source contrib/scripts/ directory.
If choosing the latter option then once the Asterisk source is downloaded execute the following from the top level source directory:
$ contrib/scripts/install_prereq install
As mentioned, even after doing the above a few modules will still be missing the required dependencies necessary to allow enabling, and loading in Asterisk. The res_corosync module is one such module. The dependencies for this module though can be found in the CentOS HighAvailability repository, which can be enabled using the following command:
$ dnf config-manager --set-enabled HighAvailability
Once enabled the dependent corosync libraries can now be installed:
$ dnf install corosync-devel
Jared Smith has created an Asterisk packages for CentOS 8 repository that contains a few packages used by Asterisk that are currently missing from the other repositories mentioned. If you can’t find the package you are looking for in another repository you might want to check for it in this one.
DISCLAIMER: This repository has been created, and is currently maintained by Jared Smith as an open source contributor. The current existence of this repository, and the packages within makes no claim to any future existence of this repository or its packages, or others like it.
That said, Jared is working to get some of the packages located in his repository into one of the “base” repositories. For instance, libresample. In the meantime though if you’d like to use a package from his repository you can enable it using the following:
$ dnf copr enable jsmith/Asterisk_17_Centos_8
As a note, it says “Asterisk_17”, but it should work against other releases of Asterisk. For instance, I was able to use a few of the packages to build against Asterisk 16.
Once the necessary dependencies are installed, Asterisk is now ready to be configured and built. If you have done all of the above, and you find a module you need is still missing a required dependency then that means the package does not yet exist for it. Or it has never existed, and the dependency has to be built from its source.
Below are a few Asterisk module dependencies I found that, currently do not have any available packaged libraries for CentOS 8 (below list includes the Asterisk module and its missing dependency):
- chan_motif – iksemel
- res_xmpp – iksemel
- app_osplookup – osptk
- cdr_beanstalkd – beanstalk
- cel_beanstalkd – beanstalk
- res_calendar_exchange – iksemel
- res_timing_kqueue – kqueue
- chan_misdn – isdnnet, misdn, suppserv
- chan_nbs – nbs
- chan_phone – ixjuser
- chan_vpb – vpb
- res_config_sqlite – sqlite
Almost all of the dependencies listed here have historically had to be built manually from their source. Meaning that either CentOS packages never existed for them, or a package did exist at one time but is no longer made (For example, iksemel) . If you use any of these modules you’ll have to track down the source code and build the libraries manually.
Ready CentOS Eight
Can Asterisk be easily installed on CentOS 8? Based on the above, I’d say that for most users the answer is yes. For those willing to install and use the packages from Jared’s repository then you too should be good to go. Finally, if you use one of the modules with no prepackaged dependency then you are probably expected to build it from source. So you too are ready to use Asterisk on CentOS 8.