b58aed7f911dfbe9a5331d391144d5b7.jpg
  • 先安裝基本的工具與開發環境
    yum install telnet ntpdate sntp unzip wget mlocate net-tools mailx iftop
    yum install libtermcap-devel libuuid-devel ncurses-devel libxml2-devel sqlite sqlite-devel  openssl-devel  speex-devel gsm-devel 
    yum group install "Development Tools"
    為了等一下 compiler 時不會有問題,這些安裝好後最好重開機一下
  • 下載 Asterisk 與相關的套件
    可到這邊找不同的版本安裝: http://www.asterisk.org/downloads
    wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz
    
    wget https://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz
    wget https://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
    wget http://www.digip.org/jansson/releases/jansson-2.5.tar.gz
  • 解開安裝包,並開始建置
    tar -zxvf libpri-current.tar.gz
    tar -zxvf dahdi-linux-complete-current.tar.gz
    tar -zxf jansson-2.5.tar.gz
    
    tar -zxvf asterisk-14-current.tar.gz
    
    • Building and Installing DAHDI
      cd dahdi-linux-complete-2.11.1+2.11.1/
      make; make install; make config
      
    • Building and Installing LibPRI
      cd libpri-1.6.0/
      make; make install
    • Building and Installing jansson
      cd jansson-2.5
      ./configure --prefix=/usr
      make; make install
      ldconfig
      
  • 安裝 asterisk
    cd asterisk-14.5.0
    contrib/scripts/install_prereq install
    contrib/scripts/get_mp3_source.sh 
    
    ./configure --libdir=/usr/lib64 --with-pjproject-bundled
    
    make menuselect
    接下來會看見下方的選單,如果你是第一次安裝,那就先用預設的吧! 不然太多了!
    f2ce9a7bf8a0e286f3ccf5e1abd15a99.png
     
    選擇好之後按 x 就可以儲存離開,接下來就可以安裝了
    make; make install
    
  • 補充設定
    為了方便正常運作,下面兩個指令可以跑一下,方便產生一些設定檔案與自動做 logrotate
    make install-logrotate
    make config
    ldconfig
    
Facebook 討論區載入中...