-
-
Save johnsage25/9296743c48026fe2c3e3b57e367e8be1 to your computer and use it in GitHub Desktop.
How to install Ejabberd 18.* XMPP Server with Mysql on Ubuntu 18.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------- | |
Build Ejabberd | |
------------------------------------- | |
1) sudo su | |
2) apt-get update | |
3) apt-get install make gcc libexpat1-dev libyaml-dev automake libssl-dev erlang build-essential libncurses5-dev openssl zlib1g-dev libgd-dev libwebp-dev fop xsltproc unixodbc-dev git -y | |
4) cd /opt | |
5) wget -O ejab.tgz https://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/18.06/ejabberd-18.06.tgz | |
6) cd ejabberd-18.06/ | |
7) ./configure --enable-mysql | |
8) make | |
9) make install | |
10) ejabberdctl start | |
11) Ctrl + T ( Open a new Terminal ) | |
12) ejabberdctl register admin localhost 123456 | |
13) vim /usr/local/etc/ejabberd/ejabberd.yml and Add following settings | |
14) add - "admin@localhost" to admin : > user : | |
14) add http_bind: true just below module: ejabberd_http ( this is BOSH setup ) | |
------------------------------------- | |
Setup BOSH proxy | |
------------------------------------- | |
15) apt-get install nginx | |
16) vim /etc/nginx/sites-enabled/default and Add following settings | |
location /http-bind { | |
proxy_pass http://localhost:5280/http-bind; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_buffering off; | |
tcp_nodelay on; | |
} | |
( chmod -R 777 /var/www/html may be required ) | |
17) service nginx restart | |
18) ejabberdctl start | |
19) http://localhost:5280/admin | |
20) http://localhost:5280/admin/server/localhost/users/ and couple of users ( may be 2 or 3 ) | |
------------------------------------- | |
Setup XMPP client | |
------------------------------------- | |
21) clone https://github.com/jsxc/jsxc to /var/www/html | |
22) Open on Firefox and brows - http://localhost/chat/jsxc/example/ | |
23) Open on Chrome and brows - http://localhost/chat/jsxc/example/ | |
24) XMPP domain: localhost | |
25) BOSH url:: /http-bind/ | |
26) Try Dual-Login on and your chat is enabled | |
Enjoy :) | |
------------------------------------- | |
Setup MySQL | |
------------------------------------- | |
Update soon | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment