SARK V4.0.0 Raspi

From sailpbx
Revision as of 15:05, 23 March 2013 by Adminwiki (talk | contribs) (Step 3 - install sark)
Jump to: navigation, search

back to SARK Main Page

INTRODUCTION

SARK V4.0.0 can be run for test and evaluation purposes on the low-cost Raspberrypi ARM platform. This platform is NOT recommended for use in a production environment (we suggest you consider the SARK200 commercial ARM-based platform if you require a low-cost/low-power SIP PBX) but it's great for learning SARK in a low cost environment. You'll also be surprised at just how fast SARK4 runs on the little ARM processor.

Raspi Install

Installing your Raspberrypi is easy! Download and unzip a raspberry wheezy image from http://www.raspberrypi.org/downloads Just imagecopy (use dd under linux) the Raspberrypi "Raspbian" image onto a 4Gb (or larger) SD Card on your development box. Under Ubuntu this might look something like this (assuming the sdcard is at /dev/sdb)...


sudo dd bs=1M if=2013-02-09-wheezy-raspbian.img of=/dev/sdb

Now, insert the SDcard into your Raspi, power it up, and log in using ssh, either from a linux machine or using something like putty if you have a windows machine. You'll probably need to scratch your head and do a bit of detective work to figure out which IP address the little Raspi is running at. The default login is uid=pi pwd=raspberry. Now, follow the steps below to install a full function SARK image.

Step 1 - expand the image to fill the disk

run raspi-config to expand the partition to fill the SD Card

sudo raspi-config
reboot

Step 2 - install SARK prerequisites

log back into your raspi cli and install the pre-reqs


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install asterisk apache2 sqlite3 php5-sqlite php-pear \
xinetd tftpd libio-socket-multicast-perl libapache2-mod-php5 libdbi-perl \
libdbd-sqlite3-perl runit sox mysql-server asterisk-mysql php5-mysql \
nmap zip ntp ssmtp php-net-ipv4 libfile-readbackwards-perl \
shorewall tofrodos dahdi asterisk-dahdi 
  • specify the mysql root password when it asks
  • specify your country-code for Asterisk when it asks

Now, get a cup of tea; the above takes about 30 minutes to finish...

Step 3 - install sark

You'll need to get the lastest install packs from the sark download servers. Create a directory on your raspi; cd into it and download the software.

mkdir ~/software
cd ~/software
wget sailpbx.com/sail/sail-4.0-testing/raspi/sailhpe_4.0.0-current
wget sailpbx.com/sail/sail-4.0-testing/debs/sail_4.0.0-current

You can now install the files you've downloaded. Their release numbers may well be different from the example below so you'll need to list, copy and paste the actual names of the two files into the command.

dpkg -i sailhpe_4.0.0-32_armhf.deb sail_4.0.0-54_all.deb

Step 4 - set up the cdr database

mysql -u root --password={whatever-you-picked-when-it-installed} < /opt/sark/stat/asterisk-stat-v2/cdr-mysql-setup.sql

Step 5 - have a play and make a few calls

You can browse to SARK at the IP address of the Raspi. It's a full V4 install so it will do everything big-sark will do. The only thing missing on this initial release is a timing source so you can't use the Asterisk conference facility.

  • username - admin
  • password - sarkadmin

YOu can find more information on V4 in this wiki.