Few Tips for installing Asterisk with RHEL 4


#1

Just installed Asterisk 1.2.4 on a box with RHEL 4.0, below are few tips to make it easier for others:
I found that working with Fedora core 4 is much easier, but we need to move to RHEL due to marketing demand.

Info:
The box is a Dell 2850 with Dual Xeon CPUs.
The Digium card used is TE210P.

Uname –a shows:
Linux localhost.localdomain 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux
Note: I used the update 3 (the last one) of RHEL, and of course the SMP (for dual cpus)

  1. First had to add a couple of packages that do not come with RHEL 4:
    up2date gcc (no joke RHEL comes with no gcc)

  2. Had to install Kernel sources: Kernel devel:
    Had first to run up2date --configure - remove the restriction on kernel* modules
    Then: up2date kernel-smp-devel

  3. More up2dates on some packages needed to compile Asterisk
    up2date zlib-devel
    up2date bison
    up2date openssl-devel

  4. Had to create the following soft link:

cd /usr/modules/uname -r
ln -s …/…/…/usr/src/kernels/2.6.9-34.EL-smp-i686 build

  1. Had to edit spinlock.h in /usr/src/kernels/2.6.9-34.EL-smp-i686/include/linux
    See Bugzilla Bug 180568
    The file spinlock.h need the following modification:
    The line:
    #define DEFINE_RWLOCK(x) rw_lock_t x = RW__LOCK_UNLOCK
    is modified to:
    #define DEFINE_RWLOCK(x) rwlock_t x = RW__LOCK_UNLOCK

  2. Started compiling libpri, zaptel, asterisk, asterisk-addons, asterisk-sounds
    (Not the scope of this tip)

Hope it helps.


#2

[quote=“zvika”]1) First had to add a couple of packages that do not come with RHEL 4:
up2date gcc (no joke RHEL comes with no gcc)
[/quote]

RHEL4 comes with whatever you install it with. If you chose the “Development Tools” option during installation, it’ll install gcc for you.


#3

yup, we use fedora core 4 and the ONLY option we select is development tools. everything else (mysqld, httpd) we install manually or through yum.

servers work great, and have very little overhead.

i’d be interested if anyone has had any experience with compiling customized kernels that are optimized for asterisk/voip. i suppose the pound key project might be a step in that direction, but am not sure.