Installing ejabberd: Difference between revisions
No edit summary |
(Added SSL key and certificate generation) |
||
Line 80: | Line 80: | ||
(The username "jtest" is for admin rights accessing the web interface. You can change it to something else, but keep it consistent.) |
(The username "jtest" is for admin rights accessing the web interface. You can change it to something else, but keep it consistent.) |
||
8. Create an SSL key and certificate: |
|||
⚫ | |||
openssl req -newkey rsa:1024 -keyout ejabberd.pem -nodes -x509 -days 3650 -out ejabberd.cer |
|||
echo "" >> ejabberd.pem |
|||
cat ejabberd.cer >> ejabberd.pem |
|||
sudo cp ejabberd.pem /etc/ejabberd/ejabberd.pem |
|||
sudo chown ejabberd:ejabberd /etc/ejabberd/ejabberd.pem |
|||
sudo chmod 400 /etc/ejabberd/ejabberd.pem |
|||
⚫ | |||
sudo ejabberdctl start |
sudo ejabberdctl start |
||
Line 87: | Line 96: | ||
:Required using sudo ejabberdctl ejabberd@servername start for me (/user/sbin/) ridd 21 May 08 |
:Required using sudo ejabberdctl ejabberd@servername start for me (/user/sbin/) ridd 21 May 08 |
||
10. To set up the '''shared roster''' we need a user who can '''log in through the web interface'''. There are two ways to add the user jtest (as specified above in point 7): |
|||
(a) Use a jabber client to register the user jtest on ''your.host.name''. This is useful if you want to be logged in to the server with a regular jabber client and see the participants in the shared roster. Note: You need to '''register''' the account - for example, in pidgin, check the "Create this new account on the server" option. |
(a) Use a jabber client to register the user jtest on ''your.host.name''. This is useful if you want to be logged in to the server with a regular jabber client and see the participants in the shared roster. Note: You need to '''register''' the account - for example, in pidgin, check the "Create this new account on the server" option. |
||
Line 95: | Line 104: | ||
(b) sudo ejabberdctl register jtest ''your.host.name'' ''password'' (replace password with an actual password...) |
(b) sudo ejabberdctl register jtest ''your.host.name'' ''password'' (replace password with an actual password...) |
||
11. Go to http://your.host.name:5280/admin/ and login as "jtest@''your.host.name''" with the password you set when registering. |
|||
12. Click on "Virtual Hosts", then your hostname, then "'''Shared Roster Groups'''". Type "Online" and click Add New. |
|||
13. Click on "Online" and enter "Online" for Name, "@online@" for Members, and "Online" for Displayed Groups. Click Submit. |
|||
It should be working now! |
It should be working now! |
||
14. In your jabber client, disconnect and reconnect the "jtest@''your.host.name''" account to activate seeing the shared roster group. Note that you will only see it in your buddy list when other users connect (XOs or jabber clients) - an empty group is not shown. |
|||
15. On an XO, go to the Terminal and type "sugar-control-panel -s jabber ''your.host.name''". Restart sugar with ctrl-alt-erase. |
|||
16. 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, [[Developers/Setup#Emulation_Packages.2FProducts|emulated XOs]] or [[Developers/Setup#sugar-jhbuild|sugar-jhbuild]] instances connected and collaborating! |
You can now get multiple XOs, [[Developers/Setup#Emulation_Packages.2FProducts|emulated XOs]] or [[Developers/Setup#sugar-jhbuild|sugar-jhbuild]] instances connected and collaborating! |
Revision as of 12:05, 16 July 2008
Packages
A Fedora 7 RPM for ejabberd with the OLPC patches is available from the school server repositories or directly from [1] - install that and proceed from step 7 below for configuration.
Otherwise, see installing from source:
Installing ejabberd from source with OLPC patches
Originally posted here
Here’s a walkthrough of installing ejabberd 2.0.0 (freshly released) from source, with the OLPC patches, on Ubuntu 7.10/8.04. It’s based on the wikipage Ejabberd Configuration with more detail.
If running on Fedora 7, you can skip steps 1 - 6 and just download the RPM from the school server repositories
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. Don’t have ejabberd installed from the Ubuntu archives - we will build it from source. You will have to enable the "universe" package repositories.
2. Install dependencies:
sudo apt-get install erlang-base erlang-nox erlang-dev build-essential libssl-dev libexpat-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.host.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.host.name"}}.
(The username "jtest" is for admin rights accessing the web interface. You can change it to something else, but keep it consistent.)
8. Create an SSL key and certificate:
openssl req -newkey rsa:1024 -keyout ejabberd.pem -nodes -x509 -days 3650 -out ejabberd.cer echo "" >> ejabberd.pem cat ejabberd.cer >> ejabberd.pem sudo cp ejabberd.pem /etc/ejabberd/ejabberd.pem sudo chown ejabberd:ejabberd /etc/ejabberd/ejabberd.pem sudo chmod 400 /etc/ejabberd/ejabberd.pem
9. Start the server:
sudo ejabberdctl start
- 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.--morgs 08:49, 4 March 2008 (EST)
- Required using sudo ejabberdctl ejabberd@servername start for me (/user/sbin/) ridd 21 May 08
10. To set up the shared roster we need a user who can log in through the web interface. There are two ways to add the user jtest (as specified above in point 7):
(a) Use a jabber client to register the user jtest on your.host.name. This is useful if you want to be logged in to the server with a regular jabber client and see the participants in the shared roster. Note: You need to register the account - for example, in pidgin, check the "Create this new account on the server" option.
or
(b) sudo ejabberdctl register jtest your.host.name password (replace password with an actual password...)
11. Go to http://your.host.name:5280/admin/ and login as "jtest@your.host.name" with the password you set when registering.
12. Click on "Virtual Hosts", then your hostname, then "Shared Roster Groups". Type "Online" and click Add New.
13. Click on "Online" and enter "Online" for Name, "@online@" for Members, and "Online" for Displayed Groups. Click Submit.
It should be working now!
14. In your jabber client, disconnect and reconnect the "jtest@your.host.name" account to activate seeing the shared roster group. Note that you will only see it in your buddy list when other users connect (XOs or jabber clients) - an empty group is not shown.
15. On an XO, go to the Terminal and type "sugar-control-panel -s jabber your.host.name". Restart sugar with ctrl-alt-erase.
16. 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!