forked from begonaalvarezd/begona-nscreen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathejabberd_setup.txt
executable file
·100 lines (61 loc) · 2.55 KB
/
ejabberd_setup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
==Install eJabberd==
On Ubuntu:
sudo apt-get install ejabberd
On Mac os X:
see
http://www.ejabberd.im/download
(see also gotchas secton below. You need eJabberd version post 2.0 and then it includes bosh. More on installation
here: http://notube.tv/2010/08/06/strophe-and-greasemonkey/)
==Configure==
edit
ejabberdctl.cfg
and
ejabberd.cfg
for server name
be careful - these should be both the same
==Install module ejabberdctl expansion - optional - I find it useful==
mkdir ejabberd
cd ejabberd
svn co https://svn.process-one.net/ejabberd-modules
cd ejabberd-modules/mod_admin_extra/trunk
./build.sh
cd ebin
sudo cp mod_admin_extra.beam /usr/lib/ejabberd/ebin/
==Configure bosh with apache==
for bosh, you'll need this:
.htaccess under top level (e.g /var/www/ on ubuntu)
RewriteEngine On
RewriteRule http-bind http://localhost:5280/http-bind/ [P]
RewriteRule http-bind/ http://localhost:5280/http-bind/ [P]
RewriteRule http-poll http://localhost:5280/http-poll/ [P]
RewriteRule http-poll/ http://localhost:5280/http-poll/ [P]
RewriteRule admin/ http://localhost:5280/admin/ [P]
You also may need to edit sites-enabled to allow .htaccess files - you need AllowOverride All.
==Start eJabberd==
ejabberd start -detached
==Various eJabberd Gotchas==
I recently had to install ejabberd elsewhere and forgot how incredibly fiddly it is to get working. So here’s a few
gotchas and possible solutions:
* Problem: ejabberd won’t start
Try starting it as root user (not just sudo):
sudo -u root -s
ejabberd start
* Problem: strophe keeps disconnecting
You need to add this to the config file:
{auth_method, [internal, anonymous]}.
* Problem: ejabberd won't start in background
ejabberd start -detached
* Problem: running ejabberdctl gives an error like "Failed RPC connection to the node ‘ejabberd@localhost’: nodedown
sudo -u root -s
ejabberdctl
* Problem: bosh not working, even though the page /http-bind says it is
Edit modules part of config make sure you have right config! there are two! – check
ps ax | grep ejabberd
and that will show the correct one. The modules section should contain:
{mod_http_bind, []},
{mod_http_poll, []},
* Problem: Mysteriously still not working, on Amazon EC2
Make sure the right ports are open: 5222, 5223, 5280 – on EC2 you have to open these using for example the
configuration dashboard. It's under 'security groups'
* Problem: Mysteriously still not working
HTML client *must* be on the same domain as http-bind