try another color:
try another fontsize: 60% 70% 80% 90%
dueyesterday.net
Documentation for the masses

How to Integrate XMPP (Openfire) Chat into Drupal and your Environment

Installing Openfire

  1. Log into the Ubuntu server dedicated for Openfire.
  2. Update the server.
    • apt-get update
    • apt-get dist-upgrade
  3. Install the necessary programs for Openfire.
    • apt-get install apache2 php5 libapache2-mod-php5 mysql-server-5.0 sun-java6-bin 
  4. Before we download Openfire we need to first add the Openfire database and user.
    • mysql -u root -p
    • create database openfire;
    • grant all on openfire.* to openfire@localhost IDENTIFIED BY "password";
    • exit
  5. Change directories to /opt
    • wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_6_4.tar.gz
    • tar -xzvf openfire_3_6_4.tar.gz
    • cd openfire/bin
    • ./openfire start
  6. Openfire may take a minute to start up, but once ready should be accessible via the web interface.
  7. You will now be directed through a bunch of screens to help initially configure Openfire.

Choose your language and continue.

The domain you enter in this field will be used as the appendix for you username. In this case my user would look something like first.last@dueyesterday.net. 

We are using MySQL, so we will be choosing the Standard Database Connection option.

Fill in the database connection information  using the openfire database, username created and password for that username. It is best to not let Openfire run as root and instead use the created name.

As previously mentioned, we will be using Active Directory to authenticate our users. Choose the LDAP option if you plan to do the same (this demo assumes you choose LDAP).

When you have the connection information filled in, test it out using the "Test Settings" button.

By default, Openfire will fill in various LDAP attributes that could be used. These can be left as they are or customized for your environment. 

Like the LDAP attributes for a profile, you can also setup group mapping. These too can be left as their default values.

Lastly, add a user to the administrators group.

Setup is now complete.


You can now log into the Administrator panel.


Once logged in, you will have access to all the options Openfire provides. For the sake of this demo we will only cover chat specific configurations.


If you navigate to the "Plugins" menu from the top navigation you can see every plugin available in a standard Openfire installation. 


Here is a list of plugins I have installed and found useful for chatting.


One of the last things we want to do to configure Openfire is to navigate to "Server Settings" under "Server" and then to "HTTP Binding". Enable the script syntax option.

Your rating: None Average: 3.6 (27 votes)

Comments

without ldap user sync?

Hey there,great Tutorial but do you know a solution to sync users without using a ldap server?I think it opens may security issues and is not really needed for this "small" user sync.king regards

Depends on your XMPP solution

If you are using Openfire then I know you can use MySQL for your backend database. Keep in mind that Drupal also uses MySQL. In theory you could created a stored procedure to copy the Drupal user related information out of the Drupal database and copy it over into the Openfire database. Obviously you would need to account for the changes in table structure, constraints and encryption, but I think it would work. You would also need to look into the amount of times a stored proc. could be called throughout the day (depending on how much your are worried about syncing the information).  

Hey

just found a patch in the xmpp framework module queue that solves this problem. There is temporaly one error you got while the module syncs the user db but it works like a charm.If I can find it I will post it here but i already serched and it is not very clear for me why it works but also creates an error :).

Almost done, but

Hi great article, really great article, quite impressive. I've made through the end in a couple of days, first fixing problems with LDAP, then Centos didn't want to install mod_authz_ldap, then i got some problem redirecting to http-bind. I guess i solved most of the problems now if i try to go to my-site-url.com/http-bind/ i get an error 400 of bad request. Pidgin works with openfire i can see the sessions too, i can make rooms on conference.my-site.com too. The last problem is that in the XMPP_CLIENT block i see only the configure chat link even if i put the JID on the configuration page. I'm the only user for now, is this the problem ? I must have more than one user ?Another question, there's a way to check that my mod_authnz_ldap configuration is working propertly ?Thanks and great article!

Hi it's me again

Hi i solved the problem i was asking for, and i discovered that openfire can use an external database for user authentication so i set up the openfire.xml file to use the Drupal user table without needing stored procedure o synching problems, here is the article for Openfire custom authentication.http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/...Bye and keep up the good work.

Glad you solved your issue!

 What is the account you were trying to register? I will go in and make sure everything is setup for you. Thanks for the praise and if you don't mind me asking, was there anything you think I should add to the walk through to make it better? 

Maybe some more infos about...

Hi it wasn't me that got problem with the registration process. I was the one asking for the problen that then i solved it. For the article you can explain more in detail how to configure LDAP for openfire. I've already know how to use LDAP so i got no problem, but it can't be clear how to set up a functional dc for openfire to a newbie. Also you can leave an example to how to edit the httpd.conf file (for mod_proxy and mod_authnz_ldap), just a bit of the conf file to show to a less experienced user the concept of the <Location> tag. The most useful tip is that you put a section for configuring openfire to work with the drupal users db table. I guess that most users have this tipe of configuration and use LDAP (as i said) can be painful to some LDAP newbies. I've posted the link for the guide to customize openfire db authentication.If you need i can write some lines about how i did it and post my openfire.xml file, but the openfire tutorial is quite straightforward. The omission on the openfire tutorial is that you must set the same type of auth connection type that you use in the openfire.xml (if you use JDBCAuth..., you must set JDBCAuth... on the admin option in openfire administration page or the authentcation fails).cya! Marco

thanks

Hi great article. I want to publish this article on my own if allowed. my website estetik

 Just credit back here and I

 Just credit back here and I have no issues with that.

Integration without LDAP

5

Hi.I´ve found yout tutorial very useful and I´ve set up the server and the drupal module. I have Drupal and Openfire on the same machine so I didn´t have to pass through the proxy configuration.I have not used the ldap config to use one sign on so I have to separate tables for users, one in drupal and the other one in openfire. I have configured my openfire user account on my drupal user profile, but when i push the launch XWChat button the chat return the following error: "Wrong combination Username / Password. Please re-loign to the site for synchronization. Disconnected from Server".The openfire user works perfectly on Pidgin. The config of drupal is ok i thing. The http-binding works well and It´s correctly configured. Any idea of what could be wrong? Thanks in advance.

Shoot me an email

This is something that has come up before and I have tried to help with, but was never 100% successful. I know in my early installation of the xmppframework that the password decryption function was never working correctly. This in turn would mangle passwords being sent to the openfire server. I was able to see this by using firebug within firefox and watching the authentication process (in the clear without MD5).

Send me an email and I can try and help you out more...

brandon.s.dixon@gmail.com