asterisk详细安装步骤

本文档详细介绍了在没有硬件的情况下,在/opt路径下手动编译安装Asterisk的步骤。首先设置交叉编译环境,然后安装make工具包解决编译bug,接着安装Asterisk并配置编译选项,最后完成编译和安装过程。过程中提到了配置选项如--without-pwlib和--without-curl的重要性,以及menuselect菜单的选择。

假设当前路径为/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 安装完毕

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值