FreePBX/UbuntuInstallation

From Teknologisk videncenter
< FreePBX
Revision as of 21:26, 21 November 2011 by Rael (talk | contribs) (Created page with "=Installation af Ubuntu= Installer Ubuntu Lucid 10.04 LTS fra fog serveren, med et tryk på '''F12'''. Vælg Install Ubuntu > Install Ubuntu 10.04 64bit Unattended from mirror.t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installation af Ubuntu

Installer Ubuntu Lucid 10.04 LTS fra fog serveren, med et tryk på F12. Vælg Install Ubuntu > Install Ubuntu 10.04 64bit Unattended from mirror.tekkom.dk.

File:Daf.dk
Her mangler der et dump af fog install skærmen

Admin bruger:root
Password: Toor1234

Installation af Apache

For at installere Apache PHP og MySQL server skriver vi:

aptitude install php5-mysql libapache2-mod-php5 mysql-server

Angiv ikke noget password til mysql serveren når den spørg om det.

I php.ini skal vi sikre os default mime type er sat til text/html og charset til UTF8
nano /etc/php5/apache2/php.ini

; By default, PHP will output a character encoding using
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
; http://php.net/default-mimetype
default_mimetype = "text/html"

; PHP's default character set is set to empty.
; http://php.net/default-charset
;default_charset = "iso-8859-1"
default_charset = "utf8";

Install Asterisk

For at installere Asterisk og ekstra moduler skriver vi:

aptitude install asterisk asterisk-mysql asterisk-mp3 php-db php5-gd php-pear sox curl asterisk-sounds-extra

"There is no reason to install zaptel if you are using kernel 2.6 or above as it will provide the timing device unless of course you are using zaptel hardware. Ztdummy is no longer necessary."[1]

Ændre Apatche til at køre som asterisk

nano /etc/apache2/envvars

#export APACHE_RUN_USER=www-data
#export APACHE_RUN_GROUP=www-data

export APACHE_RUN_USER=asterisk
export APACHE_RUN_GROUP=asterisk

Har også ændre BACKGROUND = 0 til 1 i /usr/sbin/safe_asterisk

Install FreePBX

Download den nyeste FreePBX fra [www.freepbx.org]

cd /tmp/
wget http://mirror.freepbx.org/freepbx-2.9.0.tar.gz
cd /usr/src
tar xvfz /tmp/freepbx-2.9.0.tar.gz
cd freepbx-2.9.0/

Opret databaser:

mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
mysql
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
flush privileges;
quit

Kør installations programmet med ./installpbx
Har valgt default hele vejen igennem på nær ved IP adressen og AMPWEBROOT=/var/www/freepbx istedet for default /var/www/html

Opret et password til admin brugeren & genstart Apache:

htpasswd -c /etc/apache2/freepbx-passwd admin
/etc/init.d/apache2 restart