Quantcast
Channel: FreePBX Community Forums - Latest posts
Viewing all articles
Browse latest Browse all 225712

FreePBX 13 Installation Problems

$
0
0

Okay, I'm installing on the latest Raspbian on a Raspberry Pi B.
(Note: All "http" prefixes removed since I'm not allowed to post links)
Generally following the instructions at wiki.freepbx.org/display/FOP/Installing+FreePBX+12+on+Ubuntu+Server+14.04+LTS

My notes on the commands I've run, and the steps I've done are below.
Note that my attempt to force an update of the FreePBX Framework module failed. (error at the end of the msg)

Based on wiki.freepbx.org/display/FOP/Installing+FreePBX+12+on+Ubuntu+Server+14.04+LTS

Install Raspbian via NOOBS
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server
sudo apt-get install mysql-client

    set password for root user

sudo passwd root

    switch to root user

sudo -i

apt-get install linux-headers-3.18.0-trunk-rpi
apt-get -f install
apt-get install -y openssh-server apache2 bison flex php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git subversion unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev libspandsp-dev libmyodbc

    reboot system

reboot
sudo -i

wget downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget downloads.asterisk.org/pub/telephony/asterisk/asterisk-12-current.tar.gz
git clone github.com/akheron/jansson.git
git clone github.com/asterisk/pjproject.git

cd /usr/src/pjproject
./configure --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr
make dep
make
make install

cd /usr/src/jansson
autoreconf -i
./configure
make
make install

cd /usr/src
tar xvfz asterisk-12-current.tar.gz
cd asterisk-*
./configure
contrib/scripts/get_mp3_source.sh
make menuselect

BEFORE running "make" to compile Asterisk, edit ./include/asterisk/autoconfig. and open it with vi or nano. It will be in the "include/asterisk/" folder.
Find the 2 lines:

/* Define to 1 if PJPROJECT has the PJSIP Transaction Group Lock Support feature. */
/* #undef HAVE_PJ_TRANSACTION_GRP_LOCK */


Change the second line to:

#define HAVE_PJ_TRANSACTION_GRP_LOCK 1

make
make install
make config
ldconfig

cd /var/lib/asterisk/sounds
wget downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz
tar xfz asterisk-extra-sounds-en-wav-current.tar.gz
rm -f asterisk-extra-sounds-en-wav-current.tar.gz

Wideband Audio download

wget downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz
tar xfz asterisk-extra-sounds-en-g722-current.tar.gz
rm -f asterisk-extra-sounds-en-g722-current.tar.gz

Seems to be missing a step. So try
cd ~

wget mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz
tar vxfz freepbx-12.0-latest.tgz
cd freepbx

useradd -m asterisk
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib/asterisk
rm -rf /var/www/html

sed -i 's/(^upload_max_filesize = ).*/\120M/' /etc/php5/apache2/php.ini
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sed -i 's/^(User\|Group).*/\1 asterisk/' /etc/apache2/apache2.conf
service apache2 restart

cat >> /etc/odbcinst.ini << EOF
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/arm-linux-gnueabihf/odbc/libmyodbc.so
Setup = /usr/lib/arm-linux-gnueabihf/odbc/libodbcmyS.so
FileUsage = 1

EOF

cat >> /etc/odbc.ini << EOF
[MySQL-asteriskcdrdb]
Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/run/mysqld/mysqld.sock
option=3

EOF

export ASTERISK_DB_PW=dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 - | cut -c2-18

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;"

./start_asterisk start
./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW}
amportal chown
amportal a ma installall
amportal a reload
amportal a ma refreshsignatures
amportal chown

Then needed to allow overrides in Apache configuration
nano /etc/apache2/apache2.conf
find the "/var/www" section, and change "AllowOveride None" to "AllowOverride All"

Now you can start using FreePBX.
Address.Of.FreePBX.Server/admin

Once FreePBX is up and running you will need to force a refresh of the "FreePBX Framework".
Well, this failed with a "Error(s) installing framework: Error
updating database. Command was: UPDATE modules SET version='12.0.76.2'
WHERE modulename = 'framework'; error was: DB Error: no database
selected "


Viewing all articles
Browse latest Browse all 225712

Trending Articles