關閉 SELinux
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
系統更新
yum update yum groupinstall core base "Development Tools"
安裝必要套件
yum install gcc gcc-c++ lynx bison mysql-devel mysql-server php php-mysql php-pear php-mbstring php-xml tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process crontabs cronie cronie-anacron wget vim php-xml uuid-devel libtool sqlite-devel unixODBC mysql-connector-odbc libuuid-devel binutils-devel php-ldap
關閉防火牆
chkconfig iptables off service iptables stop
設定 MySQL 啟動
chkconfig mysqld on service mysqld start
TIP:
不要設定 DB 的密碼
設定 Apache 啟動
chkconfig httpd on service httpd start
安裝 PearDB
pear channel-update pear.php.net pear install db-1.7.14
TIP:
出現以下訊息,可以將它忽略。
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
重啟主機
reboot
cd /usr/src git clone https://github.com/meduketto/iksemel.git cd iksemel ./autogen.sh ./configure make make check make install
adduser asterisk -M -c "Asterisk User"
NOTE: 如果是虛擬機或沒有使用語音卡,可以忽略 DAHDI 與 LibPRI 安裝
編譯安裝 DAHDI & LibPRI(選用)
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz tar xvfz dahdi-linux-complete-current.tar.gz tar xvfz libpri-current.tar.gz cd dahdi-linux-complete-* make all make install make config cd /usr/src/libpri-* make make install
編譯安裝 pjproject
TIP: 如果主機是 32-bit,編譯時要加上 --libdir=/usr/lib
cd /usr/src wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.tar.bz2 tar xjf pjproject-2.5.5.tar.bz2 cd pjproject-2.5.5 CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound \ --disable-resample --disable-video --disable-opencore-amr --libdir=/usr/lib64 make dep make clean make make install
編譯安裝 jansson
cd /usr/src git clone https://github.com/akheron/jansson.git cd jansson autoreconf -i ./configure --libdir=/usr/lib64 make make install
編譯安裝 SpanDSP
cd /usr/src wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz tar xzf spandsp-0.0.6.tar.gz cd spandsp-0.0.6 ./configure --libdir=/usr/lib64 make make install
編譯安裝 Asterisk
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz tar xzf asterisk-13-current.tar.gz cd asterisk-13.11.2/ contrib/scripts/install_prereq install ./configure --libdir=/usr/lib64 contrib/scripts/get_mp3_source.sh make menuselect
Add-ons ->
- format_mp3
- res_config_mysql
- cdr_mysql
make make install make config ldconfig
下載安裝 Asterisk 語音檔
cd /var/lib/asterisk/sounds wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-wav-current.tar.gz wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz tar xzf asterisk-core-sounds-en-wav-current.tar.gz -C en/ tar xzf asterisk-extra-sounds-en-wav-current.tar.gz -C en/ wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-g722-current.tar.gz wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz tar xzf asterisk-core-sounds-en-g722-current.tar.gz -C en/ tar xzf asterisk-extra-sounds-en-g722-current.tar.gz -C en/
目錄權設定
chown asterisk. /var/run/asterisk chown -R asterisk. /etc/asterisk chown -R asterisk. /var/{lib,log,spool}/asterisk chown -R asterisk. /var/www/
設定 Apache & PHP
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf sed -i ':a;N;$!ba;s/AllowOverride None/AllowOverride All/2' /etc/httpd/conf/httpd.conf service httpd restart
cd /usr/src wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz tar xfz freepbx-13.0-latest.tgz cd freepbx service asterisk stop ./start_asterisk start ./install -n
最小模組安裝
fwconsole ma upgrade framework core voicemail sipsettings infoservices \ featurecodeadmin logfiles callrecording cdr dashboard music conferences fwconsole restart fwconsole reload fwconsole chown
設定商用模組套件庫(選用)
wget -P /etc/yum.repos.d/ -N http://yum.schmoozecom.net/schmooze-commercial/schmooze-commercial.repo yum clean all yum install php-5.3-zend-guard-loader sysadmin fail2ban incron ImageMagick /var/lib/asterisk/bin/freepbx_setting MODULE_REPO http://mirror1.freepbx.org,http://mirror2.freepbx.org
NOTE:
這些套件有些只能從官方套件庫安裝,目前還不支援 CentOS 7。
重啟 Apache 並安裝商用模組 SysAdmin(選用)
service httpd restart fwconsole ma download sysadmin fwconsole ma install sysadmin
錯誤:
checking for headers required to compile python extensions... not found
configure: error: could not find Python headers
Ans:
yum install python-devel
錯誤:
/usr/src/iksemel/missing: line 52: makeinfo:命令找不到
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
Ans:
yum install textinfo
Images 0 | ||
---|---|---|
No images to display in the gallery. |