How to Install GnuGk in CentOS 4

Preparing for Installation

I will assume that you already have the latest version of gcc and bison, and to install GnuGk 2.2.5 in your system you need to download these programs and install them prior to the installation of GnuGk.

  • PWLib-1.10.0 (release and debug version)
  • OpenH323-1.18.0
  • freeradius-1.1.4 or later

You can download PWLib and OpenH323 source in voxgratia.org.
http://www.voxgratia.org/releases/pwlib-v1_10_0-src-tar.gz
http://www.voxgratia.org/releases/openh323-v1_18_0-src-tar.gz
Freeradius is availabe in the download section of their website.
http://www.freeradius.org/download.html
For the GnuGk, you can download the latest source package in their website.
http://www.gnugk.org/h323download.html
After downloading all the source, extract it and place on the directory of your choice, here I choose my /root directory.

tar –zxvf pwlib-v1_10_0-src-tar.gz
tar –zxvf openh323-v1_18_0-src-tar.gz
tar –zxvf freeradius-1.2.4.tar.gz
tar –zxvf gnugk-2.2.5.tar.gz

Rename the extracted PWLib and OpenH323 source to a shorter name to add them easily on environment variables. In this installation, I used these names below:

pwlib
openh323

Setting up environment variables

To add PWLib and OpenH323 on the environment variable, just run these commands.

PWLIBDIR=/root/pwlib
export PWLIBDIR
OPENH323DIR=/root/openh323
export OPENH323DIR
LD_LIBRARY_PATH=$PWLIBDIR/lib:$OPENH323DIR/lib
export LD_LIBRARY_PATH

and add these lines in /etc/ld.so.conf

/root/pwlib/lib
/root/openh323/lib

and run...

ldconfig

Compiling and Installing

Were done adding PWLib and OpenH3233 in the environment variables, lets proceed to the installation.

Installing PWLib

cd /pwlib
./configure
then do the
make both command to compile release and debug version

Installing openh323

cd /root/openh323
./configure
make opt to compile release version

To install freeradius just follow the installation procedure in the documentation included in the package.

Installing GnuGk

cd /root/gnugk-2.2.5/
./configure –enable-radius –enable-mysql –enable-pgsql –with-large-fdset=4096
make both
make addpsswd

Copy gnugk and addpsswd in /usr/local/sbin directory.
Create /etc/gnugk directory and copy the gnugk.ini there.
Then create GnuGk log file in /var/log/ directory, basically it will be /var/log/gnugk.log.

Running the GnuGk

To start your newly installed GnuGk, type this command:

/usr/sbin/gnugk –c /etc/gnugk/gnugk.ini -o /var/log/gnugk.log –tttt

That’s it and you’re done installing GNU Gatekeeper.