Using Mono To Set Up A Shockvoice Server

It is a step-by-step instructions on how to install Shockvoice on a Linux machine. Shockvoice is a voice-over-IP communication tool. This tool is slightly different in its characteristics. It is simply a code in C # and, therefore, works on almost any platform of interest, whether Windows, Unix, Macintosh or Solaris. The customer will only be available for Windows at first.

First you need the latest version. NET interpreter for


If your system is not listed you can download a complete binary package
which can be found here:


In our case we will install Mono by using the packaged installer from
this source:

wget
http://ftp.novell.com/pub/mono/archive/1.9.1/linux-installer/2/mono-1.9.1_2-installer.bin

Make it executable:

chmod +x mono-1.9.1_2-installer.bin

... and run it:

./mono-1.9.1_2-installer.bin

Follow the instructions on the screen. In our case we will install the
binary to /opt. Once
Mono is installed we need to get the latest server version of
Shockvoice. Download the latest version from the Shockvoice
downloadserver:



In our case we will download the Linux Server_v0.8.0pre2

Create the directory where you want to install Shockvoice.

mkdir -p /usr/share/shockvoice

Download the package:

wget
ftp://ftp.shockvoice.org/shockvoice/0.8.x/svserver-0.8.0pre2-linux.tar.gz

Unpack the package into the newly created directory:

tar -C /usr/share/shockvoice -xvzf
svserver-0.8.0pre2-linux.tar.gz

Before we will run the install.sh script, we have to choose our database type.
In this example
we choose MySQL as our favorite database. We have to do
some stuff before that.
If you want to use Sqlite as your favorite database you can have to use the
shockvoice.s3db file as
your database. Now set up the MySQL part.

Create the database:

mysql -uroot -p create shockvoice

Now import the tables to the database.

mysql -uroot -p shockvoice <
/usr/share/shockvoice.mysql.sql

Now we need to create a database user (we will name him svuser) and
grant him permissions to use the shockvoice database.

mysql -uroot -p

Enter Password:


GRANT USAGE ON shockvoice.* TO
svuser@localhost
IDENTIFIED BY '<yourpassword>';


GRANT ALL ON shockvoice.* TO
svuser@localhost IDENTIFIED
BY "<yourpassword>";


FLUSH PRIVILEGES;

Change to the directory and start the install.sh
script.

cd /usr/share/shockvoice
&& ./install.sh

Follow the instructions on the screen.


This script will create and configure the service_start, service_stop
and the config.xml file. It will try to locate the necessary files from your Mono installation. Please make sure you have mono installed before running this script.

Continue? (y/n)
y

Do you have unpacked Shockvoice in /usr/share/shockvoice? (y/n)
y

Do you want to create the service_start and service_stop file?
(recommend) (y/n)
y

searching for mono...

Found mono binary in /opt/mono-1.9/bin/mono .. good

searching for mono-service.exe...

Found mono-service.exe binary in
/opt/mono-1.9/lib/mono/gac/mono-service/2.0.0.0__0738eb9f132ed756/mono-service.exe
.. good

Creating startscript

Creating stopscript

Do you want to create the config.xml file? (y/n)
y

Creating config.xml

Please enter type of database you want to use. (e.g. sqlite, mysql or
postgres)

mysql


Please enter server which stores the database Shockvoice. (e.g.
shockvoice.s3db for sqlite or localhost for mysql)

localhost


Please enter name of the database. (leave empty for sqlite)

shockvoice


Please enter username who connects to the database. (leave empty for
sqlite)

svuser


Please enter password for database user. (leave empty for sqlite)

<yourpassword>


Database type: mysql

Database server: localhost

Database name: shockvoice

Database user: svuser

Database password: <yourpassword>

Is this Correct? (y/n)
y

Remember to setup the MySql database and User!

Configfile created!

Note: If you get an error like '==:
unexpected operator' try changing the first line of the install.sh
script to


#!/bin/bash
The next thing we have
to do is to copy the libMonoPosixHelper.so
and libsvcodec.so to a
location where Mono will find them. e.g. /usr/lib:

cp libMonoPosixHelper.so libsvcodec.so
/usr/lib

That's it. Now start the server with:

./service_start

DiggIt!Add to del.icio.usAdd to Technorati Faves

0 comments: