Install Asterisk 1.8, FreePBX 2.8, di CentOS 5.5

Persiapan

Dibutuhkan 5 jenis password yang berbeda :

  • PASSWORD1 root password
  • PASSWORD2 Asterisk database
  • PASSWORD3 FreePBX administrator
  • PASSWORD4 Flash Operator Panel
  • PASSWORD5 Asterisk Recording

Kebutuhan

  1. yum groupinstall “DNS Name Server”
  2. yum groupinstall “Web Server”
  3. yum groupinstall “Mail Server”
  4. yum groupinstall “MySQL Database”
  5. yum groupinstall “Development Tools”

Sesudah install paket-paket diatas, skrng dibutuhkan paket tambahan yang perlu di install :

  1. yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel
  2. yum install gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel
  3. yum install openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf sox

Jangan lupa install wget :

  • yum install wget

Setting named.conf :

  1. echo “options {” >> /var/named/chroot//etc/named.conf
  2. echo ” directory \”/var/named\”;” >> /var/named/chroot//etc/named.conf
  3. echo ” dump-file \”/var/named/data/cache_dump.db\”;” >> /var/named/chroot//etc/named.conf
  4. echo ” statistics-file \”/var/named/data/named_stats.txt\”;” >> /var/named/chroot//etc/named.conf
  5. echo “};” >> /var/named/chroot//etc/named.conf
  6. echo “include \”/etc/rndc.key\”;” >> /var/named/chroot//etc/named.conf
  7. cd /var/named/chroot//etc/
  8. chmod 640 named.conf
  9. chgrp named named.conf
  10. ln -s /var/named/chroot//etc/named.conf /etc/named.conf

Matiin Security-Enhanced Linux dan membuka penuh firewall (supaya simpel) :

  • echo “SELINUX=disabled” > /etc/selinux/config
  • iptables -P INPUT ACCEPT
  • iptables -P OUTPUT ACCEPT
  • iptables -P FORWARD ACCEPT
  • iptables –F
  • iptables –X
  • /etc/init.d/iptables save
  • atau menggunakan setup

Install Asterisk 1.8

  1. cd /usr/src
  2. wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
  3. tar xvfz asterisk-1.8-current.tar.gz
  4. cd asterisk-1.8.0
  5. contrib/scripts/get_mp3_source.sh
  6. ./configure
  7. make menuconfig
  8. make
  9. make install
  10. make samples

Setelah install semua, paket source dari asterisk bisa di buang.

  1. cd ..
  2. rm -rf asterisk-1.8.0
  3. rm asterisk-1.8-current.tar.gz

Install FreePBX 2.8

  1. cd /usr/src
  2. wget http://mirror.freepbx.org/freepbx-2.8.0.tar.gz
  3. tar xvfz freepbx-2.8.0.tar.gz
  4. cd freepbx-2.8.0

Jalankan MySQL, bikin database asterisk dengan cara sebagai berikut :

  1. /etc/init.d/mysqld start
  2. chkconfig mysqld on
  3. mysqladmin create asterisk
  4. mysqladmin create asteriskcdrdb
  5. mysql asterisk < SQL/newinstall.sql
  6. mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

Masuk ke MySQL :

  • mysql

Bikin username dan password untuk database asterisk, dengan menggunakan query berikut:

  1. GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘PASSWORD2‘;
  2. GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘PASSWORD2‘;
  3. flush privileges;
  4. \q

Ubah MySQL user root.

  • mysqladmin -u root password ‘PASSWORD1

Bikin user asterisk dan folder permission nya:

  1. useradd -c “Asterisk PBX” -d /var/lib/asterisk asterisk
  2. chown –R asterisk:asterisk /var/lib/asterisk
  3. chown -R asterisk:asterisk /var/run/asterisk
  4. chown -R asterisk:asterisk /var/log/asterisk
  5. chown -R asterisk:asterisk /var/lib/php/session/

Modifikasi konfigurasi apache:

  • vi /etc/httpd/conf/httpd.conf
    1. Ubah User apache dan Group apache menjadi User asterisk and Group asterisk.
    2. Ubah AllowOverride None menjadi AllowOverride All.

Start Apache dan untuk startup nya:

  1. /etc/init.d/httpd start
  2. chkconfig httpd on

Start Asterisk:

  • ./start_asterisk start

Konfigurasi FreePBX:

  • ./install_amp –username=asteriskuser –password=PASSWORD2

Setelah itu akan muncul menu-menu sbb:

  1. [asteriskuser] → user yang dipakai untuk asterisk
  2. [PASSWORD2] → password user asterisk
  3. [localhost] → biarkan default
  4. [admin] → user pada freepbx
  5. [amp111] → password default freepbx user, sebaiknya diganti dengan PASSWORD3
  6. [/var/www/html] → direktori yang digunakan freepbx
  7. [xx.xx.xx.xx] → ubah menggunakan ip publik untuk freepbx (bisa pakai ip local kalo ga punya ip publik)
  8. [passw0rd] → Flash Operator Panel default password, sebaiknya diganti dengan PASSWORD4
  9. [extensions] → biarkan default
  10. [/var/lib/asterisk/bin] → biarkan default
  11. [/usr/local/sbin] → biarkan default

Ubah Asterisk Recording Interface password, dan menyalakan autentifikasi dengan cara:

  • vi /etc/amportal.conf
    1. ARI_ADMIN_PASSWORD=PASSWORD5
    2. AUTHTYPE=database

Untuk matiin FOP bisa menggunakan dibawah ini(opsi):

    1. FOPRUN=false
    2. FOPDISABLE=true

Menambahkan FreePBX pada startup:

  • echo “/usr/local/sbin/amportal start” >> /etc/rc.local
  • reboot
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s