Install Elastix on Amazon EC2

    版本為 16:37, 26 Dec 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    原創:OSSLab Alang

    Amazon EC2 http://aws.amazon.com/ec2/
    為一虛擬VM 租用服務.租用之後
    Amazon現有365天99.95%可用性的服務層級協定(SLA)。

    穩定度非常高.價格也有彈性
    理論上可以做 IP PBX 某種備援狀況.

    以下面方式安裝並上線使用


    SRPM - http://repo.elastix.org/elastix/1.6/base/SRPMS/
    Part 2: Asterisk in a Cloud - http://voxilla.com/2009/02/13/asteri...mazon-ec2-1178
    gcc-4.0.2 - http://ftp.gnu.org/gnu/gcc/gcc-4.0.2/ 

    All we need to do is
    1. Install an fresh CentOS 5.4 operation system
    2. Install all packages(rpm) of Elastix
    3. Compile and install dahdi_dummy module
    Install an fresh CentOS 5.4 operation system

    Please follow this link to complete it
    http://zoetrope.speakermouth.com/200...install-script

    Install all packages(rpm) of Elastix

    I modified the official install script to be able to complete the installation of all rpms on EC2.

    Compile and install dahdi_dummy module

    // Install gcc-4.0.2

    cd /usr/src
    wget http://ftp.gnu.org/gnu/gcc/gcc-4.0.2/gcc-4.0.2.tar.bz2
    tar -xjf gcc-4.0.2.tar.bz2
    cd gcc-4.0.2
    mkdir tmp
    cd tmp
    ../configure --program-suffix=-4.0.2
    make
    make install

    // Install kernel source (xen-3.1.0-src-ec2-v1.0)

    yum install ncurses-devel
    cd /usr/src
    wget http://ec2-downloads.s3.amazonaws.com/xen-3.1.0-src-ec2-v1.0.tgz
    tar xzvf xen-3.1.0-src-ec2-v1.0.tgz
    cd xen-3.1.0-src-ec2-v1.0
    make linux-2.6-xenU-config
    
    rm -f /lib/modules/2.6.18-xenU-ec2-v1.0/build
    ln -s /usr/src/xen-3.1.0-src-ec2-v1.0/build-linux-2.6.18-xenU_x86_32 \
          /lib/modules/2.6.18-xenU-ec2-v1.0/build
    rm -f /lib/modules/2.6.18-xenU-ec2-v1.0/source
    ln -s /usr/src/xen-3.1.0-src-ec2-v1.0/linux-2.6.18-xen \
          /lib/modules/2.6.18-xenU-ec2-v1.0/source
    
    cd /usr/src/xen-3.1.0-src-ec2-v1.0
    mv linux-2.6.18-xen/Makefile linux-2.6.18-xen/Makefile.orig
    sed -e 's_^\(HOSTCC.*=\).*_\1 /usr/local/bin/gcc-4.0.2_' \
        -e 's_^\(CC.*=\).*_\1 /usr/local/bin/gcc-4.0.2_' \
        <linux-2.6.18-xen/Makefile.orig >linux-2.6.18-xen/Makefile
    make linux-2.6-xenU-build
    make linux-2.6-xenU-install

    // Install dahdi

    cd /usr/src/digium
    wget http://downloads.digium.com/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
    tar xzvf dahdi-linux-current.tar.gz
    cd dahdi-linux*
    make
    make install
    

    // 設定只啟動 dahdi_dummy 模組

    mv /etc/dahdi/modules /etc/dahdi/modules.orig
    echo '# only launch dahdi_dummy' > /etc/dahdi/modules

    // 測試 dahdi_dummy 運作

    #> service dahdi restart
    #> dahdi_test -v
    
    Opened pseudo dahdi interface, measuring accuracy...
    
    8192 samples in 8198.648 system clock sample intervals (100.081%)
    8192 samples in 8205.841 system clock sample intervals (100.169%)
    8192 samples in 8182.408 system clock sample intervals (99.883%)
    8192 samples in 8190.424 system clock sample intervals (99.981%)
    8192 samples in 8190.352 system clock sample intervals (99.980%)

    Notes: 數值應該要接近 100%

    // 在 EC2 的 Linux 系統環境取得 Public IP

    curl http://169.254.169.254/latest/meta-data/public-ipv4
    Powered by MindTouch Core