spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / jabber / chap3 / 2 current pageTo page 2To page 3
[next]

Programming Jabber

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

Starting and Stopping the Jabber Server

[The following is the conclusion of our series of excerpts from chapter 3 of the O'Reilly title, Programming Jabber.]

At this stage, we have a Jabber server with enough basic configuration to be able to start it up and have it do something useful (like accept client connections). If you're curious about the rest of the configuration you encountered while editing the jabber.xml file, you can jump to Chapter 4. Otherwise, let's start it up!

Starting the Server

The basic invocation looks like this:

yak:~/jabber-1.4.1$ ./jabberd/jabberd

but if you haven't bothered to change localhost anywhere in the configuration (as described earlier), you can use the -h switch to specify the hostname:

yak:~/jabber-1.4.1$ ./jabberd/jabberd -h yak

As it stands, there's a directive in the standard jabber.xml configuration file that specifies that any server error messages are to be written out to STDERR:

<log id='elogger'>
  <host/>
  <logtype/>
  <format>%d: [%t] (%h): %s</format>
  <file>error.log</file>
  <stderr/>
</log>

So either comment the directive out:

<!--
  <stderr/>
-->

Or redirect STDERR to /dev/null:

yak:~/jabber-1.4.1$ ./jabberd/jabberd -h yak 2>/dev/null

You won't lose the error messages -- as you can see they're also written to the error.log file.

Assuming you wish to free up the terminal session after starting the server, you can send it to the background:

yak:~/jabber-1.4.1$ ./jabberd/jabberd -h yak 2>/dev/null &

Connecting a Client

Once the server is started, you're ready to start up a client and make a connection. The thing to remember at this point, when specifying which server to connect to, is to use the same hostname as you specified in the <host/> part of the configuration, described earlier in "Configuring the Jabber Server."

NOTE: If your client supports the <alias/> mechanism, described in the section "Customer Configuration" in Chapter 4, this may not be necessary.

home / programming / jabber / chap3 / 2 current pageTo page 2To page 3
[next]

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business

Created: January 22, 2002
Revised: January 22, 2002

URL: http://webreference.com/programming/jabber/chap3/2/