Ejabberd Installation and Operation Guide
Total Page:16
File Type:pdf, Size:1020Kb
ejabberd 15.03 Installation and Operation Guide ejabberd Development Team 2 Contents 1 Introduction 9 1.1 Key Features...................................... 10 1.2 Additional Features.................................. 11 2 Installing ejabberd 13 2.1 Installing ejabberd with Binary Installer...................... 13 2.2 Installing ejabberd with Operating System Specific Packages........... 14 2.3 Installing ejabberd with CEAN........................... 14 2.4 Installing ejabberd from Source Code........................ 15 2.4.1 Requirements.................................. 15 2.4.2 Download Source Code............................ 15 2.4.3 Compile..................................... 16 2.4.4 Install...................................... 17 2.4.5 Start....................................... 17 2.4.6 Specific Notes for BSD............................. 18 2.4.7 Specific Notes for Sun Solaris......................... 18 2.4.8 Specific Notes for Microsoft Windows.................... 19 2.5 Create an XMPP Account for Administration.................... 20 2.6 Upgrading ejabberd .................................. 21 3 4 Contents 3 Configuring ejabberd 23 3.1 Basic Configuration.................................. 23 3.1.1 Legacy Configuration File........................... 24 3.1.2 Host Names................................... 24 3.1.3 Virtual Hosting................................. 25 3.1.4 Listening Ports................................. 27 3.1.5 Authentication................................. 38 3.1.6 Access Rules.................................. 43 3.1.7 Shapers..................................... 47 3.1.8 Default Language................................ 48 3.1.9 CAPTCHA................................... 48 3.1.10 STUN and TURN............................... 49 3.1.11 SIP....................................... 51 3.1.12 Include Additional Configuration Files.................... 52 3.1.13 Option Macros in Configuration File..................... 54 3.2 Database and LDAP Configuration.......................... 55 3.2.1 ODBC...................................... 56 3.2.2 LDAP...................................... 57 3.2.3 Riak....................................... 62 3.3 Modules Configuration................................. 64 3.3.1 Modules Overview............................... 64 3.3.2 Common Options................................ 66 3.3.3 mod announce .................................. 67 3.3.4 mod client state ............................... 69 3.3.5 mod disco .................................... 69 3.3.6 mod echo .................................... 71 3.3.7 mod fail2ban .................................. 72 3.3.8 mod http bind ................................. 72 CONTENTS 5 3.3.9 mod http fileserver ............................. 73 3.3.10 mod irc ..................................... 75 3.3.11 mod last .................................... 76 3.3.12 mod muc ..................................... 77 3.3.13 mod muc log .................................. 82 3.3.14 mod offline .................................. 84 3.3.15 mod ping .................................... 85 3.3.16 mod pres counter ............................... 86 3.3.17 mod privacy .................................. 86 3.3.18 mod private .................................. 87 3.3.19 mod proxy65 .................................. 88 3.3.20 mod pubsub ................................... 89 3.3.21 mod register .................................. 91 3.3.22 mod register web ............................... 94 3.3.23 mod roster ................................... 95 3.3.24 mod service log ................................ 96 3.3.25 mod shared roster .............................. 97 3.3.26 mod shared roster ldap ........................... 98 3.3.27 mod sic ..................................... 105 3.3.28 mod sip ..................................... 105 3.3.29 mod stats .................................... 107 3.3.30 mod time .................................... 107 3.3.31 mod vcard .................................... 108 3.3.32 mod vcard ldap ................................ 109 3.3.33 mod vcard xupdate .............................. 112 3.3.34 mod version .................................. 113 6 Contents 4 Managing an ejabberd Server 115 4.1 ejabberdctl ...................................... 115 4.1.1 ejabberdctl Commands............................ 115 4.1.2 Erlang Runtime System............................ 116 4.2 ejabberd Commands................................. 118 4.2.1 List of ejabberd Commands.......................... 118 4.2.2 Restrict Execution with AccessCommands.................. 120 4.3 Web Admin....................................... 122 4.4 Ad-hoc Commands................................... 124 4.5 Change Computer Hostname............................. 124 5 Securing ejabberd 127 5.1 Firewall Settings.................................... 127 5.2 epmd........................................... 127 5.3 Erlang Cookie...................................... 128 5.4 Erlang Node Name................................... 128 5.5 Securing Sensitive Files................................ 129 6 Clustering 131 6.1 How it Works...................................... 131 6.1.1 Router...................................... 131 6.1.2 Local Router.................................. 131 6.1.3 Session Manager................................ 132 6.1.4 s2s Manager................................... 132 6.2 Clustering Setup.................................... 132 6.3 Service Load-Balancing................................ 133 6.3.1 Domain Load-Balancing Algorithm...................... 133 6.3.2 Load-Balancing Buckets............................ 134 CONTENTS 7 7 Debugging 135 7.1 Log Files........................................ 135 7.2 Debug Console..................................... 136 7.3 Watchdog Alerts.................................... 137 A Internationalization and Localization 139 B Release Notes 141 C Acknowledgements 143 D Copyright Information 145 8 Contents Chapter 1 Introduction ejabberd is a free and open source instant messaging server written in Erlang/OTP1. ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication. ejabberd is designed to be a rock-solid and feature rich XMPP server. ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments. 1http://www.erlang.org/ 9 10 1. Introduction 1.1 Key Features ejabberd is: • Cross-platform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD. • Distributed: You can run ejabberd on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users. • Fault-tolerant: You can deploy an ejabberd cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced `on the fly’. • Administrator Friendly: ejabberd is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others be- cause everything is already included, and ready to run out of the box. Other administrator benefits include: { Comprehensive documentation. { Straightforward installers for Linux, Mac OS X, and Windows. { Web Administration. { Shared Roster Groups. { Command line administration tool. { Can integrate with existing authentication mechanisms. { Capability to send announce messages. • Internationalized: ejabberd leads in internationalization. Hence it is very well suited in a globalized world. Related features are: { Translated to 25 languages. { Support for IDNA2. • Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. { Fully XMPP compliant. { XML-based protocol. { Many protocols supported3. 2http://tools.ietf.org/html/rfc3490 3http://www.ejabberd.im/protocols 1.2 Additional Features 11 1.2 Additional Features Moreover, ejabberd comes with a wide range of other state-of-the-art features: • Modular { Load only the modules you want. { Extend ejabberd with your own custom modules. • Security { SASL and STARTTLS for c2s and s2s connections. { STARTTLS and Dialback s2s connections. { Web Admin accessible via HTTPS secure access. • Databases { Internal database for fast deployment (Mnesia). { Native MySQL support. { Native PostgreSQL support. { ODBC data storage support. { Microsoft SQL Server support. { Riak NoSQL database support. • Authentication { Internal Authentication. { PAM, LDAP, ODBC and Riak. { External Authentication script. • Others { Support for virtual hosting. { Compressing XML streams with Stream Compression (XEP-01384). { Statistics via Statistics Gathering (XEP-00395). { IPv6 support both for c2s and s2s connections. { Multi-User Chat6 module with support for clustering and HTML logging. { Users Directory based on users vCards. { Publish-Subscribe7 component with support for Personal Eventing via Pubsub8. { Support for web clients: HTTP Polling9 and HTTP Binding (BOSH)10 services. 4http://xmpp.org/extensions/xep-0138.html 5http://xmpp.org/extensions/xep-0039.html 6http://xmpp.org/extensions/xep-0045.html 7http://xmpp.org/extensions/xep-0060.html 8http://xmpp.org/extensions/xep-0163.html