Install Asterisk 11 on Debian 7

    版本為 12:01, 15 Nov 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    Softwares

    • Asterisk 11.18/13
    • Debian 7.8 wheezy

    Install Required Dependencies

    > apt-get update && apt-get upgrade
    
    > apt-get install build-essential linux-headers-`uname -r` openssh-server \
    apache2 mysql-server mysql-client libgnutls26 bison flex php5 php5-curl php5-cli \
    php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev \
    libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev \
    pkg-config automake libtool autoconf git subversion openssl
    

    Install PearDB

    > pear uninstall db
    > pear install db-1.7.14
    

    You may receive a warning:
       WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"

    At this time it is safe to ignore that message.

    Reboot Server

    > reboot
    

    Download Asterisk source files

    > cd /usr/local/src
    > wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
    

    Compile and install Asterisk

    > tar xzf asterisk-11-current.tar.gz
    > cd asterisk-11.18.0
    > ./configure
    > contrib/scripts/get_mp3_source.sh
    > make menuselect
    > make
    > make install
    > make samples
    > make config
    > make install-logrotate
    

    TIPs:

    make config command is used to generate the startup script in the directories /etc/init.d and /etc/default

    make install-logrotate is used to generate the logrotate config in the directory /etc/logrotate.d

    Create Asterisk account and set the permissions of the directories

    > addgroup --system asterisk
    > adduser --system --ingroup asterisk --home /var/lib/asterisk --no-create-home --shell /bin/bash asterisk
    
    > chown -R asterisk:asterisk /etc/asterisk
    > chown -R asterisk:asterisk  /var/{run,log,spool,lib}/asterisk
    

    Configure startup script

    > vi /etc/default/asterisk
    
    ## uncomment the 2 lines below
    AST_USER="asterisk"
    AST_GROUP="asterisk"
    

    TIPs:

    You may see the following info when starting the Asterisk, I think it is normal to ignore the message.

    Starting Asterisk PBX: asteriskPrivilege escalation protection disabled!
    See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.

    Powered by MindTouch Core