asterisk详细安装步骤

假设当前路径为/opt,不带硬件安装asterisk,进入到CLI>命令行下

1.设置交叉编译环境

# export PATH=$PATH:/opt/timesys/toolchains/armv5b-linux/bin

2.安装make工具包

# tar xzfv make-3.81.tar.gz

# cd make-3.81

# ./configure

# make

说明:

       之所以要安装make-3.81是因为make-3.79有bug,不然,编译asterisk的时候会报如下错误:

expand.c:489: allocated_variable_append: Assertion 'current_variable_set_list->next != 0' failed
make: *** [all] Aborted

3.安装asterisk

# tar xzfv asterisk-1.4.19.1.tar.gz

<output>

#cd asterisk-1.4.19.1

# ./configure --build=i686-linux  --without-pwlib --without-curl

<output>

              .$$$$$$$$$$$$$$$=..     
            .$7$7..          .7$$7:.   
          .$$:.                 ,$7.7  
        .$7.     7$$$$           .$$77 
     ..$$.       $$$$$            .$$$7
    ..7$   .?.   $$$$$   .?.       7$$$.
   $.$.   .$$$7. $$$$7 .7$$$.      .$$$.
 .777.   .$$$$$$77$$$77$$$$$7.      $$$,
 $$$~      .7$$$$$$$$$$$$$7.       .$$$.
.$$7          .7$$$$$$$7:          ?$$$.
$$$          ?7$$$$$$$$$$I        .$$$7
$$$       .7$$$$$$$$$$$$$$$$      :$$$.
$$$       $$$$$$7$$$$$$$$$$$$    .$$$. 
$$$        $$$   7$$$7  .$$$    .$$$.  
$$$$             $$$$7         .$$$.   
7$$$7            7$$$$        7$$$     
 $$$$$                        $$$      
  $$$$7.                       $$  (TM)    
   $$$$$$$.           .7$$$$$$  $$     
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$     
       $$$$$$$$$$$$$$$$.               

 

说明:

    (1)    若不带--without-pwlib 参数,则运行./configure 的时候会报pwlib error

   (2)    若不带--without-curl参数,则运行./configure 的时候会报如下错误:

           Func_curl.c : 106 :error “CURLOPT_NOSIGNAL” undeclared (First use in this function)

[root@localhost asterisk-1.4.19.1]# ../make-3.81/make menuselect   出现如下菜单项:

**************************************************
                                        Asterisk Module and Build Option
Selection
                                    **************************************************
                                                                                                                          
                                                    Press 'h' for help.
                                                                                                                          
                                              ---> 1.  Applications
                                                   2.  Call Detail Recording
                                                   3.  Channel Drivers
                                                   4.  Codec Translators
                                                   5.  Format Interpreters
                                                   6.  Dialplan Functions
                                                   7.  PBX Modules
                                                   8.  Resource Modules
                                                   9.  Voicemail Build Options
                                                   10. Compiler Flags
                                                   11. Module Embedding
                                                   12. Core Sound Packages
                                                   13. Music On Hold File
Packages
                                                   14. Extras Sound Packages

 

[root@localhost asterisk-1.4.19.1]# ../make-3.81/make

.......................
.......................
+--------- Asterisk Build Complete ---------+
 + Asterisk has successfully been built, and +
 + can be installed by running:              +
 +                                           +
 +               /opt/voip/asterisk-1.4.19.1/../make-3.81/make install
+
 +-------------------------------------------+

[root@localhost asterisk-1.4.19.1]# ../make-3.81/make install

 +---- 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:              +
 +                                           +
 +               /opt/voip/asterisk-1.4.19.1/../make-3.81/make samples
+
 +                                           +
 +-----------------  or ---------------------+
 +                                           +
 + You can go ahead and install the asterisk +
 + program documentation now or later run:   +
 +                                           +
 +              /opt/voip/asterisk-1.4.19.1/../make-3.81/make progdocs
+
 +                                           +
 + **Note** This requires that you have      +
 + doxygen installed on your local system    +
 +-------------------------------------------+

[root@localhost asterisk-1.4.19.1]# ../make-3.81/make samples

<output>
 

[root@localhost asterisk-1.4.19.1]# ../make-3.81/make progdocs 

<output>

Generating namespace index...
Generating group index...
Generating example index...
Generating file member index...
Generating namespace member index...
Generating page index...
Generating graph info page...
Generating search index...
Generating style sheet...

则在/usr/sbin/路径下会生成asterisk命令
[root@localhost asterisk-1.4.19.1]# asterisk

[root@localhost asterisk-1.4.19.1]# asterisk -r
Asterisk 1.4.19.1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.19.1 currently running on localhost (pid = 18320)
localhost*CLI>

至此,asterisk 安装完毕

没有更多推荐了,返回首页