Advertisment

IM for Your Local Network

author-image
PCQ Bureau
New Update

Next to e-mail, IM (Instant Messaging) is the most popular medium of communication across computer networks. Users tend to use Internet instant messengers even to communicate with people in the same office, sending bandwidth usage shooting up. You can avoid this by setting up an IM service for your local corporate network by using Jabber. It is an instant messenger server that runs on Linux and supports both Windows and Linux-based IM clients. 

Advertisment

Jabber is a protocol based on XML to exchange messages. These messages can be instant messages or system messages (such as user online, user offline and registration). All such messages are converted into XML format. Applications that use the Jabber protocol for IM are called Jabber-based messengers. We now get straight into setting up a Jabber-based system on the network. 

We assume that you have installed PCQLinux 2004 on a machine intended to be the Jabber server. Make sure you install the development tools and libraries on this machine, since we need to compile the Jabber server from the source code. Jabber also needs MySQL database and its libraries to be installed. After the PCQLinux installation, start the MySQL database server by issuing the command 'service mysqld start'. Next, set up an administrator password for MySQL as:

mysqladmin -u root password pcq123



Substitute pcq123 with your preferred password. 

Advertisment

Install Jabber server

Copy the file named jabberd-2.0s2.tar.gz found in the Linux section on this month's PCQ Essential CD to /opt directory. Extract the archive as tar

-zxvf jabberd-2.0s2.tar.gz.

This will produce a directory named jabberd-2.0s2 under /opt. Change to this directory and issue the following commands.

Advertisment

./configure -prefix=/usr -sysconfdir=/etc

make



make install

Next add a Linux user account named jabber as:

Advertisment

useradd jabber



passwd jabber

Enter any preferred password when prompted. Next, change to the directory /opt/jabberd-2.0s2/tools and issue the following.

mysql -u root -p < db-setup.mysql

Advertisment

When prompted supply the password that you had set above for the MySQL administrator. Next issue the following.

mysql -u root -p

After supplying the password you will be reeted by a mysql> prompt. Issue the following at this prompt.

Advertisment

grant all on jabberd2.* to jabberd2@localhost identified by 'jabber123';



quit

Substitute jabber123 with your preferred password. Note this password as we have to specify this password in the Jabber's configuration files.

Jabber up



Suppose your domain is pcqlabs.net. Open the file named c2s.xml file found in /etc/jabberd directory in a text editor and change the line localhost found under the section “local network configuration” to:

Advertisment

pcqlabs.net

Substitute pcqlabs.net with the domain name in your case. Add pcqlabs.net corresponding to 127.0.0.1 IP address in the file named hosts found in /etc directory. Scroll to the section 'MySQL driver configuration'. Change the line

secret to jabber123<



/pass>. 

Direct

Hit!
Applies to: Network and system administrators
USP: Jabber server runs on Linux, but supports both Windows and Linux-based IM clients
Links:

www.jabber.orgwww.jabber.org/software/clients.php
Code on CD: system/cdrom/software/jabber

Substitute jabber123 with the password that you had specified in the grant statement in the above section. Save the file. 



Next, open the file named sm.xml found in the same directory in the text editor. Change the line 

localhost 

found in the first few lines of the file to

pcqlabs.net

Scroll down to the section 'MySQL driver configuration'. Change the line 

secret to jabber123

Scroll to the section 'User option' and change (or uncomment) the line:

-> to:

Save the file. To launch Jabber change to the directory /usr/bin and issue:

./jabberd

Set up Jabber client



Assuming that the users on your network are on Windows machines (a typical scenario), we explain setting up a Windows-based Jabber client called Yabber. First, if you are not running a DNS server on your network that can resolve the domain (pcqlabs.net in our case) to the Jabber server machine, then add the IP address and the name to the file named hosts found in system32\drivers\etc subdirectory of the main Windows directory (windows or

winnt).

You can find Yabber on this month's PCQ Essential CD in the Linux section. Double click to start installing it. When the installation finishes, Yabber will pop a New Account Wizard. Select the option I want to create a new Jabber account. Click Next. For Jabber server, type in pcqlabs.net. On the Account Setup screen, fill in any preferred user ID, nick name, email and password. Click on Next. Yabber should be able to connect the jabber server running on Linux and show a status as available. Let users on your network register with the Yabber server by repeating the above process. To add users in the contact list click on Find/Add Contact>Add New Contact. Enter the User ID of the person whom you want to add to the list.

The User ID must be entered in the format @ (for example, shekhar@pcqlabs. net). For 'Add To Group', type in any group, say friends or colleagues. Click on Add.

Once the network users have added each other, Yabber provides an intuitive interface to exchange instant messages. Numerous other Jabber clients are available for Windows and Linux. Browse www. jabber.org/software/clients.php to download your preferred one.

Shekhar Govindarajan



IT4Enpterprise

Advertisment