Mobicents Installation
Mobicents Installation
Mobicents Installation
Note that for this tutorial the Windows version of Mobicents was used and the working
directory was simply called “Mobicents”. This tutorial is mostly copy-pasted from the
“Mobicents User Guide”, but enhanced to parts, where more explanation is needed.
Requirements
Installing
Mobicents is written in Java; therefore, before running any Mobicents server, you must have a
working Java Development Kit (JDK) installed on your system. In addition, the JDK you are
using to run Mobicents must be version 1.5 (a.k.a. “Java 5”) or higher.
You can download the Sun JDK 5.0 (Java 2 Development Kit) from Sun's website
“http://java.sun.com/javase/downloads/index_jdk5.jsp”. After the download is finished,
simply double-click the downloaded self-extracting installer and follow the instructions to
install the JDK.
Configuring
In order to make the JDK work correctly, you have to set the “JAVA_HOME” environment
variable and you have to put the binary directory into your “PATH” variable. You can set
these variables by going to your “Control Panel” and click on “System”. Under the
“Advanced” tab, you will find the “Environmental Variables”.
1
It is assumed that your JDK installation is located under “C:\Program Files\Java\jdk1.5.0_16”.
Your variables should look this:
Finally, to make sure that you are using the correct JDK or Java version (1.5 or higher), and
that the java executable is in your PATH, run the “java –version” command in the terminal:
If you see the same as displayed in the screenshot, your JDK is successfully installed.
Ant
In order to deploy various examples and services in Mobicents, you need to install and
configure Apache Ant. You can download it at “http://ant.apache.org/bindownload.cgi”.
Just extract the content of the ZIP file into a directory of your choice. For this tutorial it is
assumed that you placed the files into the directory “C:\Program Files\Apache Software
Foundation\Ant”.
2
Before you can run Ant there is some additional set up you will need to do. Therefore add the
“C:\Program Files\Apache Software Foundation\Ant\bin” directory to your “PATH”. And set
the “ANT_HOME” environment variable to the directory where you installed Ant (here it
would be “C:\Program Files\Apache Software Foundation\Ant”, see “Figure 1: Environmental
Variables”).
Now you can check the basic installation by opening a new shell and typing “ant” and “ant -
version”. You should get a message like this:
If you see the message above, Ant is successfully installed and configured.
Maven
Mobicents provides the possibility to build all the examples and services from the source
code. In order to be able to do that, you need to install and configure Maven.
Add the “M2_HOME” environment variable with the value “C:\Program Files\Apache
Software Foundation\Maven”. Be sure to omit any quotation marks around the path even if it
contains spaces. In the same dialog, add the “M2” environment variable in the user variables
with the value “C:\Program Files\Apache Software Foundation\Maven\bin”. Then add the
“PATH” variable value “C:\Program Files\Apache Software Foundation\Maven\bin” to make
Maven available in the command line (see “Figure 1: Environmental Variables”).
Open a new command prompt and run “mvn –version” to verify that it is correctly installed.
3
Figure 4: Running Maven in the terminal
Installing Mobicents
The Mobicents binary distribution is comprised of – and comes bundled with – all of the
following components:
Mobicents can be installed by downloading the ready-to-go binary distribution, or, alternately,
the source code can be obtained using the Subversion version control system (VCS) and then
Mobicents can be built from source. Installing the binary distribution is recommended for
most users, and obtaining and building the source code distribution is recommended for those
who want access to the latest revisions and capabilities.
Just extract the downloaded ZIP file into a directory of your choice. It is assumed that your
working directory is called “Mobicents”.
Once installed, make sure that the “JBOSS_HOME” environment variable is set and is
pointing to the Mobicents JAIN SLEE Server directory, i.e. “Mobicents\jboss-4.X.Y.GA”
(see “Figure 1: Environmental Variables”).
4
Starting Mobicents
Now you can run the Mobicents JAIN SLEE Server by executing the one of the startup scripts
in the “Mobicents\jboss-4.X.Y.GA\bin” directory, or by double-clicking the “run.bat”
executable batch file in that same directory. However, we suggest always starting the JAIN
SLEE Server using the terminal, because you are then able to read – and act upon – any
startup messages, and possibly debug any problems that might arise. In the terminal, you will
be able to tell that the JAIN SLEE Server started successfully if the last line of output is
similar to the following (ending with “Started in e.g. 25s:527ms”):
Stopping Mobicents
Assuming that you started the JAIN SLEE Server as a foreground process in the terminal, the
easiest way to stop it is by pressing the “Ctrl + C” key combination in the same terminal in
which you started it.
5
Resources