Xmpp/Jabberd2 Mu Conference

From Debuntu

Jump to: navigation, search
WorkInProgress.png
Work in Progress
This page is a work in progress and might contain errors or inconsistency. Comment are most appreciated.

Contents

From Source

Compiling

First, you need to get the source from Gna!. Also, libglib2.0-dev, libexpat1-dev, pkg-config, libidn11-dev headers have to be installed on your system. Finally, compile by typing:

make

setting MUC

Copy muc-default.xml to muc.xml and change the value for <name> and <host> to your conference server hostname.

Basically, make it look like:

<jcr>
  <name>conference.example.com</name>
  <host>conference.example.com</host>
  <ip>127.0.0.1</ip> <!-- adress of the jabber server -->
  <port>5347</port>  <!-- port used to connect the service to the jabber server -->
  <secret>secret</secret> <!-- secret shared with the jabber server -->

  <spool>/var/spool/jabber2d/rooms</spool> <!-- directory containing the rooms data -->
  <logdir>/var/log/jabberd2</logdir> <!-- directory containing the debug log (the file is called mu-conference.log) -->
  <pidfile>/var/run/jabberd2/mu-conference.pid</pidfile> <!-- file that will contain the PID of the process -->

  <!--   <logstderr/> --> <!-- uncomment to also send log to stderr -->

  <loglevel>255</loglevel> <!-- log verbosity, 255 for very verbose, 0 for quiet, default 124 -->

    <conference xmlns="jabber:config:conference">
      <public/> <!-- rooms are public when created, comment to make them private by default -->
      <!-- the vCard section contains the vCard of the service -->
      <vCard>
        <FN>Public Chatrooms</FN>
        <DESC>This service is for public chatrooms.</DESC>
        <URL>http://xmpp.example.com/</URL>
      </vCard>
      <history>40</history> <!-- maximum numbers of history lines send when joining a room -->
      <logdir>/var/log/jabberd2/</logdir> <!-- where to store the room logs, comment to disable logging -->
      <!--logsubdirs/--> <!-- uncomment to stores the room logs in subdirs (for example 2007/08/02) -->
      <stylesheet>../style.css</stylesheet> <!--URL of the log stylesheet -->
      <!-- default text to send to legacy clients, will also be used in the logs -->
      <notice>
        <join>has become available</join>
        <leave>has left</leave>
        <rename>is now known as</rename>
      </notice>
      <!-- lists of admins of the service, add a <user/> tag by admin -->
      <sadmin>
        <user>admin@xmpp.example.com</user>
      </sadmin>
      <dynamic/>
      <!-- <dynamic/> --> <!-- when uncommented, only dynamic rooms can be created -->
      <!-- <persistent/> --> <!-- persistent rooms will be created, overide <dynamic/> -->
      <!-- <locknicks/> --> <!-- enforce the user nickname to the user part of his jid -->
      <!-- <roomlock/> --> <!-- uncomment to allow only admins to create rooms -->
      <!-- <hideempty/> --> <!-- uncomment to hide rooms with no participants -->
      <!-- configuration of MySQL, only used if the MySQL exports is activated, see README.sql -->
      <!--<mysql>
        <user>root</user>
        <pass/>
        <database>chat</database>
        <host>localhost</host>
      </mysql>-->
    </conference>
</jcr>

Then create /var/spool/jabberd2/rooms:

# mkdir /var/spool/jabberd2/rooms
# chown jabber: /var/spool/jabberd2/rooms
Warning.png
Hostname conflict
Make sure that this hostname is not already taken by your xmpp server or mu-conference will segfault. See https://gna.org/bugs/?13058
Note.png
hostname does not have to be resolveable

Testing MUC settings

sudo -u jabber src/mu-conference -c muc.xml

Installing it

# cp src/muc-conference /usr/local/bin
# cp muc.xml /etc/jabberd2/

Using it

Launch it with:

su -c "muc-conference -c /etc/jabberd2/muc.xml" jabber

Debian package

I have created a package on my Launchpad PPA: https://edge.launchpad.net/~chantra/+archive/ppa . This ease the maintenance of the muc module.

Configuration details will be the same as above, but some filenames might differ:

Steps to follow:

sudo -u jabber jabberd2-muc -c /etc/jabberd2/jabberd2-muc.xml

You might use it as a template to generate a package for other Debian based system.

Optional for client settings

In /etc/jabberd2/sm.xml , add an entry under within the <items>...</items> containing:

<item category='conference' type='public' jid='conference.example.com' name='Text conferencing'/>

This will allow to propose clients with the right conference server name.

Reference

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense