Archive for February, 2008

OLPC community Jabber servers: ejabberd 2.0.0 from source

Update: Added these instructions to the OLPC wiki: http://wiki.laptop.org/go/Installing_ejabberd

Update: No more need to build from source, if you’re running Intrepid which has the required patches for ejabberd!

Here’s a walkthrough of installing ejabberd 2.0.0 (freshly released) from source, with the OLPC patches, on Ubuntu 7.10. It’s based on the wikipage [[Ejabberd Configuration]] with more detail.

In the near future I’ll post about prebuilt packages – they are currently out of date.

A bit about my setup: I’m installing ejabberd on my laptop running Ubuntu. I have two XOs connected to my wireless access point. My dhcp and dns doesn’t give a fully qualified domain name to my laptop, so I’m putting its IP address and “your.host.name” into /etc/hosts on all the machines.

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 my examples with the appropriate hostname.

Let’s dive into the installation… Some of the commands displayed below might be chopped off. You can still copy and paste them to see the full command.

1. Don’t have ejabberd installed from the Ubuntu archives – we will build it from source.

2. Install dependencies:

sudo apt-get install erlang-base erlang-nox erlang-dev build-essential libssl-dev

3. Get the ejabberd source:

mkdir ejabberd
cd ejabberd
wget http://www.process-one.net/downloads/ejabberd/2.0.0/ejabberd-2.0.0.tar.gz
tar xfz ejabberd-2.0.0.tar.gz

4. Get and apply the OLPC-specific patches and configuration:

wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/shared_roster_push2.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/shared_roster_recent.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/shared_roster_online.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/mod_ctlextra.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/ejabberd.cfg
cd ejabberd-2.0.0/
patch -p1 < ../shared_roster_push2.diff
patch -p1 < ../shared_roster_recent.diff
patch -p1 < ../shared_roster_online.diff
patch -p1 < ../mod_ctlextra.diff

5. Build ejabberd:

cd src
./configure
make

(Although I saw “warning: pointer targets in assignment differ in signedness” at this point, the build did succeed.)

6. Install:

sudo make install

7. Apply configuration:

cd ../..
sudo cp ejabberd.cfg /etc/ejabberd/
sudo gedit /etc/ejabberd/ejabberd.cfg

(or use your preferred editor.)

Change the hostname: find the line that says

{hosts, ["jabber.laptop.org"]}.

and set it to the FQDN of your server:

{hosts, ["your.server.name"]}.

Do the same for the admin login: find the line that says

{acl, admin, {user, "jtest", "jabber.laptop.org"}}.

and set the FQDN to your server:

{acl, admin, {user, "jtest", "your.server.name"}}.

(The username “jtest” is for admin rights accessing the web interface. You can change it to something else, but keep it consistent.)

8. Start the server. You should be able to use sudo /etc/init.d/ejabberd start, but that didn’t work for me (yet). This will do it, but won’t start automatically on boot:

sudo ejabberdctl start

9. To set up the shared roster we need a user who can log in through the web interface. Use a jabber client to register the user jtest on your.server.name – you need to do this to have an admin user in the web interface.

10. Go to http://your.server.name:5280/admin/ and login as “jtest@your.server.name” with the password you set when registering.

11. Click on “Virtual Hosts”, then your hostname, then “Shared Roster Groups”. Type “everybody” and click Add New.

12. Click on “everybody” and enter “everybody” for Name, “@online@” for Members, and “everybody” for Displayed Groups. Click Submit. (I tried some variations on these names, per [[Ejabberd Configuration]] and http://www.ejabberd.im/shared-roster-all but these exact strings were the only combination that worked for me.)

It should be working now!

13. In your jabber client, disconnect and reconnect the “jtest@your.host.name” account.

14. On an XO, go to the Terminal and type “sugar-control-panel -s jabber your.host.name”. Restart sugar with ctrl-alt-erase.

15. In your jabber client (with the jtest account) you should see a new group appear called everybody, showing the nickname of the XO.

You can now get multiple XOs, emulated XOs or sugar-jhbuild instances connected and collaborating!

OLPC community Jabber servers: global vs local, alternatives

Kevin Mark commented on my post OLPC community Jabber servers:

The only issue is that when xochat.org was running, I was able to connect from my sugar emulator in ny to an xo users in australia. Your idea will not allow that, more or less.

I thought responding to this would benefit a broader audience.

Global servers that anyone can join are simply not feasible at this time as xochat.org showed: the server dies due to being overwhelmed by the number of users.

(Once we’ve got the next generation of server connectivity done, we should be able to run highly scalable servers, and run multiple federated servers that are connected to each other, allowing kids from different schools – or adults anywhere – to collaborate. That’s the promise – we’re still a way off.)

However, people can certainly set up global special interest servers – like say one for PyGame activity developers, or one for library content contributors, and so on. The key is to narrow the focus so you don’t get too many participants.

Alternately, as I mentioned the best way may be servers by city, or region for a particular use. In particular, there should be servers specifically for kids, where the only adult participants are parents helping out – not adult users looking for their own collaboration channels.

If you’d like to chat with OLPC-interested people in strange and foreign lands, then I recommend IRC chat: join #olpc on freenode, and you’ll find people from all over (depending on time zone). There is an XO activity for IRC: XoIRC – so you can chat from your XO.

For serious questions and discussions, please join the appropriate mailing list. Discussions on IRC are immediate and often effective, but transient. There’s little to no record of them, for others to discover and follow up – so questions that may benefit others are best done by old-fashioned mail.

OLPC community Jabber servers

OLPC collaboration via a server is currently only working on ejabberd with some special patches. It’s not easy getting a server up and running, and this is hindering the deployment of community servers. This is the first post in a series to assist people in getting a functional jabber server up and running.

We should have dozens of community servers run by, and supporting, G1G1 users, but the only one I’m aware of that was functional was Tom Hoffman‘s xochat.org, and it’s been down for a while.

Here’s the issue: At this stage, we cannot handle arbitrary numbers of XOs on a server. (We are working on this, but don’t hold your breath – the fix won’t be ready for Update.1.)

Due to the shared roster, everybody sees everybody else on the server. That won’t scale. The most I’ve seen online on a server was about 170 XOs – so what we need are servers for specific communities, where random strangers are not necessarily welcome. (That sounds harsh, but joining a busy server will only make it unavailable for everybody else!)

So please step up and run a server! Over the next few days I’ll document different approaches to getting up and running, and if you need help, you can find me on IRC: morgs in #olpc on freenode (

I’ve started a wikipage, [[Community Jabber Servers]] to list servers (those that want to be publicly listed, anyway). If you want to publicize a server there, please be as specific as possible about who your community consists of, so that the whole world doesn’t show up at once and kill your server.

Coming up next: Setting up ejabberd 2.0.0 with OLPC patches, from source

Coming in the near future: Up to date ejabberd packages with OLPC patches included

Ubuntu-ZA participation: monthly themes

(also posted to the ubuntu-za list – reply there if appropriate)

Ubuntu-ZA Participation

I’d like to propose that we pick an area of participation in Ubuntu South Africa each month for six months, and during that month we put as much as we can into discussing and moving that theme, or topic, forwards.

The topics I have in mind are (in no specific order):

  • Education
  • Small Business
  • Software Development
  • System Administrators
  • Spreading Ubuntu in South Africa
  • [insert your idea here!]

The Goal

By the end of that month, the goal would be to achieve the following:

  • Identify those in our community who are active or interested in this area – by introducing ourselves on the mailing list
  • Identify the relevant needs and issues we face (e.g. skills in administering a school network, or a small business server, etc)
  • Identify people in the community who can meet those needs or offer relevant services for a fee
  • Nominate a person to act as the team leader for that area to continue promoting relevant activities in our community
  • Report back to Ubuntu South Africa and the global Ubuntu community the results of the month’s activities (https://wiki.ubuntu.com/TeamReports)

After six months, we’ll have Software Freedom Day in September, and this year we’ll be prepared in advance and coordinate activities with relevant LUGs and see if we can’t get some rockin’ events happening (with Karl to lead the way at Sandton Convention Centre)!

Your Mission

Please contribute topic/theme ideas, and choose one to start with for March. Here are more details on some of the topics I listed above to show what I mean:

Education

Within our community we have:

  • Educators
  • People running IT infrastructure for education
  • Students and Learners
  • Developers of educational software or content

Issues: Why use Ubuntu instead of Microsoft’s educational pricing? How to run a school network? How to convert to Ubuntu? Who are the experts and service providers in Edubuntu / LTSP / thin client networks? Where does Ubuntu not meet people’s needs?

Small Business

  • Small business owners
  • Small business IT people (often the same people)
  • IT providers servicing small businesses

Issues: How to do X/Y/Z with Ubuntu? Setting up a small business server? Integration with non-free software… Document format compatibility… Who to call on if it breaks…

Software Development

  • Developing desktop software for/on Ubuntu
  • Ubuntu as a development platform for the web


Follow

Get every new post delivered to your Inbox.