CentOS 5.8 asterisk-1.8.10.1 Installation II: Installation of FreePBX

Source: Internet
Author: User
Tags chmod pear centos phpmyadmin

Upper: CentOS 5.8 asterisk-1.8.10.1 Installation: Install, add Bluetooth support, add AMR-NB audio codec

Reference: CentOS 5.8 aasterisk 1.8 RC2 installation FreePBX http://blog.csdn.net/jianghao616/article/details/6059658


Environment:

CentOS 5.8

asterisk-1.8.10.1

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


One: see if the following services are missing from the system, and the missing will be installed with the Yum install service name
Yum install bind httpd sendmail mysql mysql-server
=============================================================================================================== ==


Two: Disable SELinux


This is the security level and the east thing of the firewall, enabling will affect our FreePBX installation, not much p used, disable it:
Vi/etc/sysconfig/selinux
Put selinux=enforcing
Change into selinux=disabled
Save: WQ best to reboot
Reboot


=============================================================================================================== ==
Third: Install the required expansion pack
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
Yum install libogg-devel openssl-devel mysql-server mysql-devel zlib-devel perl-datemanip SENDMAIL-CF sox


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

2. Install phpMyAdmin, optional

Note: PHP in CentOS 5.8 is version 5.1 (PHP-V), and phpMyAdmin 3 requires PHP 5.2. So here we'll use phpMyAdmin 2.11. Download 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
Join ServerName ASTERISK18RC2
Modify
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
Visit http://asterisk18/phpmyadmin/



Wrong line:
Forbidden
You don ' t have permission to access/phpmyadmin/on this server.
Reason 1: Do not close SE Linux, or turn off SE linux configuration but no reboot Linux
The reason 2:phpmyadmin's owner is not Asterisk,mode, not 777.


=============================================================================================================== ==
2: Install 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

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

IV: Install FREEPBX
This must be installed after the asterisk is fully fitted.
Download address: can go to http://www.freepbx.org (official)
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



The point to note here is that. First, we have to. mysql password set to null, easy to run the following command (establish the relevant asterisk database)
/etc/init.d/mysqld start
Mysql-u root-ppassw0rd
Mysql> Set password for Root@localhost=password (");

Mysql> exit;


Mysql-u root (test can log on with a blank password)


# mysqladmin Create asterisk


# mysqladmin Create Asteriskcdrdb


# MySQL Asterisk < Sql/newinstall.sql


# MySQL Asteriskcdrdb < sql/cdr_mysql_table.sql


# MySQL


Mysql> GRANT all privileges in asteriskcdrdb.* to asteriskuser@localhost identified by ' Passw0rd ';

Mysql> GRANT all privileges in asterisk.* to asteriskuser@localhost identified by ' Passw0rd ';

mysql> flush Privileges;
Mysql> quit;




Okay, now we have to put the MySQL password setting cannot be empty (mysqladmin-u root password "Passw0rd") for easy running of the following command


#./install_amp--username=root--password=passw0rd//Here my MySQL is named root, the password is 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 Installation Complete # 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

Default User name password is admin/admin

First login admin interface, need apply configuration


============================================================
Now you can create the SIP number, trunk.

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

Wrong line: log:
Tail-f/var/log/httpd/access_log
Tail-f/var/log/httpd/error_log


/var/log/mysqld.log
Asterisk log
Tail-f/var/log/asterisk/full
Tail-f/var/log/asterisk/freepbx.log


Debugging: Checking data access
Mysql-h Localhost-u root-ppassw0rd
Use asterisk;

Wrong line:
http://192.168.158.134/phpmyadmin/

============================================================
Tips:

/etc/amportal.conf

Control who can access the asterisk server with the AMP Management protocol
/etc/asterisk/manager.conf



FreePBX Forget the password solution: according to the article modified password for FreePBX, login FreePBX Administration page and modify password.

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.