SlideShare une entreprise Scribd logo
1  sur  15
Ejabberd with XMPP
Written By: Prem Narain
Introduction: ejabberd
ejabberd is a free and open source instant messaging server written in Erlang/OTP.
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.
Ejabberd is developed by ProcessOne and written by Alexey Shchepin under the
licence of GNU.
2
Features: ejabberd
Cross-platform: ejabberd runs under Microsoft Windows and Unix derived systems
such as Linux, FreeBSD and NetBSD.
Open Standards: ejabberd is the first Open Source Jabber server claiming to fully
comply to the XMPP standard.
Authentication:
a)Internal Authentication.
b)PAM, LDAP and ODBC.
c) External Authentication script
Ejabberd can communicate with other XMPP servers and with non-XMPP instant
messaging networks as well, using a special type of XMPP component called
transport or gateway.
3
Others:
Support for virtual hosting.
Compressing XML streams with Stream Compression (XEP-0138).
Statistics via Statistics Gathering (XEP-0039).
IPv6 support both for c2s and s2s connections.
Multi-User Chat module with support for clustering and HTML logging.
Users Directory based on users vCards.
Publish-Subscribe component with support for Personal Eventing via Pubsub.
Support for web clients: HTTP Polling and HTTP Binding (BOSH) services.
4
Introduction: XMPP
Extensible Messaging and Presence Protocol (XMPP) is a communications
protocol for message-oriented middleware based on XML (Extensible Markup
Language).
XMPP powers a wide range of applications including instant messaging, multi-
user chat, voice and video conferencing, collaborative spaces, real-time gaming,
data synchronization, and even search.
XMPP, like all protocols, defines a format for moving data between two or more
communicating entities.One major feature XMPP gets by using XML is XML’s
extensibility. It is extremely easy to add new features to the protocol that are both
backward and forward compatible.
5
Pros and Cons: XMPP
Pros: XMPP has the following Pros over HTTP
➤ Enables pushing data, not just pulling
➤ Firewall friendly
➤ Strong authentication and security
➤ Provides many out-of-the-box tools for solving a wide range of problems
Cons: XMPP has the following Cons which are
➤ Stateful protocol
➤ Community and deployments are not as broad as HTTP
➤ More overhead than HTTP for simple chores
➤ Specialized implementations still needed
6
Uses of XMPP
● Instant Messaging
● Internet of Things (IoT)
● Social (like Movim,Jappix)
● WebRTC
XMPP Session Life Cycle
● Connection
● Stream Set Up
● Authentication
● The Session Body
● Disconnection
7
Installation: ejabberd
On Ubuntu/Debian : For installing ejabberd first go to superuser mode then write
apt-get install -y ejabberd
On Windows : Browse
https://www.process-one.net/en/ejabberd/archive/
And download latest window installer .exe file and install it.
8
Setup and Configuration: ejabberd
For Setup Admin User
ejabberdctl register admin localhost password
Give Admin Privileges
Go to configuration file (vi /etc/ejabberd/ejabberd.cfg) as superuser and type
following lines as
%% Admin user
{acl, admin, {user, "admin", "localhost"}}.
%% Hostname
{hosts, ["localhost"]}.
9
Restart Ejabberd
Service ejabberd restart
Now you can navigate to your eJabberd Web Admin interface on droplet's IP
address port 5280
http://yourserverhostIP:5280_or_localhost:5280/admin
Enter username as admin@localhost and your password then ejabberd admin
interface will start there will 5 items list at left corner as
● Access Control list
● Access Rules
● Virtual Hosts
● Nodes
● Statistics 10
For Add New User
Virtual host Hosts Users Add New User details Submit
For Add New Host
Go to configuration file (vi /etc/ejabberd/ejabberd.cfg) and edit %%Hostname as
%% Hostname
{hosts, ["localhost","yourhostIP"]}.
Now restart ejabberd while you will go to virtual host,there will be two hosts one is
localhost another is that one which you did edit,like as you can add multiple hosts
and users in individual host as described above.
11
Ejabberd file and directories structure
/etc/ejabberd/ Configuration Directory
ejabberd.yml ejabberd configuration file
ejabberd.cfg configuration file on the administration
script
inetrc network DNS file
/lib/ejabberd/
ebin/ erlang binary files (*.beam)
include/ erlang header files (*.hrl)
priv/ additional file required at runtime
bin/ executable programs
lib/ binary system libraries (*.so)
msgs/ translation files (*.msgs)
12
lib/ejabberd/sbin/ejabberdctl Administration script
lib/ejabberd/share/doc/ejabberd Documentation of ejabberd
/var/lib/ejabberd/ Spool directory
.erlang.cookie erlang cookie file
.acl.DCD Mnesia database spool files
/var/log/ejabberd/ Log Directory
ejabberd.log ejabberd service log
erlang.log erlang/OTP system log
13
References
http://xmpp.org/
http://ejabberd.im/
For installation Guide
For Windows
http://sharepointtaskmaster.blogspot.in/2013/10/web-chat-with-ejabberd-xmpp-server-step.html
For Ubuntu:
https://www.digitalocean.com/community/tutorials/how-to-install-ejabberd-xmpp-server-on-ubuntu
14
15

Contenu connexe

Tendances

Tendances (20)

introduction about TCP/IP
introduction about TCP/IPintroduction about TCP/IP
introduction about TCP/IP
 
Software Defined Networking - 2
Software Defined Networking - 2Software Defined Networking - 2
Software Defined Networking - 2
 
Getting the most out of the Aruba Policy Enforcement Firewall
Getting the most out of the Aruba Policy Enforcement FirewallGetting the most out of the Aruba Policy Enforcement Firewall
Getting the most out of the Aruba Policy Enforcement Firewall
 
Api security
Api security Api security
Api security
 
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOSPart 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
 
Open Source MANO(OSM)
Open Source MANO(OSM)Open Source MANO(OSM)
Open Source MANO(OSM)
 
Introducing TR-069 - An Axiros Workshop for the TR-069 Protocol - Part 1
Introducing TR-069 - An Axiros Workshop for the TR-069 Protocol - Part 1Introducing TR-069 - An Axiros Workshop for the TR-069 Protocol - Part 1
Introducing TR-069 - An Axiros Workshop for the TR-069 Protocol - Part 1
 
VLAN Network for Extreme Networks
VLAN Network for Extreme NetworksVLAN Network for Extreme Networks
VLAN Network for Extreme Networks
 
Cn ipv4 addressing
Cn ipv4 addressingCn ipv4 addressing
Cn ipv4 addressing
 
MPLS Concepts and Fundamentals
MPLS Concepts and FundamentalsMPLS Concepts and Fundamentals
MPLS Concepts and Fundamentals
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
A very good introduction to IPv6
A very good introduction to IPv6A very good introduction to IPv6
A very good introduction to IPv6
 
OSPF v3
OSPF v3OSPF v3
OSPF v3
 
Moodle tanıtımı ve kurulumu
Moodle tanıtımı ve kurulumuMoodle tanıtımı ve kurulumu
Moodle tanıtımı ve kurulumu
 
Selenium locators: ID, Name, xpath, CSS Selector advance methods
Selenium locators: ID, Name,  xpath, CSS Selector advance methodsSelenium locators: ID, Name,  xpath, CSS Selector advance methods
Selenium locators: ID, Name, xpath, CSS Selector advance methods
 
How to set up Windows Mail accounts
How to set up Windows Mail accountsHow to set up Windows Mail accounts
How to set up Windows Mail accounts
 
Openstack Neutron & Interconnections with BGP/MPLS VPNs
Openstack Neutron & Interconnections with BGP/MPLS VPNsOpenstack Neutron & Interconnections with BGP/MPLS VPNs
Openstack Neutron & Interconnections with BGP/MPLS VPNs
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGP
 
Dhcp
DhcpDhcp
Dhcp
 
Mpls
MplsMpls
Mpls
 

Similaire à Ejabberd with xmpp

Messaging With Erlang And Jabber
Messaging With  Erlang And  JabberMessaging With  Erlang And  Jabber
Messaging With Erlang And Jabber
l xf
 
Presentation 1
Presentation 1Presentation 1
Presentation 1
aisadhsa
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
Yaniv Uriel
 
HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
jarfield
 
Os Saintandre
Os SaintandreOs Saintandre
Os Saintandre
oscon2007
 

Similaire à Ejabberd with xmpp (20)

Messaging With Erlang And Jabber
Messaging With  Erlang And  JabberMessaging With  Erlang And  Jabber
Messaging With Erlang And Jabber
 
A vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF MeetupA vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF Meetup
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
 
Nimbuzz march2012
Nimbuzz march2012Nimbuzz march2012
Nimbuzz march2012
 
Survey on Client Tools, Server and Communication types
Survey on Client Tools, Server and Communication typesSurvey on Client Tools, Server and Communication types
Survey on Client Tools, Server and Communication types
 
Ravi kumar
Ravi kumarRavi kumar
Ravi kumar
 
Net druid new presentation
Net druid new presentationNet druid new presentation
Net druid new presentation
 
Presentation 1
Presentation 1Presentation 1
Presentation 1
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
 
Rhel7 vs rhel6
Rhel7 vs rhel6Rhel7 vs rhel6
Rhel7 vs rhel6
 
Net Druid Presentation
Net Druid PresentationNet Druid Presentation
Net Druid Presentation
 
Net Druid Presentation
Net Druid PresentationNet Druid Presentation
Net Druid Presentation
 
Net Druid Presentation
Net Druid PresentationNet Druid Presentation
Net Druid Presentation
 
HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
 
ARMITAGE-THE CYBER ATTACK MANAGEMENT
ARMITAGE-THE CYBER ATTACK MANAGEMENTARMITAGE-THE CYBER ATTACK MANAGEMENT
ARMITAGE-THE CYBER ATTACK MANAGEMENT
 
Xmpp and java
Xmpp and javaXmpp and java
Xmpp and java
 
Os Saintandre
Os SaintandreOs Saintandre
Os Saintandre
 
Secure Communications with Jabber
Secure Communications with JabberSecure Communications with Jabber
Secure Communications with Jabber
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelOpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
 
Frequently Used Terms Related to cPanel
Frequently Used Terms Related to cPanelFrequently Used Terms Related to cPanel
Frequently Used Terms Related to cPanel
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Ejabberd with xmpp

  • 1. Ejabberd with XMPP Written By: Prem Narain
  • 2. Introduction: ejabberd ejabberd is a free and open source instant messaging server written in Erlang/OTP. 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. Ejabberd is developed by ProcessOne and written by Alexey Shchepin under the licence of GNU. 2
  • 3. Features: ejabberd Cross-platform: ejabberd runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD. Open Standards: ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. Authentication: a)Internal Authentication. b)PAM, LDAP and ODBC. c) External Authentication script Ejabberd can communicate with other XMPP servers and with non-XMPP instant messaging networks as well, using a special type of XMPP component called transport or gateway. 3
  • 4. Others: Support for virtual hosting. Compressing XML streams with Stream Compression (XEP-0138). Statistics via Statistics Gathering (XEP-0039). IPv6 support both for c2s and s2s connections. Multi-User Chat module with support for clustering and HTML logging. Users Directory based on users vCards. Publish-Subscribe component with support for Personal Eventing via Pubsub. Support for web clients: HTTP Polling and HTTP Binding (BOSH) services. 4
  • 5. Introduction: XMPP Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for message-oriented middleware based on XML (Extensible Markup Language). XMPP powers a wide range of applications including instant messaging, multi- user chat, voice and video conferencing, collaborative spaces, real-time gaming, data synchronization, and even search. XMPP, like all protocols, defines a format for moving data between two or more communicating entities.One major feature XMPP gets by using XML is XML’s extensibility. It is extremely easy to add new features to the protocol that are both backward and forward compatible. 5
  • 6. Pros and Cons: XMPP Pros: XMPP has the following Pros over HTTP ➤ Enables pushing data, not just pulling ➤ Firewall friendly ➤ Strong authentication and security ➤ Provides many out-of-the-box tools for solving a wide range of problems Cons: XMPP has the following Cons which are ➤ Stateful protocol ➤ Community and deployments are not as broad as HTTP ➤ More overhead than HTTP for simple chores ➤ Specialized implementations still needed 6
  • 7. Uses of XMPP ● Instant Messaging ● Internet of Things (IoT) ● Social (like Movim,Jappix) ● WebRTC XMPP Session Life Cycle ● Connection ● Stream Set Up ● Authentication ● The Session Body ● Disconnection 7
  • 8. Installation: ejabberd On Ubuntu/Debian : For installing ejabberd first go to superuser mode then write apt-get install -y ejabberd On Windows : Browse https://www.process-one.net/en/ejabberd/archive/ And download latest window installer .exe file and install it. 8
  • 9. Setup and Configuration: ejabberd For Setup Admin User ejabberdctl register admin localhost password Give Admin Privileges Go to configuration file (vi /etc/ejabberd/ejabberd.cfg) as superuser and type following lines as %% Admin user {acl, admin, {user, "admin", "localhost"}}. %% Hostname {hosts, ["localhost"]}. 9
  • 10. Restart Ejabberd Service ejabberd restart Now you can navigate to your eJabberd Web Admin interface on droplet's IP address port 5280 http://yourserverhostIP:5280_or_localhost:5280/admin Enter username as admin@localhost and your password then ejabberd admin interface will start there will 5 items list at left corner as ● Access Control list ● Access Rules ● Virtual Hosts ● Nodes ● Statistics 10
  • 11. For Add New User Virtual host Hosts Users Add New User details Submit For Add New Host Go to configuration file (vi /etc/ejabberd/ejabberd.cfg) and edit %%Hostname as %% Hostname {hosts, ["localhost","yourhostIP"]}. Now restart ejabberd while you will go to virtual host,there will be two hosts one is localhost another is that one which you did edit,like as you can add multiple hosts and users in individual host as described above. 11
  • 12. Ejabberd file and directories structure /etc/ejabberd/ Configuration Directory ejabberd.yml ejabberd configuration file ejabberd.cfg configuration file on the administration script inetrc network DNS file /lib/ejabberd/ ebin/ erlang binary files (*.beam) include/ erlang header files (*.hrl) priv/ additional file required at runtime bin/ executable programs lib/ binary system libraries (*.so) msgs/ translation files (*.msgs) 12
  • 13. lib/ejabberd/sbin/ejabberdctl Administration script lib/ejabberd/share/doc/ejabberd Documentation of ejabberd /var/lib/ejabberd/ Spool directory .erlang.cookie erlang cookie file .acl.DCD Mnesia database spool files /var/log/ejabberd/ Log Directory ejabberd.log ejabberd service log erlang.log erlang/OTP system log 13
  • 14. References http://xmpp.org/ http://ejabberd.im/ For installation Guide For Windows http://sharepointtaskmaster.blogspot.in/2013/10/web-chat-with-ejabberd-xmpp-server-step.html For Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-install-ejabberd-xmpp-server-on-ubuntu 14
  • 15. 15

Notes de l'éditeur

  1. Version 1.0 Thanks for Viewing.