CentOS 5.8 asterisk-1.8.10.1 安裝之二:安裝freepbx

來源:互聯網
上載者:User

接上部:CentOS 5.8 asterisk-1.8.10.1 安裝之一:安裝,添加藍芽支援,添加AMR-NB audio codec

參考: CentOS 5.8 Aasterisk 1.8 rc2 安裝freepbx http://blog.csdn.net/jianghao616/article/details/6059658


環境:

CentOS 5.8

asterisk-1.8.10.1

=================================================================================================================


一:查看系統中是否缺少以下服務,缺少將用 ”yum install 服務名“來安裝
yum install bind httpd sendmail mysql mysql-server
=================================================================================================================


二:禁用Selinux


   這個是安全層級和防火牆的東東西,啟用會影響我們的freepbx的安裝,沒多大P用,禁用它:
vi /etc/sysconfig/selinux
  把    SELINUX=enforcing 
  改成   SELINUX=disabled 
儲存, :wq  最好重啟下
reboot 


=================================================================================================================
三:安裝需要的擴充包
1.
yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel 
yum install libtiff-devel gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel 
yum install libogg-devel openssl-devel mysql-server mysql-devel zlib-devel perl-DateManip sendmail-cf sox  


=================================================================================================================

2. 安裝 phpmyadmin,可選

注意:CentOS 5.8裡面的php是5.1版本的(php -v),phpmyadmin 3版本需要php 5.2。所以這裡我們就用phpmyadmin 2.11好了下載 phpMyAdmin-2.11.11.2-english.zip
http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/
wget http://jaist.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/2.11.11/phpMyAdmin-2.11.11-english.zip
unzip phpMyAdmin-2.11.11-english.zip
mv phpMyAdmin-2.11.11-english  phpmyadmin
chown asterisk:asterisk -R phpmyadmin/
chmod 777 -R phpmyadmin/
mv phpmyadmin /var/www/html


cd /var/www/html/phpmyadmin/libraries/
vi config.default.php
$cfg['blowfish_secret'] = 'xxxx';
$cfg['Servers'][$i]['password'] = 'passw0rd';


service mysqld start
mysqladmin -u root password "passw0rd"




vi /etc/httpd/conf/httpd.conf
加入 ServerName asterisk18rc2
修改
User asterisk
Group asterisk


chmod 777 /var/lib/php/session/
chmod 777 -R /var/lib/php/session/*




service mysqld restart
/etc/init.d/httpd restart
訪問 http://asterisk18/phpmyadmin/



排錯:
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
原因1:沒有關閉SE Linux,或者關閉了SE Linux配置但是沒有reboot Linux
原因2:phpmyadmin的owner不是asterisk,mode不是777


=================================================================================================================
2:安裝 lame
       #  wget http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz/download
or  http://nchc.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
       #  tar zxvf lame-3.99.5.tar.gz
       #   cd lame-3.99.5
       #   ./configure
       #   make
       #  make install

=================================================================================================================

四:安裝FreePBX
    這個必須在asterisk 完整安裝後才能裝
    下載地址:可以到 http://www.freepbx.org(官方)
wget http://mirror.freepbx.org/freepbx-2.9.0.tar.gz
 # tar -xvf freepbx-2.9.0.tar.gz
     # cd freepbx-2.9.0
     # ./start_asterisk start



這裡要注意的是。首先我們必須吧mysql密碼設定為空白,方便運行以下命令(建立相關asterisk 資料庫)
/etc/init.d/mysqld start
mysql  -u root -ppassw0rd
mysql> set password for root@localhost=password('');

mysql> exit;


mysql  -u root   (測試可以空口令登入)


     # mysqladmin create asterisk 


     # mysqladmin create asteriskcdrdb


     # mysql asterisk < SQL/newinstall.sql


     # mysql asteriskcdrdb < SQL/cdr_mysql_table.sql


     # mysql


mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'passw0rd';

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'passw0rd';

mysql>  flush privileges;
mysql> quit;




好了,現在我們又得把mysql密碼設定不可為空(   mysqladmin -u root password "passw0rd"      ),方便運行以下命令


 # ./install_amp --username=root --password=passw0rd          //這裡我的mysql用名為root,密碼是passw0rd
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Using username: root
Using password: ********
Checking user..OK
Checking if Asterisk is running..running with PID: 4173..OK
Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying defa
ult
Creating new /etc/amportal.conf
Enter your USERNAME to connect to the 'asterisk' database:
 [root]
Enter your PASSWORD to connect to the 'asterisk' database:
 [passw0rd]
Enter the hostname of the 'asterisk' database:
 [localhost]
Enter a USERNAME to connect to the Asterisk Manager interface:
 [admin]
Enter a PASSWORD to connect to the Asterisk Manager interface:
 [amp111]
Enter the path to use for your AMP web root:
 [/var/www/html]


Enter the IP ADDRESS or hostname used to access the AMP web-admin:
 [xx.xx.xx.xx] asterisk18
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
 [passw0rd]
Use simple Extensions [extensions] admin or separate Devices and Users [devicean
duser]?
 [extensions]
Created /var/lib/asterisk/bin
Enter directory in which to store super-user scripts:
 [/usr/local/sbin]






    #  echo "/usr/local/sbin/amportal start" >> /etc/rc.local


    # chkconfig httpd on


    # chkconfig mysqld on


OK 安裝完成 # reboot




chmod 777 /var/www/html -R
cd /var/lib/asterisk/
 chmod 777 bin 
 chmod -R 777 bin/*


chmod 777 /var/lib/php/session/
chmod 777 -R /var/lib/php/session/*




http://192.168.100.128

預設使用者名稱口令為admin/admin

第一次登陸管理介面,需要apply configuration


============================================================
現在你可以建立SIP號碼,trunk了

============================================================

排錯:日誌:
tail -f /var/log/httpd/access_log 
tail -f /var/log/httpd/error_log


/var/log/mysqld.log
asterisk 日誌
tail -f /var/log/asterisk/full
tail -f /var/log/asterisk/freepbx.log


排錯:檢查資料訪問
mysql -h localhost -u root -ppassw0rd
use asterisk;

排錯:
http://192.168.158.134/phpmyadmin/

============================================================
提示:

 /etc/amportal.conf

控制誰能用amp 管理協議訪問asterisk伺服器
/etc/asterisk/manager.conf



freepbx 忘記密碼的解決辦法:按照文章修改口令為freepbx後,登入FreePBX Administration頁面並修改口令。

http://hi.baidu.com/qiqi7036/item/a83f10cda2ef1416b67a2422

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.