Now it's time to compile and install Asterisk. Let's change to the directory which contains the Asterisk source code.
[root@server dahdi-linux-complete-2.X.Y+2.X.Y]# cd /usr/local/src/asterisk-1.8.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.
[root@server asterisk-1.8.X.Y]# ./configure
This will run for a couple of minutes, and warn you of any missing system libraries or other dependencies.
If you have missing dependencies then you should install them now and then run configure again to make sure they are recognized. A helpful way to install most of the dependencies you need is to use the install_prereq script included in the contrib/scripts/ directory of your Asterisk source. It's quite straightforward to use, but may not work on all systems. Run the script with no arguments to see the usage help.
Upon 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 :
Comments:
Innocent newbie question. Would one run "make distclean" before or after "./configure" ?? I realize someone with experience would know when or why "make distclean" would be in order. ![]() |
First there is no such thing as an innocent question. Only a fool presumes he/she knows everything. ![]() |
Howard, Albro make dist-clean is an alias to distclean which removes menuselect, sounds, makeopts and other build settings. The Makefile is a good read for users interested in the build system. You can look at the source of Makefile and see what it does. ![]() |
I cant install the install_prereq, any other way to install the prereq?
![]() |
Not at this time. You can look inside the script to see the various package names, then install them manually via your package manager. If there are problems with the install_prereq script, feel free to read through Asterisk Issue Guidelines and post an issue on the bug tracker. ![]() |