Configuring Asterisk
Now it's time to compile and install Asterisk. Let's change to the directory which contains the Asterisk source code.
[[email protected]]# cd /usr/local/src/asterisk-14.X.Y
Next, we'll run a command called ./configure, which will perform a number of checks on the operating system, and get the Asterisk code ready to compile on this particular server.
[[email protected] asterisk-14.X.Y]# ./configure
This will run for a couple of minutes, and warn you of any missing system libraries or other dependencies. Unless you've installed all of the System Requirements for your version of Asterisk, the configure script is likely to fail. If that happens, resolve the missing dependency manually, or use the install_prereq script to resolve all of the dependencies on your system.
Once a dependency is resolved, run configure again to make sure the missing dependency is fixed.
Upon successful completion of ./configure, you should see a message that looks similar to the one shown below. (Obviously, your host CPU type may be different than the below.)
.$$$$$$$$$$$$$$$=.. .$7$7.. .7$$7:. .$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 : unknown : linux-gnu : configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu :
Using install_prereq
The install_prereq script is included with every release of Asterisk in the contrib/scripts
subdirectory. The script has the following options:
- test - print only the libraries to be installed.
- install - install package dependencies only. Depending on your distribution of Linux, version of Asterisk, and capabilities you wish to use, this may be sufficient.
- install-unpacakged - install dependencies that don't have packages but only have tarballs. You may need these dependencies for certain capabilities in Asterisk.
[[email protected] asterisk-14.X.Y]# cd contrib/scripts [[email protected] asterisk-14.X.Y/contrib/scripts]# ./install_prereq install [[email protected] asterisk-14.X.Y/contrib/scripts]# ./install_prereq install-unpackaged