Most of us have some kind of internet connection these days, so it's easy to connect to externally provided, free web-based chat servers and catch up on the gos'.
What with all these services being free, not to mention having thousands of subscribers, there's not a whole lot of reasons for setting up your own server.
However, my chum Andrew 'Locomotive' Cover and I have been experimenting rather extensively with our wireless WAN and needed some convenient way to communicate without an internet connection. So here's how to set up a Messaging Server in 5 easy steps..
From the Jabber.org website..
Jabber is best known as "the Linux of instant messaging" -- an open, secure, ad-free alternative to consumer IM services like AIM, ICQ, MSN, and Yahoo. Jabber is a set of streaming XML protocols and technologies that enable any two entities on the Internet to exchange messages, presence, and other structured information in close to real time.
So Jabber is the all-encompassing open solution to instant messaging. The implementation of the Jabber server we will be using is the highly-respected Wildfire Server, from Jive Software. Finally we will connect to the Jabber/Wildfire Server using a chat client such as Psi.
1. Installing the Linux Emulator
Wildfire runs on Java and the included installer for java is in the form of a Linux binary. Hence Linux Binary compatibility must be enabled in FreeBSD. If this was not done during installation, follow these instructions..
Insert the FreeBSD 6.1 installation CD..
linux_base-8-8.0_14 /usr/ports/emulators/linux_base-8 (spacebar to select) OK
tab to Install OK
after install, tab to EXIT
1a. Enabling Linux Binary Support
Add the following line..
And then reboot the system.
2. Installing the Java Runtime Environment
Wildfire requires Java version 1.5x or above. It is not necessary to install the full Java Development Kit (JDK) unless you plan to undertake further development of the platform. The more slimline Java Runtime Environment (JRE) will suffice..
Grab the Java Runtime Environment (JRE) 5.0 Update 8 jre-1_5_0_08-linux-i586.bin
) from the Sun Java website
(16.2MB) or its updated equivalent and download to your usual source files directory, such as /src
Make the file executable, load the linux module into memory and then run the self-extractor/installer..
chmod 755 jre-1_5_0_08-linux-i586.bin
Scroll down the licence agreement and accept by typing 'yes'
The installer automatically extracts all the files and ends with a final 'Done'.
You should end up with something like /src/jre1.5.0_08
. Move the java JRE directory from /src
mv jre1.5.0_08 /usr/local
And that's it for the java part, Wildfire will look for these Java files at /usr/local/jre1.5.0_08
3. Installing the Wildfire Server
(5.7MB) from the web and download to to your usual source files directory, such as /src
. Extract the wildfire files and move the extracted wildfire directory from /src/wildfire
tar -zxvf wildfire_3_1_0_beta_2.tar.gz
mv wildfire /usr/local
4. Starting the Wildfire Server
Start the wildfire service with the following command..
(press ENTER twice)
Wildfire will locate the required java environment and start itself up. To stop the wildfire service, type..
5. Configuring the Wildfire Server
Wildfire is configurable through its own web interface (Apache not required). Connect to the server from a web browser, using its IP Address or hostname, on port 9090..
i.e. http://192.168.0.222:9090 or http://servername.domainname:9090
Upon first connection, you will be plunged into a mini setup wizard for configuring the basics, such as Chat Server name and admin password, etc. Follow the prompts and the server should be ready to go.
I ran into a whole host of problems which took a week of late evenings to resolve. Hopefully I have managed to circumvent most issues through my instructions.
Note that FreeBSD.org indicates a method of installing Java through ports. I attempted this but ran into dependency (and virtual memory!) problems and would not recommend this method. The latest versions of FreeBSD have better support for Linux binaries. I had an easier time of it using FreeBSD 6.1 than earlier attempts using 5.4. Special thanks to my academic colleague Henry 'Programmer' Bush, for helpful hints and suggesting the alternative Linux binary method of installing Java.
The various Wildfire log files can be useful in diagnosing problems and these are located in /usr/local/wildfire/logs
. See also /usr/local/wildfire/bin
, including the nohup.out
I do get an error message in the latter file..
Java HotSpot(TM) Server VM warning: Can't detect initial thread stack location - find_vma failed
Despite this, the Wildfire Server is working fine. Various references indicate that this is a spurious error messsage which can be ignored. If you really can't live with this, then I found that running the command..
mount -t linprocfs linprocfs /compat/linux/proc
..seemed to fix this. For more assistance, you may find some of the links below useful..
Configuring a Chat Client
There are a number of MSN-like clients which can be used to communicate through the various types of Jabber Servers (see the Clients Comparison below). To start the ball rolling, here are the installation and configuration instructions for the Psi
Links and References
Wildfire Server at Jive Software
Servers Comparison at Jabber Software Foundation
Clients Comparison at Jabber Software Foundation
(this method not recommended for Java install)