Koozali.org: home of the SME Server

How to for installing Asterisk from Digium source code

Offline arne

  • ****
  • 1,116
  • +0/-4
How to for installing Asterisk from Digium source code
« on: May 10, 2006, 01:45:06 AM »
There is nothing that indicates that a Sourcode installation will perform bether or different than the smeserver-asterisk rpm alternative that also exist. Still it can be interesting to test it out (!!?)

(Personally I use 3 differnt Astereisk servers to learn this technology, and I like to let one of those be a Asterisk server installed on SME 7.0 R2 and from sourcecode.)

I know I do not have answers to make such a soucecode installation the best possible way, but I'm able to get it work. The idea behind this post is to hope for somebody else also will try it out and eventually come up with some improvements.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
How to for installing Asterisk from Digium source code
« Reply #1 on: May 10, 2006, 01:50:18 AM »
HOW TO INSTALL ASTERISK FROM SOURCECODE, REV 0.0 (But it works ..)


1. Do some temporary "unauthorized editing" of the /etc/yum.conf file (At the moment I do not know any bether way to do it.)

Set [base], [addons] and [updates] to enabled

2. Install compilator environment. (Don't know if some of this stuff could had been left out.)

yum -y install gcc4.i386

yum -y install gcc-c++

yum -y install zlib-devel

3. Istall cvs

yum -y install cvs

4. Download the kernel soucecode pluss openssl-devel

http://mirror.centos.org/centos/4.3/apt/i386/SRPMS.os/

http://mirror.centos.org/centos/4.3/apt/i386/RPMS.os/

Install kernel source:

 rpm -Uvh kernel-2.6.9-34.EL.src.rpm

install openssl-devel

 rpm -Uvh --nodeps openssl-devel-0.9.7a-43.8.i586.rpm

5. Login to the Digium CVS server, download software:

cd /usr/src
cvs -d :pserver:anoncvs@cvs.digium.com:/usr/cvsroot login
Password: "anoncvs"

For zaptel installations only:

# cvs -d :pserver:anoncvs@cvs.digium.com:/usr/cvsroot checkout zaptel zapata libpri asterisk

For ip-telephony

cvs -d :pserver:anoncvs@cvs.digium.com:/usr/cvsroot checkout asterisk

6. Compile the software


Step A-C for Zaptel only

6A. Compile Zaptel
# cd zaptel
make install
6B  Compile Zapata
# cd ../zapata
make install
6C Compile Libpri
# cd ../libpri
make install
6D Compile Asterisk
# cd ../asterisk
make install
7. Install sample configuration files:
make samples
8. Edit /etc/sip.conf, /etc/iax.conf and extentions.conf, eventualy other configuration files as required.
9. Start up the asterisk server:
asterisk start
10. Go into the CLI shell to monitor and control activity
asterisk -vvvr
11. Decide if to remove or keep development environment.
12. Reedit the temorary changes of the yum.conf file to its original values.
Note: I have tested this with a pure ip-telephony environment only (Not any Zaptel cards).

Best reg Arne
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
How to for installing Asterisk from Digium source code
« Reply #2 on: May 10, 2006, 10:16:22 PM »
Quote from: "arne"

1. Do some temporary "unauthorized editing" of the /etc/yum.conf file (At the moment I do not know any bether way to do it.)

Set [base], [addons] and [updates] to enabled


Use:

yum install --enablerepo=base --enablerepo=updates --enablerepo=addons xxx

Offline arne

  • ****
  • 1,116
  • +0/-4
How to for installing Asterisk from Digium source code
« Reply #3 on: May 11, 2006, 12:09:48 AM »
Thanks a lot. This was one of the bad parts of it.

I guess this command will enable the repositories for download.
How to dissable then afer ? (To set everything back to normal)

Hvat do the "xxx" indicate ? (It's not the meaning that the --enablerepo command shal be runned for each install line ?)

(yum install --enablerepo=base --enablerepo=updates --enablerepo=addons xxx )

The other "major bad part of it" is this one:

rpm -Uvh --nodeps openssl-devel-0.9.7a-43.8.i586.rpm

It could be "harmless", and I guess it is bur it could also (theoretically) be some hidden side effects (??)

By the way the installation made from sourcode seems to be working quite ok. I also have one server with the smeserver-asterisk rpm running side by side. Actually I must admit that there is not much difference. They works much equally the same. The source code installation has implemented support for ip-telephony only (No Zaptel support.)
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
How to for installing Asterisk from Digium source code
« Reply #4 on: May 11, 2006, 12:41:36 AM »
Quote from: "arne"

I guess this command will enable the repositories for download.
How to dissable then afer ? (To set everything back to normal)


Don't use --enablerepo in future yum commands. [You should read yum documentation, and use google to learn more about yum. I would rather not be your personal tutor.]

Quote

Hvat do the "xxx" indicate ?


The package or packages you are asking to be installed.

Offline arne

  • ****
  • 1,116
  • +0/-4
How to for installing Asterisk from Digium source code
« Reply #5 on: May 11, 2006, 08:39:32 AM »
I did not find information about the use of --enablerepo in the how-to's I found on the net. --enablerepo is mentioned in man yum, but not with examples how to use.

I tested this one:

yum install --enablerepo=base  nmap

This worked perfectly and installed nmap from the Centos base repository.

Thanks a lot !
......