keywords_asterisk_libpri_dahdш_selinux_oslec_mysql_php

Установка FreePBX 2.10 на Centos6

Пошаговая инструкция по установке Asterisk, FreePBX, libpri, DAHDI-linux, Mysql, Web-server(apache), lame, oslec, php. Автозагрузка. Зависимости. httpd.conf, php.ini.

Установка Asterisk10 на Debian 6

Установка Asterisk12 + FreePBX 12 на CentOS 6.5 64-bit

*DNS Server
*Web Server
*Mail Server
*MySQL Database
*Development Tools

nano /etc/sysconfig/network

HOSTNAME=internal.hostname.DOMAIN.com 

nano /etc/sysconfig/network-scripts/ifcfg-eth0

IPADDR=192.168.1.20    #(IP адрес) 
NETMASK=255.255.255.0  #(маска сети)
GATEWAY=192.168.1.1    #(шлюз)
NETWORK=192.168.1.0    #(сеть)
ONBOOT=yes      #(активировать при загрузке)
BOOTPROTO=none  #(DHCP выключено)

nano /etc/resolv.conf

search internal.DOMAIN.com #(домен)
nameserver 192.168.1.5     #(dns 1)
nameserver 8.8.8.8            #(dns 2)
 
  echo "selinux=disabled" > /etc/selinux/config
  reboot
 
yum install e2fsprogs-devel  keyutils-libs-devel krb5-devel libogg 
 libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear
 php-gd php-mysql php-pdo kernel-devel ncurses-devel 
 audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel 
 perl-DateManip sox
 
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz

  tar zxvf lame-3.98.4tar.gz
  cd lame-3.98.4
  ./configure
  make
  make install
 

cd /usr/src

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.6.1+2.6.1.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.12.tar.gz

wget http://mirror.freepbx.org/freepbx-2.10.0.tar.gz
tar zxvf asterisk-1.8-current.tar.gz
tar zxvf dahdi-linux-complete-2.6.1+2.6.1.tar.gz
tar zxvf libpri-1.4.12.tar.gz
tar zxvf freepbx-2.10.0.tar.gz
cd /usr/src/dahdi-linux-complete-2.6.1+2.6.1/

OSLEC

если требуетсяLOL <spoiler>

# uname -r
2.6.32-279.11.1.el6.x86_64
mkdir /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/staging 
cp -fR /usr/src/kernels/2.6.32-279.11.1.el6.x86_64/drivers/staging/echo /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/staging/  
sed -i "s|#obj-m += dahdi_echocan_oslec.o|obj-m += dahdi_echocan_oslec.o|"  /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/Kbuild 
sed -i "s|#obj-m += ../staging/echo/|obj-m += ../staging/echo/|" /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/Kbuild 
echo 'obj-m += echo.o' > /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/staging/echo/Kbuild 

</spoiler>

make
make install
make config

cd /usr/src/dahdi-linux-complete-2.6.1+2.6.1/

make all
make install
make config
 
  cd /usr/src/libpri-1.4.12 
  make clean 
  make
  make install
cd /usr/src/asterisk-1.8-current
useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk
mkdir /var/run/asterisk
mkdir /var/log/asterisk
chown -R asterisk:asterisk /var/run/asterisk
chown -R asterisk:asterisk /var/log/asterisk
chown -R asterisk:asterisk /var/lib/php/session/
nano +242 /etc/httpd/conf/httpd.conf
Change User apache and Group apache to User asterisk and Group asterisk.
Ctrl-X to save, 'Y' to confirm

nano +338 /etc/httpd/conf/httpd.conf
Change AllowOverride None to AllowOverride All
Ctrl-X to save, 'Y' to confirm
contrib/scripts/get_mp3_source.sh
./configure
make menuselect
---> Add-ons
           --- extended ---
           XXX chan_mobile
           [*] chan_ooh323
           [*] format_mp3
           [*] res_config_mysql
           --- deprecated ---
           [*] app_mysql
           [*] app_saycountpl
           [*] cdr_mysql
---> Core Sound Packages
           [*] CORE-SOUNDS-RU-GSM
---> Extra Sound Packages
           [*] EXTRA-SOUNDS-EN-GSM
     
make
make install

nano +107 /usr/sbin/safe_asterisk

ASTARGS="-U asterisk"

/etc/init.d/mysqld start
 
cd /usr/src/freepbx-2.10.0



mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

mysql
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'SOMEPASSWORD';
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'SOMEPASSWORD';
flush privileges;
\q

mysqladmin -u root password 'SOMEPASSWORD'
 
cd /usr/src/freepbx-2.10.0
./start_asterisk start

#php53
nano +946 /etc/php.ini
     date.timezone = "Europe/Moscow"
pear install DB
yum  install php-posix

./install_amp --username=asteriskuser --password=SOMEPASSWORD
echo "/usr/local/sbin/amportal start" >> /etc/rc.local
chkconfig httpd on
chkconfig mysqld on
 

откройте в браузере

http://ipaddressofpbx/admin

Примените настройки FreePBX

  • freepbx/freepbx_install.txt
  • Последние изменения: 2014/08/20