This is the website of an IT geek, technologist, freelance writer, photographer, musician, rock climber, classic mini enthusiast, iPad and Mac zealot.
You have been warned.
Installing Asterisk on Fedora
I've been using Asterisk as our home PBX for a couple of months now. It's been sitting natively on an old PC up until now. Now that I have got my ESX server back up and running, I've moved it to a VM based implementation. This blog post documents the process used to install on Fedora Core 8.
Firstly, I built a fresh Fedora Core 8 VM. I've opted for FC8 over the newer distributions because it was what I had available! I also know that it works well as an ESX 3.5 virtual machine. I've installed with no X server and made a fairly minimal build in terms of operating system resources: 1 vCPU, 512MB RAM, 8GB disk.
We'll need to install some base packages before Asterisk will work. I always run a system wide update before starting any work. It may be useful to run this process twice, as the first run usually only updates the list of available packages; the second run actually updates the packages! This will take some time, so use the pause to read the rest of this article through so you're ready for what's coming..
[root ~]# yum -y update
Once the system has been updated, reboot to load any new kernel updates and we're ready to go. Next, you'll need a few packages, including a development environment to compile the Asterisk source code. The nice thing about using yum to perform this task is that it will automatically get any dependancy packages for you.
[root ~]# yum -y install gcc gcc-c++ flex bison ncurses-devel bind
Note that I've added a DNS server package (bind). This will become a DNS secondary server in my environment. I run a webserver and MySQL server on a different VM. This will be used by Asterisk for maintaining a telephone number directory.
So now we're ready to obtain and install Asterisk. I'm downloading asterisk 1.6.1 here. You'll want to get the latest stable from here.
[root ~]# wget http://downloads.asterisk.org/pub/.../asterisk-1.6.1.1.tar.gz
[root ~]# gzip -d asterisk-1.6.1.1.tar.gz
[root ~]# tar -xf asterisk-1.6.1.1.tar
[root ~]# cd asterisk-1.6.1.1
[root ~]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
.
.
.
configure: Package configured for:
configure: OS type : linux-gnu
configure: Host CPU : i686
configure: build-cpu:vendor:os: i686 : pc : linux-gnu :
configure: host-cpu:vendor:os: i686 : pc : linux-gnu :
Ok, so far so good. As long as there were no errors in the configure, we're ready to compile Asterisk. Optionally, you can now run the following to choose which modules you wish to include:
[root ~]# make menuselect
When you've finished that, or if that's too much hard work, just type:
[root ~]# make
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory `/root/asterisk-1.6.1.1/menuselect'
gcc -g -c -D_GNU_SOURCE -Wall -c -o menuselect_stub.o menuselect_stub.c
gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a
make[1]: Leaving directory `/root/asterisk-1.6.1.1/menuselect'
.
.
.
[LD] abstract_jb.o acl.o adsistub.o aescrypt.o aeskey.o aestab.o alaw.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autoservice.o callerid.o cdr.o channel.o chanvars.o cli.o config.o cryptostub.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o poll.o privacy.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o stdtime/localtime.o strcompat.o taskprocessor.o tcptls.o tdd.o term.o threadstorage.o timing.o translate.o udptl.o ulaw.o utils.o version.o editline/libedit.a db1-ast/libdb1.a -> asterisk
+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running: +
+ +
+ make install +
+-------------------------------------------+
The code is compiled, but needs to be installed into an appropriate location:
[root ~]# make install
[root@credibilityproblem asterisk-1.6.1.1]# make install
menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules ...
.
.
.
+---- Asterisk Installation Complete -------+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample +
+ configuration files (overwriting any +
+ existing config files), run: +
+ +
+ make samples +
+ +
+----------------- or ---------------------+
+ +
+ You can go ahead and install the asterisk +
+ program documentation now or later run: +
+ +
+ make progdocs +
+ +
+ **Note** This requires that you have +
+ doxygen installed on your local system +
+-------------------------------------------+
Presumably, you'll want Asterisk to start automatically on reboot. There is a start up script for RedHat that will work perfectly on Fedora already provided. Assuming that you are still in your Asterisk source directory:
[root ~]# cp contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk
[root ~]# chkconfig asterisk on
To start Asterisk, run the following:
[root ~]# service asterisk start
Starting asterisk: [ OK ]
Now it's config time which I'll look at in another article. If you are going to run Asterisk in a virtual machine, you will need to ensure that the system clock time is kept accurate by using NTP. As a virtual machine, you also have the option of installing VMware tools and performing guest to host time synchonisation. I'll write another article on installing VMware tools on Linux.
- Log in to post comments


Recent comments