apt-get install build-essential linux-headers-`uname -r` mysql-server mysql-client 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 unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev libspandsp-dev libiksemel-dev libiksemel-utils libiksemel3
NOTE:
以上的安裝會提示設定 MySQL 的管理者密碼
還有這些
apt-get install libmyodbc unixodbc
重啟系統
pear uninstall db pear install db-1.7.14
cd /usr/src wget http://mirror.freepbx.org/freepbx-12.0.21.tgz tar xzf freepbx-12.0.21.tgz cd freepbx/
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php.ini cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf sed -i 's/\/var\/www/\/var\/www\/html/' /etc/apache2/sites-available/default service apache2 restart
mysqladmin -u root -p create asterisk mysqladmin -u root -p create asteriskcdrdb mysql -u root -p -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'ThisIsPass';" mysql -u root -p -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'ThisIsPass';" mysql -u root -p -e "flush privileges;"
service asterisk stop ./start_asterisk start ./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW} Checking if Asterisk is running..running with PID: 4228..OK Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default Creating new /etc/amportal.conf Enter your USERNAME to connect to the 'asterisk' database: [asteriskuser] Enter your PASSWORD to connect to the 'asterisk' database: [amp321] Enter the hostname of the 'asterisk' database: [localhost] Enter a USERNAME to connect to the Asterisk Manager interface: [admin] <輸入 AMI 帳號,按 Enter> Enter a PASSWORD to connect to the Asterisk Manager interface: [amp111] <輸入 AMI 密碼,按 Enter> Enter the path to use for your AMP web root: [/var/www/html] <按 Enter> Created /var/www/html Enter the IP ADDRESS or hostname used to access the AMP web-admin: [192.168.1.1] 192.168.31.170 <輸入本機 IP> Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]? [extensions] Enter directory in which to store AMP executable scripts: [/var/lib/asterisk/bin] ... <按 Enter> Installing new FreePBX files../etc/asterisk/queues.conf has been changed from the original version. Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)?y ... <輸入 y >
繼續安裝
amportal chown amportal a ma installall amportal a reload amportal a ma refreshsignatures amportal chown
TIPs:
如果官網下載連結無法連線,試試 mirror2.freepbx.org。
最後修正
mv /var/lib/asterisk/mohmp3 /var/lib/asterisk/mohmp3_old ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
重起所有服務
amportal restart
登入 FreePBX
http://192.168.31.170/admin/,