Installing ejabberd/deb
ejabberd deb packages
The following distros have deb packages including the shared roster patches for Sugar collaboration using OLPC release 8.2 or earlier, or Sugar 0.82 or earlier:
- Debian lenny
- Debian sid
- Ubuntu 8.10 intrepid
These instructions have been tested with intrepid --morgs 14:07, 24 October 2008 (UTC)
Installation and configuration
To run ejabberd as a public server, you will need to run it on a public server where you have root privileges - like a Xen hosted virtual server. Replace "your.host.name" in the examples with the appropriate hostname.
1. Install ejabberd:
sudo apt-get install ejabberd
2. Configure the hostname and admin user:
If this didn't happen automatically when you installed ejabberd, run the configuration wizard:
sudo dpkg-reconfigure ejabberd
Enter the fully qualified domain name at which ejabberd will be visible. I'll use your.host.name in the examples below.
Enter a username and password for an admin user who will have access through the web interface.
3. Edit or patch /etc/ejabberd.cfg
This is a patch to apply the required configuration to /etc/ejabberd.cfg for Sugar. You can download this patch from http://dev.laptop.org/~morgan/ejabberd/ejabberd.cfg.patch:
--- ejabberd.cfg.orig 2008-10-24 15:37:27.000000000 +0200 +++ ejabberd.cfg 2008-10-24 15:37:36.000000000 +0200 @@ -122,17 +122,17 @@ %% %% To enable the old SSL connection method (deprecated) in port 5223: %% - %%{5223, ejabberd_c2s, [ - %% {access, c2s}, - %% {shaper, c2s_shaper}, - %% {max_stanza_size, 65536}, - %% tls, {certfile, "/etc/ejabberd/ejabberd.pem"} - %% ]}, - - {5269, ejabberd_s2s_in, [ - {shaper, s2s_shaper}, - {max_stanza_size, 131072} - ]}, + {5223, ejabberd_c2s, [ + {access, c2s}, + {shaper, c2s_shaper}, + {max_stanza_size, 65536}, + tls, {certfile, "/etc/ejabberd/ejabberd.pem"} + ]}, + + %%{5269, ejabberd_s2s_in, [ + %% {shaper, s2s_shaper}, + %% {max_stanza_size, 131072} + %% ]}, %% External MUC jabber-muc (but internal mod_muc is better :)) %%{5554, ejabberd_service, [ @@ -215,6 +215,7 @@ %% Default s2s policy for undefined hosts. %% %%{s2s_default_policy, allow}. +{s2s_default_policy, deny}. %% %% Allow or deny communication with specific servers. @@ -403,7 +404,7 @@ %% For all users except admins used "normal" shaper {access, c2s_shaper, [{none, admin}, - {normal, all}]}. + {fast, all}]}. %% For all S2S connections used "fast" shaper {access, s2s_shaper, [{fast, all}]}. @@ -425,7 +426,7 @@ % (note that if you remove mod_register from modules list then users will not % be able to change their password as well as register). % This setting is default because it's more safe. -{access, register, [{deny, all}]}. +{access, register, [{allow, all}]}. %% Everybody can create pubsub nodes {access, pubsub_createnode, [{allow, all}]}. @@ -499,7 +500,7 @@ ]}, {mod_roster, []}, %%{mod_service_log,[]}, - %%{mod_shared_roster,[]}, + {mod_shared_roster,[]}, {mod_stats, []}, {mod_time, []}, {mod_vcard, []},
The patch does the following:
- Enable old-style SSL on port 5223
- Disable s2s on port 5269
- Deny s2s
- Set the c2s shaper to fast
- Allow in-band registration
- Enable the shared roster module
Explanations for these changes are on Ejabberd Configuration.
Apply it to /etc/ejabberd.cfg and restart ejabberd with:
wget http://dev.laptop.org/~morgan/ejabberd/ejabberd.cfg.patch sudo patch /etc/ejabberd/ejabberd.cfg < ejabberd.cfg.patch sudo /etc/init.d/ejabberd restart
4. Set up the Shared Roster Group
The shared roster group can be created on the command line, but doesn't work unless you log into the web interface and resubmit the form.
Create it with:
sudo ejabberdctl srg-create Online your.host.name Online "Online users" Online sudo ejabberdctl srg-user-add @online "" Online your.host.name
Perhaps this syntax generates a different internal representation than what we really want, but if we log into the web interface and resubmit a form without changing the contents, it works.
- Log into http://your.host.name:5280/admin/ with the admin user you set up previously. Note that you must specify the username as user@your.host.name when you log in.
- Click Virtual Hosts
- Click your.host.name
- Click Shared Roster Groups
- Click Online (the group we made)
- Don't change anything. You should see @online@ for Members.
- Click Submit
It will show "Submitted". The shared roster should now work. Disconnect and reconnect any jabber clients to see it in effect.
You can now get multiple XOs, emulated XOs, Sugar users or sugar-jhbuild instances connected and collaborating!