How To

Run Your Own Instant Messaging Server

Today we are going to install the Openfire XMPP server on CentOS 5.x. Openfire is extremely flexible and powerful and can be easily integrated into an existing IT infrastructure. It is written in Java, has tons of plugins and is released under the GPL so it can be freely modified and redistributed.

Note :: you will need to have MySQL installed before installing Openfire

First, download the CentOS RPM from the Ignite Realtime website. At the time of the writing the current version is 3.6.2, but you may want to check the site for an newer version.

wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.6.2-1.i386.rpm

Then simply install the RPM file

rpm -ihv openfire-3.6.2-1.i386.rpm

A MySQL database must be created for the openfire service. The following commands will log in to mysql as the root user and create a database openfire. Then create a user openfire , grant the user all privileges to the new database and set the users password. The final command flush privileges; simply reloads the user privileges for MySQL to ensure the new user has the access we have set up.

mysql -u root -p
create database openfire;
grant all on openfire.* to openfire@localhost identified by 'password';
flush privileges;
exit

Next, start the openfire service

/etc/init.d/openfire start

Note :: if you want openfire to start automatically when the server boots, run the following command:

chkconfig --add openfire

Once the service has been started, open a web browser and navigate to http://192.168.x.x:9090 where 192.168.x.x is the ip address of your server running openfire.

The installer is fairly self explanatory, choose your language and domain name.

On the Database Settings screen choose Standard Database Connection and click continue

Here we will use the information from the database we set up previously:
Database Driver Presets: MySQL
JDBC Driver Class: com.mysql.jdbc.Driver
Database URL: jdbc:mysql://localhost:3306/openfire
Username: openfire
Password: password

Next, choose default under Profile Settings and create your administrator account.

Note :: port 5222 must be available to all clients in order to connect

That's it. Now you can create users and connect any XMPP Instant Messaging client to your server.

There are a ton of options in the administration console so dig in and have fun!

Installing Aptana Studio 1.2.x on Ubuntu 8.10

Aptana Studio is an open source web programming IDE. It has many great features including javascript debugging, code completion, and support for a wide variety scripting languages used on the web (HTML, JavaScript, CSS, PHP, Python, ect). It also has built in support for many JavaScript libraries such as jQuery and MooTools. Aptana is built on the Eclipse platform which means you also have access to a huge library of plugins.

Installation:

First we need to make sure Java and the correct version of xulrunner are installed on Ubuntu. Here we will use the open source version of Java, but the sun-java6-jre version also works.

sudo apt-get install openjdk-6-jre xulrunner

Next, download the standalone Linux version of Aptana Studio from www.aptana.com and extract the zip file somewhere in your home directory.

In order for Aptana to run correctly we must set the MOZILLA_FIVE_HOME variable to point to the correct version of xulrunner. To do this we need to create a start script in the aptana directory. Using your favorite text editor, create a file in the aptana folder called runAptana.sh and insert the following code:

#!/bin/bash
export MOZILLA_FIVE_HOME="/usr/lib/xulrunner"
/path/to/aptana/AptanaStudio

Make sure the /path/to/aptana corresponds to the location of the aptana directory in your home directory.

Remember to make the script executable

chmod +x runAptana.sh

Now simply run ./runAptana.sh and enjoy the Web 2.0 IDE goodness.