Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > aa0a0c745bf74bd0c70c4944117a40d3 > files > 165

gnugk-2.3.1-1mdv2010.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>The GNU Gatekeeper: Compiling and Installing</TITLE>
 <LINK HREF="manual-3.html" REL=next>
 <LINK HREF="manual-1.html" REL=previous>
 <LINK HREF="manual.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="manual-3.html">Next</A>
<A HREF="manual-1.html">Previous</A>
<A HREF="manual.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2.</A> <A HREF="manual.html#toc2">Compiling and Installing</A></H2>


<H2><A NAME="ss2.1">2.1</A> <A HREF="manual.html#toc2.1">Pre-requisites for Compiling</A>
</H2>

<P>To build the gatekeeper you need PWLib and OpenH323 or PTLib and H323Plus.
Please see
<A HREF="http://www.gnugk.org/compiling-gnugk.html">http://www.gnugk.org/compiling-gnugk.html</A>
for up-to-date information on required library versions.</P>
<P><B>NOTE:</B> In order to use any H.460 features, you must build with H323Plus.</P>
<P>To successfully compile the GNU Gatekeeper you must first compile the pre-requisites in this order:</P>
<P>
<OL>
<LI>PWLib or PTLib</LI>
<LI>OpenH323 or H323Plus</LI>
</OL>
</P>
<P>On Unix, run <CODE>configure</CODE> and <CODE>make debug</CODE> or <CODE>make optnoshared</CODE>
in the gatekeeper directory to build debug or release version, respectively.</P>
<P><B>NOTE:</B>  You must use either <CODE>make debug</CODE> or <CODE>make optnoshared</CODE>
throughout the compile process.  For example, if a library is compiled with <CODE>make
optnoshared</CODE> then everything must be compiled the same way.</P>


<H2><A NAME="ss2.2">2.2</A> <A HREF="manual.html#toc2.2">Installing on Unix</A>
</H2>

<P>The first step is to get an executable: You can either download an executable for your flavour of Unix from
<A HREF="http://www.gnugk.org/h323download.html">gnugk.org</A>, use the executable your distribution
provides or compile the GNU Gatekeeper yourself. For simple installations or to try the features of the gatekeeper,
using pre-built executables shouldn't pose any issues, but for professional installations it is always recommended
that you self-compile GnuGk.</P>

<H3>Installing a binary of GnuGk</H3>

<P>Copy the executable to the directory you like and create a config file.
There are several config examples and auto startup scripts in the <CODE>etc/</CODE> subdirectory
of the source tree. See section 
<A HREF="manual-4.html#config">Configuration File</A>
for detailed explanations of the parameters.</P>
<P>For example you may copy GnuGk to <CODE>/usr/sbin/</CODE>, create a config in
<CODE>/etc/gatekeeper.ini</CODE> and start it by
<BLOCKQUOTE><CODE>
<PRE>
/usr/sbin/gnugk -c /etc/gatekeeper.ini -o /var/log/gnugk.log -ttt
</PRE>
</CODE></BLOCKQUOTE>

See section 
<A HREF="manual-4.html#commandline">Command Line Options</A> for details on the command line options.</P>

<H3>Compiling the Gatekeeper</H3>

<P><B>NOTE:</B>  you must use GCC 3.3.x or later.</P>
<P>You are strongly encouraged to execute <CODE>make debugdepend</CODE> or <CODE>make optdepend</CODE>
in the gatekeeper directory before starting actual compilation - these commands
build appropriate dependency lists, so any CVS updates to the source code will force
all affected files to get recompiled and will prevent the resulting binary from being compiled
with a mix of old and updated headers.</P>
<P>Type <CODE>configure --help</CODE> to see a detailed list of all compile-time
options. You can use them to enable or disable features of the gatekeeper.
For example, if you do not need RADIUS just type: <CODE>configure --disable-radius</CODE>.<BR></P>
<P>In order to use the gatekeeper under heavy load, enabling the LARGE_FDSET feature
(only available on Unix) is recommended (configure --with-large-fdset=4096). Some systems
also need to use ulimit in order to allow more than 1024 sockets to be allocated for 
a single process.
Maximum LARGE_FDSET value for voice calls should be calculated 
based upon predicted maximum sockets usage using the following formula:
<BLOCKQUOTE><CODE>
<PRE>
MAX_NUMBER_OF_CONCURRENT_CALLS * 10 * 120%

Where:
10 = 2 sockets for Q.931 + 2 sockets for H.245 + 6 sockets for RTP
</PRE>
</CODE></BLOCKQUOTE>

So for 100 concurrent voice calls you don't need more than 1024 sockets in the
LARGE_FDSET.</P>
<P>As a final step, you must either use <CODE>make debug</CODE> or <CODE>make optnoshared</CODE>, depending
on how you compiled the libraries.</P>

<H2><A NAME="ss2.3">2.3</A> <A HREF="manual.html#toc2.3">Installing on Windows</A>
</H2>

<P>The first step is to obtain the executable program; you can either download it from
<A HREF="http://www.gnugk.org/h323download.html">gnugk.org</A>
or compile the GNU Gatekeeper yourself.</P>
<P>There are two versions of the gatekeeper available: A regular program and a service.</P>

<H3>Installing as a Program</H3>

<P>These are the steps for a manual installation:</P>
<P>Copy <CODE>gnugk.exe</CODE> to the folder you like and create a config file.
There are several config examples in the <CODE>etc/</CODE> subdirectory of the download archive.
See section 
<A HREF="manual-4.html#config">Configuration File</A>
for detailed explanations.</P>
<P>Then start the gatekeeper manually from the command line ('cmd.exe') or create a batch file to start it.</P>
<P>For example you may copy GnuGk to <CODE>C:\GnuGk\</CODE>, create a config in
<CODE>C:\GnuGk\gatekeeper.ini</CODE> and start it as
<BLOCKQUOTE><CODE>
<PRE>
C:\GnuGk\gnugk.exe -c C:\GnuGk\gatekeeper.ini -o C:\GnuGk\gnugk.log -ttt
</PRE>
</CODE></BLOCKQUOTE>

See section 
<A HREF="manual-4.html#commandline">Command Line Options</A> for details on the command line options.</P>
<P>Remember to add GnuGk as an exception for the Windows Firewall so it can communicate freely with the network.</P>

<H3>Installing as a Service</H3>

<P>These are the steps for a manual installation; there may be a binary version of the Gatekeeper-as-service which includes a GUI
installer program available in the download location.</P>
<P>First, ensure that you have the service version of GnuGk before you proceed.</P>
<P>Copy <CODE>gnugk.exe</CODE> to the folder you like and create a config file named <CODE>gatekeeper.ini</CODE> in the same folder.
See section 
<A HREF="manual-4.html#config">Configuration File</A>
for detailed explanations. When you run GnuGk as a service, no command line options are available.</P>
<P>To register the service, run the following command from the command line ('cmd.exe'):</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
gnugk.exe install notray
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Your service is now installed and will be started on the next reboot, or you
may start it manually using the Windows Control Panel -> Services function.  On Windows Vista and
Windows 7, you may have to disable UAC during the service installation.</P>
<P>When running GnuGk as a service, it will always look for a config file named <CODE>gatekeeper.ini</CODE>
in the current directory. Any changes to the trace level and location of the trace file must be made in the 
config file rather than the command line.</P>
<P>Remember to add GnuGk as an exception for the Windows Firewall so it can communicate freely with the network.</P>

<H3>Compiling the Gatekeeper</H3>

<P>Once you have compiled the pre-requisites as specified at the beginning of
this section and have the appropriate include/library paths configured, open and
compile one of the provided solution files (<CODE>.sln</CODE>) for your version of
Microsoft Visual Studio.  If you need MySQL or PostgreSQL support,
install/compile appropriate client libraries before you compile GnuGk.</P>

<H2><A NAME="ss2.4">2.4</A> <A HREF="manual.html#toc2.4">The addpasswd utility</A>
</H2>

<P>Status port authentication and many other authentication modules, like SimplePasswordAuth, require
encrypted passwords to be stored in the gatekeeper configuration file.
The gatekeeper also supports encryption of all passwords
in the config. The <CODE>addpasswd</CODE> utility is required to generate and store 
these encrypted passwords. This utility is included with the gatekeeper 
and can be compiled using:
<BLOCKQUOTE><CODE>
<PRE>
$ make addpasswd
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>The usage is as follows:
<BLOCKQUOTE><CODE>
<PRE>
$ addpasswd CONFIG SECTION KEYNAME PASSWORD
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Example 1: 'gkadmin' user with 'secret' password has to be added 
to the [GkStatus::Auth] config section to enable authentication on the status port:
<BLOCKQUOTE><CODE>
<PRE>
$ addpasswd gatekeeper.ini GkStatus::Auth gkadmin secret
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Example 2: 'joe' user with 'secret' password has to be added to the [Password]
config section to enable endpoint authentication:
<BLOCKQUOTE><CODE>
<PRE>
$ addpasswd gatekeeper.ini Password joe secret
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Example 3: An encrypted shared secret is added to a RadAuth config section:
<BLOCKQUOTE><CODE>
<PRE>
$ addpasswd gatekeeper.ini RadAuth SharedSecret VerySecretPassword
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>IMPORTANT: The <CODE>KeyFilled</CODE> variable defines a default initializer for password
encryption keys. It can be omitted in the config (and therefore defaults to 0),
but if it is specified, each time it changes, encrypted passwords have to be
regenerated (encrypted again using the <CODE>addpasswd</CODE> utility).</P>
<HR>
<A HREF="manual-3.html">Next</A>
<A HREF="manual-1.html">Previous</A>
<A HREF="manual.html#toc2">Contents</A>
</BODY>
</HTML>