Last active
June 22, 2016 19:29
-
-
Save dirkmoors/4acc602fedffe4768f39 to your computer and use it in GitHub Desktop.
ejabberd 13.12 Build from source + Ubuntu 14.04LTS installation
This file contains hidden or 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
• Node 1, 2, … X | |
○ sudo su -l | |
○ cd | |
○ apt-get update | |
○ apt-get upgrade | |
○ apt-get install git-core | |
○ apt-get install libyaml-dev | |
○ apt-get install erlang | |
○ apt-get install unzip | |
○ apt-get build-dep ejabberd | |
○ apt-get install pkg-config | |
○ git clone https://github.com/processone/ejabberd.git (I've used commit #2723056fae) | |
○ cd ejabberd | |
○ ./configure | |
○ make | |
○ make install | |
○ nano /etc/ejabberd/ejabberd.yml | |
§ Go to "SERVED HOSTNAMES" | |
□ Add <HOSTNAME> under "hosts:" | |
§ Go to acl section and ensure: | |
acl: | |
admin: | |
user: | |
- "<USERNAME>": "<HOSTNAME>" | |
§ Save and close | |
○ ejabberdctl restart | |
○ ejabberdctl register <USERNAME> <HOSTNAME> <PASSWORD> | |
○ Go to http://<IP_OR_HOSTNAME>:5280/admin/ | |
§ Log in with <USERNAME>@<HOSTNAME> and <PASSWORD> | |
○ Install / enable module(s): | |
§ ejabberdctl stop | |
§ git clone git://github.com/processone/ejabberd-contrib.git | |
§ Install mod_muc_admin | |
□ cd ejabberd-contrib/mod_muc_admin | |
□ ./build.sh | |
□ cd /lib/ejabberd/ebin/ | |
□ ln -s ~/ejabberd-contrib/mod_muc_admin/ebin/mod_muc_admin.beam | |
□ nano /etc/ejabberd/ejabberd.yml | |
® Add "mod_muc_admin" to modules section: | |
mod_muc_admin: {} | |
® Save and close | |
□ cd ~ | |
§ Install mod_admin_extra | |
□ cd mod_admin_extra | |
□ ./build.sh | |
□ cd /lib/ejabberd/ebin/ | |
□ ln -s ~/ejabberd-contrib/mod_admin_extra/ebin/mod_admin_extra.beam | |
□ nano /etc/ejabberd/ejabberd.yml | |
® Add "mod_admin_extra" to modules section: | |
mod_admin_extra: {} | |
® Save and close | |
□ cd ~ | |
§ Enable ejabberd_xmlrpc | |
□ nano /etc/ejabberd/ejabberd.yml | |
® Add (or uncomment) the following under "listen" section: | |
- | |
port: 4560 | |
module: ejabberd_xmlrpc access_commands: | |
configure: | |
all: [] | |
® Save and close | |
○ Edit access rules | |
§ nano /etc/ejabberd/ejabberd.yml | |
□ Under "access" add/modify the following: | |
muc_create: | |
admin: allow | |
register: | |
all: deny | |
admin: allow | |
□ Save and close | |
○ Create startup script: | |
See startup script below |
This file contains hidden or 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
#!/bin/bash | |
# | |
# /etc/init.d/ejabberd | |
# | |
# This is a custom ejabberd init script written | |
# for the Fedora Linux distribution, and is not | |
# included by the ejabberd RPM package(s). | |
# | |
# author: Sean O'Donnell | |
# | |
# chkconfig: - 99 10 | |
# description: ejabberd XMPP server | |
# Source function library. | |
#./etc/init.d/functions | |
set -o errexit | |
start() | |
{ | |
echo -n "Starting : " | |
/sbin/ejabberdctl start | |
return | |
} | |
status() | |
{ | |
echo -n "Status : " | |
/sbin/ejabberdctl status | |
return | |
} | |
stop() | |
{ | |
echo -n "Shutting down : " | |
/sbin/ejabberdctl stop | |
return | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
status) | |
status | |
;; | |
restart) | |
stop | |
start | |
;; | |
*) | |
echo "Usage: [start|stop|restart|status]" | |
exit 1 | |
;; | |
esac | |
exit $? |
Thanks for the startup script!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the startup script is created, run:
This will make ejabberd run automatically on server boot