yum update
yum install kernel-devel bison bison-devel php ncurses-devel zlib-devel openssl-devel gnutls-devel gcc gcc-c++ libxml2 libxml2-devel mysql php-mysql mysql-devel mysql-server
cd /usr/src
wget http://mirror.freepbx.org/freepbx-2.8.1.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.2.4.tar.gz
wget http://nchc.dl.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
tar xvf libpri-1.4.11.5.tar.gz
cd libpri-1.4.11.5
make
make install
cd ..
tar xvf dahdi-linux-complete-2.4.0+2.4.0.tar.gz
cd dahdi-linux-complete-2.4.0+2.4.0
make all
make install
make config
cd ..
tar xvf asterisk-1.8.2.4.tar.gz
cd asterisk-1.8.2.4
./configure
make menuselect
选
make
make install
make samples
make config
cd ..
vi /etc/sysconfig/selinux
set SELINUX=disabled
yum install libtiff-devel php4-pear perl-CPAN audiofile-devel php-gd sox php-pear-DB php-mysql
rpm -q libxml2
rpm -q libxml2-devel
rpm -q libtiff
rpm -q libtiff-devel
rpm -q lame
rpm -q httpd
rpm -q mysql
rpm -q mysql-devel
rpm -q mysql-server
rpm -q php
rpm -q php4-pear
rpm -q php-mysql
rpm -q php-gd
rpm -q openssl
rpm -q openssl-devel
rpm -q kernel-devel
rpm -q perl
rpm -q perl-CPAN
rpm -q bison
rpm -q ncurses-devel
rpm -q audiofile-devel
rpm -q curl
rpm -q sox
tar xvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure
make
make instal
tar xvf freepbx-2.8.1.tar.gz
cd freepbx-2.8.1
./start_asterisk start
这里要注意的是。首先我们必须吧mysql密码设置为空,方便运行以下命令(建立相关asterisk 数据库)
mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
- mysql --user root -p
mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)
mysql> quit
service iptables stop
vi /etc/httpd/conf/httpd.conf
asterisk
asterisk
cd /var/www/html/
chown -Rvf asterisk:asterisk *
cd /usr/local/sbin/
chmod 777 amportal