IGOS Nusantara dan FreePBX: Perbedaan revisi
| (7 revisi antara oleh pengguna yang sama tidak ditampilkan) | |||
| Baris 1: | Baris 1: | ||
| − | Installing FreePBX 12   | + | Installing FreePBX 12    | 
| − | + | Official FreePBX documentation covers just CentOS 6.x, this guide will provide step-by-step instructions for the more recent CentOS 7.x and RHEL 7.x distributions.  | |
| − | + | 1. Install additional dependencies, which are required for FreePBX to work.  | |
| − | + | ||
| − | 1  | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
  #    |   #    | ||
| Baris 34: | Baris 13: | ||
  kernel-devel git subversion kernel-devel php-process crontabs cronie \  |   kernel-devel git subversion kernel-devel php-process crontabs cronie \  | ||
  cronie-anacron wget vim php-xml uuid-devel libtool sqlite-devel  |   cronie-anacron wget vim php-xml uuid-devel libtool sqlite-devel  | ||
| + | |||
| − | + | 2. Make sure that the Apache httpd daemon is set to start at boot.  | |
  #    |   #    | ||
  systemctl enable httpd.service; systemctl start httpd.service  |   systemctl enable httpd.service; systemctl start httpd.service  | ||
| − | + | 3. Enable MySQL (now MariaDB in recent RHEL/CentOS versions) to start at boot.  | |
  #    |   #    | ||
  systemctl enable mariadb.service; systemctl start mariadb.service  |   systemctl enable mariadb.service; systemctl start mariadb.service  | ||
| − | + | 4. Amankan MySQL  | |
| + | |||
| + |  #  | ||
| + |  mysql_secure_installation  | ||
| + | |||
| + | 5. Make sure IPTABLES is either disabled and/or is not blocking external traffic.  | ||
  #    |   #    | ||
| Baris 64: | Baris 49: | ||
  pear channel-update pear.php.net  |   pear channel-update pear.php.net  | ||
  pear install db-1.7.14  |   pear install db-1.7.14  | ||
| + | |||
9. Add the required Asterisk user.  | 9. Add the required Asterisk user.  | ||
| Baris 77: | Baris 63: | ||
  git clone https://github.com/akheron/jansson.git ;\  |   git clone https://github.com/akheron/jansson.git ;\  | ||
  wget http://www.pjsip.org/release/2.2.1/pjproject-2.2.1.tar.bz2  |   wget http://www.pjsip.org/release/2.2.1/pjproject-2.2.1.tar.bz2  | ||
| + | |||
11. Compile and install pjproject.  | 11. Compile and install pjproject.  | ||
| Baris 85: | Baris 72: | ||
  cd pjproject-2.2.1  |   cd pjproject-2.2.1  | ||
  CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr \  |   CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr \  | ||
| − | + |  --enable-shared --disable-sound --disable-resample --disable-video \  | |
| − | + |  --disable-opencore-amr --libdir=/usr/lib64  | |
  make dep  |   make dep  | ||
  make  |   make  | ||
  make install  |   make install  | ||
| + | |||
12. Compile and install jansson.  | 12. Compile and install jansson.  | ||
| + |  #  | ||
  cd /usr/src/jansson  |   cd /usr/src/jansson  | ||
  autoreconf -i  |   autoreconf -i  | ||
| Baris 98: | Baris 87: | ||
  make  |   make  | ||
  make install  |   make install  | ||
| + | |||
13. Add EPEL 6 libresample libraries (forthcoming for EPEL 7, but will work OK).  | 13. Add EPEL 6 libresample libraries (forthcoming for EPEL 7, but will work OK).  | ||
| + |  #  | ||
  rpm -Uvh \  |   rpm -Uvh \  | ||
| − | + |  https://dl.fedoraproject.org/pub/epel/6/x86_64/libresample-0.1.3-12.el6.x86_64.rpm \  | |
| − | + |  https://dl.fedoraproject.org/pub/epel/6/x86_64/libresample-devel-0.1.3-12.el6.x86_64.rpm  | |
| − | + | ||
13. Compile and install Asterisk.  | 13. Compile and install Asterisk.  | ||
| + |  #  | ||
  ldconfig  |   ldconfig  | ||
  cd /usr/src  |   cd /usr/src  | ||
| Baris 120: | Baris 112: | ||
  make config  |   make config  | ||
  ldconfig  |   ldconfig  | ||
| + | |||
14. Install the Asterisk extra sounds package.  | 14. Install the Asterisk extra sounds package.  | ||
| + |  #  | ||
  mkdir -p /var/lib/asterisk/sounds  |   mkdir -p /var/lib/asterisk/sounds  | ||
  cd /var/lib/asterisk/sounds  |   cd /var/lib/asterisk/sounds  | ||
| Baris 131: | Baris 125: | ||
  tar -zvxf asterisk-extra-sounds-en-g722-current.tar.gz  |   tar -zvxf asterisk-extra-sounds-en-g722-current.tar.gz  | ||
  rm -f asterisk-extra-sounds-en-g722-current.tar.gz  |   rm -f asterisk-extra-sounds-en-g722-current.tar.gz  | ||
| + | |||
15. Install and Configure FreePBX.  | 15. Install and Configure FreePBX.  | ||
| + |  #  | ||
  cd /usr/src  |   cd /usr/src  | ||
  wget http://mirror.freepbx.org/freepbx-12.0.3.tgz  |   wget http://mirror.freepbx.org/freepbx-12.0.3.tgz  | ||
| Baris 143: | Baris 139: | ||
  chown -R asterisk.asterisk /usr/lib64/asterisk  |   chown -R asterisk.asterisk /usr/lib64/asterisk  | ||
  chown -R asterisk.asterisk /var/www/  |   chown -R asterisk.asterisk /var/www/  | ||
| + | |||
15. Adjust PHP and Apache settings + set Apache to start at boot.  | 15. Adjust PHP and Apache settings + set Apache to start at boot.  | ||
| + |  #  | ||
  cp /etc/php.ini /etc/php.ini.orig  |   cp /etc/php.ini /etc/php.ini.orig  | ||
  sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini  |   sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini  | ||
| Baris 151: | Baris 149: | ||
  sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf  |   sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf  | ||
  systemctl enable httpd.service; systemctl start httpd.service  |   systemctl enable httpd.service; systemctl start httpd.service  | ||
| + | |||
16. Configure MySQL database and set permissions.  | 16. Configure MySQL database and set permissions.  | ||
| + |  #  | ||
  export ASTERISK_DB_PW=amp109  |   export ASTERISK_DB_PW=amp109  | ||
  mysqladmin -u root create asterisk  |   mysqladmin -u root create asterisk  | ||
| Baris 160: | Baris 160: | ||
  mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"  |   mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"  | ||
  mysql -u root -e "flush privileges;"  |   mysql -u root -e "flush privileges;"  | ||
| + | |||
17. Start Asterisk and FreePBX.  | 17. Start Asterisk and FreePBX.  | ||
| + |  #  | ||
  cd /usr/src/freepbx  |   cd /usr/src/freepbx  | ||
  ./start_asterisk start  |   ./start_asterisk start  | ||
| Baris 175: | Baris 177: | ||
  amportal chown  |   amportal chown  | ||
  amportal restart  |   amportal restart  | ||
| + | |||
18. Restart Apache and access the website.  | 18. Restart Apache and access the website.  | ||
| + |  #  | ||
  /bin/systemctl restart httpd.service  |   /bin/systemctl restart httpd.service  | ||
| Baris 187: | Baris 191: | ||
* http://www.visidon.com/blog/2015/01/installing-freepbx-12-on-centos-7-or-rhel-7/  | * http://www.visidon.com/blog/2015/01/installing-freepbx-12-on-centos-7-or-rhel-7/  | ||
* https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial  | * https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial  | ||
| + | * https://www.academia.edu/9760620/ANALISIS_PERFORMANSI_DAN_KEAMANAN_VoIP_OVER_VPN  | ||
Revisi terkini pada 27 April 2015 06.43
Installing FreePBX 12
Official FreePBX documentation covers just CentOS 6.x, this guide will provide step-by-step instructions for the more recent CentOS 7.x and RHEL 7.x distributions.
1. Install additional dependencies, which are required for FreePBX to work.
# yum install -y gcc gcc-c++ \ lynx bison mariadb-devel mariadb-server gmime-devel psmisc \ php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel \ libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel \ libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion \ kernel-devel git subversion kernel-devel php-process crontabs cronie \ cronie-anacron wget vim php-xml uuid-devel libtool sqlite-devel
2. Make sure that the Apache httpd daemon is set to start at boot.
# systemctl enable httpd.service; systemctl start httpd.service
3. Enable MySQL (now MariaDB in recent RHEL/CentOS versions) to start at boot.
# systemctl enable mariadb.service; systemctl start mariadb.service
4. Amankan MySQL
# mysql_secure_installation
5. Make sure IPTABLES is either disabled and/or is not blocking external traffic.
# iptables -L -n
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
8. Install PearDB.
# pear channel-update pear.php.net pear install db-1.7.14
9. Add the required Asterisk user.
# adduser asterisk -M -c "Asterisk User"
10. Download Asterisk source and supporting libraries.
# cd /usr/src ;\ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz ;\ git clone https://github.com/akheron/jansson.git ;\ wget http://www.pjsip.org/release/2.2.1/pjproject-2.2.1.tar.bz2
11. Compile and install pjproject.
# cd /usr/src tar -xjvf pjproject-2.2.1.tar.bz2 cd pjproject-2.2.1 CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr \ --enable-shared --disable-sound --disable-resample --disable-video \ --disable-opencore-amr --libdir=/usr/lib64 make dep make make install
12. Compile and install jansson.
# cd /usr/src/jansson autoreconf -i ./configure --libdir=/usr/lib64 make make install
13. Add EPEL 6 libresample libraries (forthcoming for EPEL 7, but will work OK).
# rpm -Uvh \ https://dl.fedoraproject.org/pub/epel/6/x86_64/libresample-0.1.3-12.el6.x86_64.rpm \ https://dl.fedoraproject.org/pub/epel/6/x86_64/libresample-devel-0.1.3-12.el6.x86_64.rpm
13. Compile and install Asterisk.
# ldconfig cd /usr/src tar -zvxf asterisk-13-current.tar.gz cd asterisk-* contrib/scripts/install_prereq install ./configure --libdir=/usr/lib64 contrib/scripts/get_mp3_source.sh make menuselect # SELECT format_mp3 on this screen, then Save + Exit make make install make config ldconfig
14. Install the Asterisk extra sounds package.
# mkdir -p /var/lib/asterisk/sounds cd /var/lib/asterisk/sounds wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz tar -zvxf asterisk-extra-sounds-en-wav-current.tar.gz rm -f asterisk-extra-sounds-en-wav-current.tar.gz wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz tar -zvxf asterisk-extra-sounds-en-g722-current.tar.gz rm -f asterisk-extra-sounds-en-g722-current.tar.gz
15. Install and Configure FreePBX.
# cd /usr/src wget http://mirror.freepbx.org/freepbx-12.0.3.tgz tar -zvxf freepbx-12.0.3.tgz chown -R asterisk.asterisk /var/run/asterisk chown -R asterisk.asterisk /etc/asterisk chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk mkdir -p /usr/lib/asterisk; chown -R asterisk.asterisk /usr/lib/asterisk chown -R asterisk.asterisk /usr/lib64/asterisk chown -R asterisk.asterisk /var/www/
15. Adjust PHP and Apache settings + set Apache to start at boot.
# cp /etc/php.ini /etc/php.ini.orig sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.orig sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf systemctl enable httpd.service; systemctl start httpd.service
16. Configure MySQL database and set permissions.
#
export ASTERISK_DB_PW=amp109
mysqladmin -u root create asterisk
mysqladmin -u root create asteriskcdrdb
mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
mysql -u root -e "flush privileges;"
 
17. Start Asterisk and FreePBX.
#
cd /usr/src/freepbx
./start_asterisk start
rm -Rf /var/www/html/
./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW}
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
./start_asterisk restart
amportal chown
amportal a ma installall
amportal a reload
amportal a ma refreshsignatures
amportal chown
amportal restart
18. Restart Apache and access the website.
# /bin/systemctl restart httpd.service
19. Continue to the admin interface to complete the setup and access FreePBX.
http://www.mysite.com/admin/
Tautan: