Asterisk Installation on FreeBSD
This guide refers to the port of Asterisk version 1.4.3,
tested on the FreeBSD OS version 6.2, which you may find, for example, here
Index
- Getting started
- Building and installing Asterisk
- Get Asterisk to start at boot
- First execution of Asterisk
- Reboot and verify
Getting started
It’s suggested, if not compulsory, to first sync the ports collection and to rebuild the kernel.
Refer to this excellent guide (particularly the section “Rebuild the World, and Recompile the Kernel”) or that one.
After synched the ports collection, having rebuilt the operating system and the kernel, it’s suggested to install the following tools, for an easy maintenance of the system, it’s updating and to ensure the coherence of the installed packages:
- portupgrade
for an easy and interactive way to update the packages and the ports.
As the superuser root, run:
cd /usr/ports/ports-mgmt/portupgrade
and then
make install clean
to build and install the port.
It’s now possible to update all the software on the system by running the command:
portupgrade -ai - portaudit
which shows the published vulnerabilities affecting the packages installed on your system.
As the superuser root, run:
cd /usr/ports/ports-mgmt/portaudit
and then
make install clean
to build and install the port.
It’s now possible to update the vulnerabilities database and audit the installed packages by running the command:
portaudit -Fa
Also, those are some tricks you may find useful:
to show the differences between the version of the installed packages and the ones of the ports collection currently present on the system, run:
pkg_version -v
to print some informations of a port, like it’s dependencies, for example of asterisk, run, in the /usr/ports folder, the command:
make search name=asterisk
to print the dependencies of an installed package, for example of gmake, run:
pkg_info -xr gmake
to print the dependencies of a package, even if not installed, for example of proftpd, run, in the folder of it’s port, the command:
make pretty-print-build-depends-list
but first you have to run, in the /usr/ports folder, the command:
make index
which, after a while, will build an index with the informations of the packages.
And if, for example, the package portupgrade is installed, it’s manual can be viewed by running:
man portupgrade
Building and installing Asterisk
- Change the current working directory to the one which holds the port of Asterisk, as the superuser root, by running:
cd /usr/ports/net/asterisk - Build and install Asterisk by running:
make install clean
you will be prompted for the building options, uncheck them all.
Note: if you need to change them again, run:
make config
Asterisk will be built and installed,
and also it’s example configuration files, in the /usr/local/etc/asterisk folder
Get Asterisk to start at boot
If you want the Asterisk daemon to start at boot, add with your favourite text editor, to the /etc/rc.conf file, the following:
asterisk_enable=”YES”
First execution of Asterisk
As the superuser root, from whatever folder you are in, run:
asterisk -vvvc
Asterisk will load it’s modules and it’s configuration, you should then read:
Asterisk Ready.
*CLI>
this is the command line interface of Asterisk, to logout run the command:
stop now
Reboot and verify
Reboot the system with the command:
reboot
after the reboot process, you can verify that Asterisk is running with the command:
asterisk -r
and logout from the command line interface with the command:
exit
|
|
This guide is also available in Italian |
![]() |
|


