Compile Asterisk
Ok, you have the source code to Asterisk sitting in your /usr/src/asterisk directory. Now what?cd /usr/src/asterisk
make clean
make
make install
Note: By default, Asterisk runs as the root user. This is a security liability. Consider:
Executable files installed:
- /usr/sbin/asterisk: The Asterisk daemon that runs your PBX
- /usr/sbin/safe_asterisk: A shell script to make sure Asterisk keeps on running
- /usr/sbin/astgenkey
- /usr/sbin/astman: A very very basic manager interface. See astman for details.
Other directories structures created:
- /usr/include/asterisk: Contains header files required for building asterisk applications, channel drivers, and other loadable modules.
- /usr/lib/asterisk: Contains binary objects related to Asterisk which are architecture-specific.
- /var/lib/asterisk: Contains variable data used by Asterisk in its normal operation.
- /var/spool/asterisk: Used for runtime spooled files of voicemail, outgoing calls, etc.
Install Configuration Files
Now you are almost ready for configuration. Do this:cd /usr/src/asterisk
make samples
This will copy a set of sample configuration files to your /etc/asterisk directory.
(:exclaim:) If you have existing configuration files in your /etc/asterisk directory, they will be renamed with ".old" appended to their filenames.
You should be able to start Asterisk with no changes needed to the sample configuration files:
Or you may go ahead and start turning all the knobs and pressing all the buttons:
Compilation Notes
VIA ITX mainboards
Asterisk 1.2.x
The VIA would aspire to be a i686, but it is actually a i586 from a compiler standpoint. So with that, you need to make a change to your /usr/src/asterisk/Makefile and change the following:#ifeq (${OSARCH},Linux)
#PROC=$(shell uname -m)
#endif
# Pentium Pro Optimize
#PROC=i686
# Pentium & VIA processors optimize
PROC=i586
Make sure that you comment out the ifeq (${OSARCH},Linux) or else when the Makefile is running, it will reset the PROC value from i586 back to i686.
Asterisk 1.4.x
Run configure with the following arguments: "--build=i586 --host=i586".Solaris 8 SPARC
On the prerequirement it is noted to use ginstall for doing "make install" but it is not noted what to do if it is not exist!Under Makefile.defs
#ifeq ($(OS), solaris)
#use GNU versions
#INSTALL ?= ginstall >> change the following to INSTALL ?= install
#TAR ?= gtar
#else
#INSTALL ?= install
#TAR ?= tar
#endif
Good Luck
Asterisk | Asterisk Installation

Comments
333make: Fatal error in reader: Makefile, line 30: Unexpected end of line seen
make: Fatal error in reader: Makefile, line 30: Unexpected end of line seen
Line 30 in the Makefile has the following -
export ASTERISKVERSION
Anyone has any clues as to why I am getting this error. I have installed as non-root user and trying to compile as same user.
333chan_zap.c:2086: error: too few arguments to function `pri_sr_set_bearer'
chan_zap.c:2086: error: too few arguments to function `pri_sr_set_bearer'
is caused by not installing libpri before compiling asterisk !
ciao
333Re: To compile an alsa module.
On debian this is provided by libasound2-dev.
333Re: Not sure what mainboard you have?
333To compile an alsa module.
333Not sure what mainboard you have?