Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > by-pkgid > 00bdf001b179ab7cab5a36ebc3f9271b > files > 159

gnugk-2.2.6-2mdv2008.0.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>OpenH323 Gatekeeper - 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">Compiling the Gatekeeper</A>
</H2>

<P>To build the gatekeeper you need at least PWLib 1.5.0 and OpenH323 1.12.0 or later.
The development version of the gatekeeper usually needs the
most recent OpenH323 version available.
These libraries are available at
<A HREF="http://sourceforge.net/projects/openh323">OpenH323 Download Page</A>.
See the instructions on
<A HREF="http://www.voxgratia.org/docs/faq.html">how to compile the OpenH323 code</A>.</P>
<P>Order of compiling:
<OL>
<LI>PWLib (release + debug version)</LI>
<LI>OpenH323</LI>
<LI>OpenH323 test application (not needed, just to make sure everything works so far)</LI>
<LI>The Gatekeeper</LI>
</OL>
</P>
<P>On Unix do a <CODE>configure</CODE> and <CODE>make debug</CODE> or <CODE>make opt</CODE>
in the gatekeeper directory to build debug or release version, respectively.
Use <CODE>make both</CODE> to build both versions.
Note you have to use GCC 3.3.x or later. The older version may not work.
Good practice is to do a <CODE>make debugdepend</CODE> or <CODE>make optdepend</CODE>
in the gatekeeper directory before starting actual compilation (make debug or
make opt) - these commands build appropriate dependency lists, so after
you will update your sources from CVS, all affected files will get recompiled.
Otherwise you can finish with the Gatekeeper partially compiled with the older
headers and partially with the updated headers - a very bad thing.<BR></P>
<P>On Windows just open and compile the provided solution (<CODE>gk.sln</CODE>) for
Microsoft Visual Studio .NET 2003 or the workspace (<CODE>gk.dsw</CODE>) for Microsoft
Visual Studio 6.0 SP6. Of course, you need to have PWLib
and OpenH323 already compiled and appropriate include/library paths set up.
If you want to get MySQL or PostgreSQL support, install/compile appropriate
client libraries and add HAS_MYSQL=1 and/or HAS_PGSQL=1 to preprocessor
macros of the gatekeeper project. You also need to tell the compiler
where to find include files/libraries and instruct the linker to link
with these client libraries.<BR></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 some features of the gatekeeper.
For example, if you do not need RADIUS just type: <CODE>configure --disable-radius</CODE>.<BR></P>
<P>The recommended PWLib/OpenH323 versions are these from the Pandora release
(1.7.5.2/1.14.4.2) or newer. Older versions are not supported anymore and are not
guaranteed to work with the gatekeeper.</P>
<P>To build the gatekeeper that is statically linked with system and OpenH323 libraries,
<CODE>make optnoshared</CODE> or <CODE>make debugnoshared</CODE> has to be used.</P>
<P>In order to use the gatekeeper under heavy load, enabling LARGE_FDSET feature
(ONLY FOR UNIX VERSION) 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. Note that the PWLib library starting from version 1.5.3 supports a similar feature too, so you can choose between
LARGE_FDSET GnuGk and PWLib implementation. GnuGk native implementation gives
better performance results. Maximum LARGE_FDSET value should be calculated 
based upon predicted maximum sockets usage. A rule of thumb may be:
<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 and other stuff
</PRE>
</CODE></BLOCKQUOTE>

So for 100 concurrent calls you don't need more than ca. 1024 sockets in the
LARGE_FDSET.</P>

<H2><A NAME="ss2.2">2.2</A> <A HREF="manual.html#toc2.2">The addpasswd Utility</A>
</H2>

<P>Status line access authentication and SimplePasswordAuth module require
encrypted passwords to be stored in the gatekeeper configuration file.
Also since 2.2.2 version, the gatekeeper supports encryption of all passwords
in the config. <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 [GkStatus::Auth] config section to enable status line interface 
authentication:
<BLOCKQUOTE><CODE>
<PRE>
$ addpasswd gnugk.ini GkStatus::Auth gkadmin secret
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Example 2: 'joe' user with 'secret' password has to be added to [Password]
config section to enable endpoint authentication:
<BLOCKQUOTE><CODE>
<PRE>
$ addpasswd gnugk.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 gnugk.ini RadAuth SharedSecret VerySecretPassword
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>IMPORTANT: <CODE>KeyFilled</CODE> variable defines a default initializer for password
encryption keys. It can be omitted in the config (it is defined to 0 then),
but if it is specified, each time it changes, encrypted passwords have to be
regenerated (encrypted again using the <CODE>addpasswd</CODE> utility).</P>
<H2><A NAME="ss2.3">2.3</A> <A HREF="manual.html#toc2.3">Installing the Gatekeeper</A>
</H2>

<P>There is no special installation procedure needed.
Just copy the executable to the directory you like
and create a config file for it.
There are several config examples in the <CODE>etc/</CODE> subdirectory
of source tree. See section 
<A HREF="manual-4.html#config">Configuration File</A>
for detailed explanations.</P>
<P>For example, in Linux x86 platform, the optimized executable <CODE>gnugk</CODE>
is produced in <CODE>obj_linux_x86_r/</CODE> subdirectory.
You may copy it to <CODE>/usr/sbin/</CODE>, create a config in
<CODE>/etc/gnugk.ini</CODE> and start it by
<BLOCKQUOTE><CODE>
<PRE>
$ /usr/sbin/gnugk -c /etc/gnugk.ini -o /var/log/gnugk.log -ttt
</PRE>
</CODE></BLOCKQUOTE>

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

<H2><A NAME="ss2.4">2.4</A> <A HREF="manual.html#toc2.4">Pre-Built Binaries</A>
</H2>

<P>If you do not wish to compile the gatekeeper from source,
there are several pre-built `packages' available from
<A HREF="http://sourceforge.net/project/showfiles.php?group_id=4797">SourceForge</A>.
Not all versions will be made available as binaries - check what is available.</P>
<P><B>Tar packages (.tgz or .tar.gz)</B></P>
<P>Download the tar file and enter the following command as <CODE>root</CODE>,
substitute in the name of the file you downloaded.
<BLOCKQUOTE><CODE>
<PRE>
$ tar xvzf gnugk-x.x.x.tar
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P><B>Debian packages (.deb)</B></P>
<P>Debian includes the gatekeeper as gnugk package.
You can install it by using the following command as <CODE>root</CODE>:
<BLOCKQUOTE><CODE>
<PRE>
$ apt-get install gnugk
</PRE>
</CODE></BLOCKQUOTE>
</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>