Difference between revisions of "Instalasi FreePBX Asterisk Management Portal"

From OnnoWiki
Jump to navigation Jump to search
Line 3: Line 3:
 
  http://www.freepbx.org/download-freepbx
 
  http://www.freepbx.org/download-freepbx
 
  http://mirror.freepbx.org/freepbx-2.7.0.tar.gz
 
  http://mirror.freepbx.org/freepbx-2.7.0.tar.gz
 +
 +
cp freepbx-2.7.0.tar.gz /usr/local/src/
 +
cd /usr/local/src
 +
tar zxvf freepbx-2.7.0.tar.gz
 +
cd /usr/local/src/freepbx-2.7.0
  
 
Siapkan modul yang dibutuhkan
 
Siapkan modul yang dibutuhkan
  
  sudo apt-get install asterisk asterisk-mysql php5-mysql php-db mysql-server libapache2-mod-php5 \
+
  sudo apt-get install libxml2 libxml2-dev libtiff4 libtiff4-dev lame apache2 mysql-client \
  php5-gd php-pear php-pear-DB sox curl
+
mysql-server php-mail php-pear php-xml-parser php-net-socket php-net-smtp php-http php-db \
 +
openssl libssl-dev linux-source perl bison libncurses5-dev libaudiofile-dev curl sox \
 +
asterisk asterisk-mysql php5-mysql php-db mysql-server libapache2-mod-php5 \
 +
  php5-gd
  
 
  sudo a2enmod php5
 
  sudo a2enmod php5
Line 19: Line 27:
 
  ;default_charset = "ISO-8859-1"
 
  ;default_charset = "ISO-8859-1"
 
  default_charset = "utf8";
 
  default_charset = "utf8";
 +
upload_max_filesize = 20M
  
 +
Lakukan supaya asterisk bisa mengakses ke Web & PHP
  
  # sudo nano /etc/php5/apache2/php.ini
+
  sudo chown asterisk:asterisk /var/lib/php5 -R &
  change: upload_max_filesize to upload_max_filesize = 20M
+
sudo chown asterisk:asterisk /var/www -R &
 +
  sudo /etc/init.d/apache2 restart
  
# sudo nano /etc/php5/cli/php.ini
 
change: upload_max_filesize to upload_max_filesize = 20M
 
  
Set the php lib directory to be owned by asterisk so that it can make changes to the php.ini
+
==Install MySQL database==
# sudo chown asterisk:asterisk /var/lib/php5 -R
 
  
Set ownership of the /var/www directory to asterisk so it can write to files
+
Setup MySQL
# sudo chown asterisk:asterisk /var/www -R
 
  
  Restart Apache
+
  mysql –user root -p
  # sudo /etc/init.d/apache2 restart
+
  create database asteriskcdrdb;
 
+
create database asterisk;
 
+
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO root@localhost IDENTIFIED BY ‘123456′;
==Install MySQL database==
+
GRANT ALL PRIVILEGES ON asterisk.* TO root@localhost IDENTIFIED BY ‘123456′;
 +
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
 +
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
 +
quit
  
 
  sudo mysql_install_db
 
  sudo mysql_install_db
Line 44: Line 54:
 
  mysqladmin create asterisk -p
 
  mysqladmin create asterisk -p
 
  mysql –user=root –password=<chosen MySQL Password> asterisk < ./SQL/newinstall.sql
 
  mysql –user=root –password=<chosen MySQL Password> asterisk < ./SQL/newinstall.sql
  mysql –user=root –password=<chosen MySQL Password>asteriskcdrdb < ./SQL/cdr_mysql_table.sql
+
  mysql –user=root –password=<chosen MySQL Password> asteriskcdrdb < ./SQL/cdr_mysql_table.sql
 +
 
 +
Misalnya root password 123456
 +
 
 +
sudo mysql_install_db
 +
mysqladmin u root password ‘123456’
 +
mysqladmin create asteriskcdrdb -p123456
 +
mysqladmin create asterisk -p123456
 +
cd /usr/local/src/freepbx-2.7.0/SQL
 +
mysql –u root –p123456 asterisk < newinstall.sql
 +
mysql –u root –p123456 asteriskcdrdb < cdr_mysql_table.sql
  
Setup MySQL
 
  
mysql –user root -p
 
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
 
GRANT ALL PRIVILEGES ON  asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
 
quit
 
  
  

Revision as of 10:18, 19 April 2010

Download dari

http://www.freepbx.org/download-freepbx
http://mirror.freepbx.org/freepbx-2.7.0.tar.gz
cp freepbx-2.7.0.tar.gz /usr/local/src/
cd /usr/local/src
tar zxvf freepbx-2.7.0.tar.gz 
cd /usr/local/src/freepbx-2.7.0

Siapkan modul yang dibutuhkan

sudo apt-get install libxml2 libxml2-dev libtiff4 libtiff4-dev lame apache2 mysql-client \
mysql-server php-mail php-pear php-xml-parser php-net-socket php-net-smtp php-http php-db \
openssl libssl-dev linux-source perl bison libncurses5-dev libaudiofile-dev curl sox \
asterisk asterisk-mysql php5-mysql php-db mysql-server libapache2-mod-php5 \
php5-gd
sudo a2enmod php5

Edit untuk lokalisasi agar berjalan dengan baik

vi /etc/php5/apache2/php.ini 
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "ISO-8859-1"
default_charset = "utf8";
upload_max_filesize = 20M

Lakukan supaya asterisk bisa mengakses ke Web & PHP

sudo chown asterisk:asterisk /var/lib/php5 -R &
sudo chown asterisk:asterisk /var/www -R &
sudo /etc/init.d/apache2 restart


Install MySQL database

Setup MySQL

mysql –user root -p
create database asteriskcdrdb;
create database asterisk;
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO root@localhost IDENTIFIED BY ‘123456′;
GRANT ALL PRIVILEGES ON asterisk.* TO root@localhost IDENTIFIED BY ‘123456′;
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109′;
quit
sudo mysql_install_db
mysqladmin u root password ‘<chosen MySQL Password>’
mysqladmin create asteriskcdrdb -p
mysqladmin create asterisk -p
mysql –user=root –password=<chosen MySQL Password> asterisk < ./SQL/newinstall.sql
mysql –user=root –password=<chosen MySQL Password> asteriskcdrdb < ./SQL/cdr_mysql_table.sql

Misalnya root password 123456

sudo mysql_install_db
mysqladmin u root password ‘123456’
mysqladmin create asteriskcdrdb -p123456
mysqladmin create asterisk -p123456
cd /usr/local/src/freepbx-2.7.0/SQL
mysql –u root –p123456 asterisk < newinstall.sql
mysql –u root –p123456 asteriskcdrdb < cdr_mysql_table.sql



Install FreePBX

cd /usr/src/freepbx
sudo ./install_amp
# cd /usr/src/freepbx-2.5.0
bash fix for asterisk start script
# sudo ln -sf /bin/bash /bin/sh
# sudo ./start_asterisk start
# sudo ./install_amp

Beberapa yang harus diubah

AMPBIN=/var/lib/asterisk/bin
ASTAGIDIR=/usr/share/asterisk/agi-bin
AMPWEBROOT=/var/www/freepbx
FOPWEBROOT=/var/www/freepbx/panel

Pastikan Apache Web Server dapat mengakses file freepbx

sudo adduser www-data asterisk
sudo apache2ctl graceful

Referensi

Pranala Menarik