Project DiaStar Server - Download, Build and Install V2.4
From ProjectDiaStar
Contents
|
Introduction
This guide covers manually installing a DiaStar™ Server.
NOTE -
The recommended and simplest way to install a DiaStar Server, is by installing it from the ISO CD image which is covered here.
If a manual installation is necessary the following guide will step you through this process.
Before starting, here are some guidelines:
- Virtual systems - VMware and VBOX - have been successfully used with Diastar
- 64-bit CentOS can be used with DiaStar. However, the Diastar Media Engine will run in 32-bit compatibility mode
- At least 1 GB of memory needs to be installed for a 4 port trial license
- The DiaStar Media Engine will not operate in a system with more than 4GB of memory and Physical Address Extensions (PAE) enabled for a kernel. CentOS may chose to install a PAE kernel if the system memory is greater than 2GB. If, after the installation, the kernel has a PAE appended to its name (uname –a) you must install non-PAE kernel and kernel-devel packages and reboot.
Here is an overview of the installation procedure:
* Download and install the CentOS 5.5 Linux operating system * Check out the DiaStar source code from our Subversion repository * If a Dialogic DNI board is being used, install it in the system * Install, configure and license the DiaStar Media Engine * Make and install the DiaStar Server
Components Needed
As with many open source projects, there are a number of other pieces of software needed for the DiaStar server. Here are all of the pieces you will need to put together a fully functional DiaStar server for use with a telephony client:
1. The CentOS Linux operating system 2. DiaStar Server - the PSTN gateway/IP media server 3. chan_woomera - the Woomera channel driver for the Asterisk PBX. This is part of the DiaStar code set 4. DiaStar Media Engine - the drivers and library code needed for the PSTN boards, IP connection and media used with the DiaStar Server 5. A telephony client such as Asterisk
Installing and Building
Install the components in the order below, as there are dependencies among the different projects.
Installing CentOS 5.5
The latest version of CentOS supported by DiaStar 2.4 is CentOS 5.5. Instructions for a minimal install are given here. An X Window GUI (Gnome or KDE) may be used if desired, but it is not necessary.
- Default partition layout works fine
- Configure eth0 on for IPv4 support on boot. Using a static IP address is recommended
- Select Server support
- Select (check Customize now) these additional packages under Development:
- Development Libraries
- Development Tools
- X Software Development
- Legacy Software Development
Post-Installation Changes to CentOS Needed for DiaStar
The following commands should be issued as root to finish CentOS configuration for DiaStar:
- System security is set as follows:
- run "system-config-securitylevel" or use the GUI-based tool found under System -> Administration -> Security Level and Firewall:
- Disable security
- Or Enable security -> Customize, -> Allow incoming on the following
- SSH
- WWW (HTTP)
- Other ports: 42420:tcp,49152-51152:udp,57344-57840:udp,5060:udp,5050:tcp,3565:sctp,3565:tcp
- Always disable SE Linux
- run "system-config-securitylevel" or use the GUI-based tool found under System -> Administration -> Security Level and Firewall:
- Remove ipv6 support
# chkconfig --del ip6tables
- Create an admin account
# useradd -c 'System administrator' -m -p 'admin' admin # echo 'export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin' >> /home/admin/.bash_profile # echo 'admin ALL = ALL' >> /etc/sudoers
- Create the DiaStar user
# useradd -c 'DiaStar user account' diastar
- Start network time service
# chkconfig --add ntpd
- Make sure that there is a mapping in
/etc/hostsbetween the system name and a valid IP address for the system. This is needed for the DiaStar license manager. Without this mapping, DiaStar licensing will fail. Two examples of/etc/hostsfor a system named "diastar":
127.0.0.1 localhost.localdomain localhost 192.168.1.177 diastar ::1 localhost6.localdomain6 localhost6
or
127.0.0.1 diastar localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
- An older version of the GNU C++ library is needed for DiaStar Media Engine licensing:
# yum install compat-libstdc++-33-3.2.3-61
Without this library, DiaStar licensing will fail.
- The Linux per-process file descriptor limit should be increased from the default 1K to 8K. Add
ulimit -n 8192to the .bashrc or .bash_profile file for root
Installing the Dialogic DNI Board
If the system will use a Dialogic® DNI board, it should now be installed in a full-length PCI or PCI express slot. If more than one board is being used in a system, make sure that all boards are connected together using a CTBus cable across the top end of the cards opposite the T1/E1 jacks. Problems with network clocking or audio may occur if the cable is not installed.
Checking Out and Installing the DiaStar Media Engine
The DiaStar™ Media Engine uses the same installation and configuration scripts as HMP 4.1LIN. In the event that the instructions in this Wiki are not sufficient, additional details can be found in the HMP documentation. The process must be done as the root user.
Check out this code for the latest released version (V2.4):
# svn checkout svn://svn.projectdiastar.org/diastar/branches/RB-2.4/extras
Or, the URL below will checkout the latest development trunk:
# svn checkout svn://svn.projectdiastar.org/diastar/trunk/extras
Note that the extras directory containing the DiaStar Media Engine (200+ MB) will take a while to download. Untar it and install it:
# tar xvfz lnx4.1.1_XX.tgz # ./install.sh
Options to choose:
- With DNI board - Install DNI Boards and Media Software
- SIP/IP only - Install Media Software only
- Install the Software Development Kit
- Configure CLI Agent to use Telnet Port 23
Once the installation is complete, some further configuration is needed. First, the license file (see Project DiaStar Server - Licenses) tied to the DNI board's serial number or the system's MAC address must be copied to the system. "sftp" is the most convenient way to do this. Ensure that the DiaStar environment variables are set by logging out and logging in. Next, connect to the DiaStar™ Media Engine Command Line Interpreter:
# dlstart
# telnet localhost
(user: root, password: public)
Once in the CLI, apply the license:
CLI> conf license directory <license_directory_path> CLI> conf license activate <license_file_name>
CLI> conf system ipmedia start-mode auto
Further configuration depends on the type of system being built. Select the type of system you want to configure:
- Project DiaStar Server - ISDN Configuration
- Project DiaStar Server - SS7/SIGTRAN Configuration
- Project DiaStar Server - SIP and Multimedia Configuration
If the system used for the DiaStar Server will be used used for Asterisk, make sure that the Asterisk dahdi_dummy driver is not installed. The DiaStar™ Media Engine also uses the system real time clock, but at a different clock speed. Remove it with "modprobe -r dahdi_dummy". If this is not done, the DiaStar™ Media Engine services will fail to start
Post DiaStar Media Engine Installation Changes
- Remove this unused Media Engine service:
rm -f /etc/init.d/tvl2_startup
- There are several low-level parameter adjustments that will help to lower the latency involved in the RTP streaming done in the DiaStar™ Media Engine. They are contained in the file Hmp.Uconfig, found in the
/extrasdirectory. Here is how to activate the adjustments:
# cp Hmp.Uconfig /usr/dialogic/data
# dlstop
# rm /usr/dialogic/data/<license_file_name>.fcd
(This name corresponds to <license_file_name>.lic used in "CLI> conf license activate" above)
# dlstart
Checking Out, Building and Installing the DiaStar Server
Now that CentOS installation is complete, the DiaStar Server can be built and installed.
The Image Magick development package needs to be added for compiling the DiaStar server. A specific version (6.2.2-8) is needed which is not now (11/2010) available as a yum install. The Image Magick RPM packages and their dependencies are kept on the Project DiaStar SVN server and may be downloaded with:
# svn checkout svn://svn.projectdiastar.org/diastar/trunk/install/image_magick_rpms
A script, install_rpms.sh accompanies the RPMs and will attempt to install them in the right order. Note that, depending on the base system, other packages may be needed. The packages are likely in the rpm directory, and just need to be added in the correct order. If an older version of Image Magick is on the system, it may need to be removed.
The Live 555 package, needed for RTSP streaming, must be added for compiling the DiaStar server. It is distributed as a "tarball" and is kept on the Project DiaStar SVN server. Downloaded it with:
# svn checkout svn://svn.projectdiastar.org/diastar/trunk/install/live555
Since the package does not have a make install option, a script is provided to control the make and installation process. Execute it to build and install Live 555:
# tar xvfz live.2010.12.05.tar.gz # chmod u+x install-live555.sh # cd live # ../install-live555.sh
The DiaStar server can now be built. Check out this code for the latest released version (V2.4):
# svn checkout svn://svn.projectdiastar.org/diastar/branches/RB-2.4/server
Or, the URL below will checkout the latest development trunk:
# svn checkout svn://svn.projectdiastar.org/diastar/trunk/server
The DiaStar server can now be built. In the server directory, execute the following commands:
# ./autogen.sh # ./configure # make install
The executable will be built and installed in /usr/local/bin.
Two directory structures for Image Magick must also be put in place:
# mkdir /etc/diastar # cd /etc/distar # svn checkout svn://svn.projectdiastar.org/diastar/branches/RB-2.4/install/imagemaker.d
or
# svn checkout svn://svn.projectdiastar.org/diastar/trunk/install/imagemaker.d
# mkdir /var/lib/diastar # mkdir /var/lib/diastar/imagemaker # cd /var/lib/diastar/imagemaker # svn checkout svn://svn.projectdiastar.org/diastar/branches/RB-2.4/install/images # svn checkout svn://svn.projectdiastar.org/diastar/branches/RB-2.4/install/style
or
# svn checkout svn://svn.projectdiastar.org/diastar/trunk/install/images # svn checkout svn://svn.projectdiastar.org/diastar/trunk/install/style
The DiaStar Server is now ready to run. However, it is not yet set up as a system service and must be run from a command line as a console application. Command line options are found here.
To install the DiaStar Server as a system service:
# svn export svn://svn.projectdiastar.org/diastar/trunk/install/diastar.redhat-rc
or
# svn export svn://svn.projectdiastar.org/diastar/branches/RB-2.4/install/diastar.redhat-rc
# mv diastar.redhat-rc /etc/init.d/diastar # mkdir /var/log/diastar
You may now configure the server for use. Full instructions are found here.
No demos are installed with this manual procedure. See DiaStar Demos for information on downloading and installing DiaStar multimedia demos.
Troubleshooting
Troubleshooting information is available here.
