- Setup ejabber ================ 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.
See for more details about ejabber: https://git.process-one.net/ejabberd/mainline/blobs/raw/v2.1.11/doc/guide.html
-
Download ejabber.
wget http://www.process-one.net/downloads/ejabberd/2.1.11/ejabberd-2.1.11-linux-x86_64-installer.run.gz
gzip -d ejabberd-2.1.11-linux-x86_64-installer.run.gz
or
gunzip ejabberd-2.1.11-linux-x86_64-installer.run.gz
-
Install ejabber.
chmod +x ejabberd-2.1.11-linux-x86_64-installer.run
./ejabberd-2.1.11-linux-x86_64-installer.run
domain - beanstockjabber
-
Check domain for test and development environment in config/config.yml file
-
add
{registration_timeout, infinity}.
to conf/ejabberd.cfg -
Start ejabber and check status in bin folder.
./ejabberdctl start
./ejabberdctl status
-
Log into admin ejabber http://localhost:5280/admin
You may log in as [AdminUser]@[domain] followed by the password
Also see http://metajack.im/2010/02/04/screencast-setting-up-ejabberd/
-
XMPP ======= The Extensible Messaging and Presence Protocol (XMPP) is an open technology for real-time communication, which powers a wide range of applications including instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data. Also see http://xmpp.org/about-xmpp/
-
Setup orbited ================ Orbited provides a pure JavaScript/HTML socket in the browser. It is a web router and firewall that allows you to integrate web applications with arbitrary back-end systems.
-
download from http://pypi.python.org/pypi/orbited/0.7.10
-
Ensure that you have python 2.5 or higher installed in your system. Most linux and OS X systems come with Python pre-installed. You can check by
$ python
-
sudo apt-get install python-setuptools
-
sudo apt-get install python-twisted
-
sudo apt-get install python-dev
-
sudo apt-get install build-essential
-
sudo python setup.py install
-
create orbited.cfg in /etc folder
[global] # reactor=select # reactor=kqueue reactor=epoll proxy.enabled=1 session.ping_interval = 40 session.ping_timeout = 30 # once the sockets are open, orbited will drop its privileges to this user. user=admin [listen] http://:8000 # uncomment to enable SSL on port 8043 using given .key and .crt files #https://:8043 # #[ssl] #key=orbited.key #crt=orbited.crt #chain=orbited.chain [static] [access] #localhost:8000 -> irc.freenode.net:6667 10.0.0.119:8000 -> 10.0.0.119:5222
change name of user to correct name
-
Orbited will listen to all incoming requests at port 8000 and communicate with port 5222 with XMPP
-
type
orbited
in console -
you should run your server in browser using your ip and port, instead of localhost:3000
-
usefull links: http://www.webmasters.am/blog/installing-orbited-without-python-25/javascript/2009/10/ http://www.webmasters.am/blog/setting-up-orbited-server-irc-chat-example/javascript/2009/10/
Gentoo tips: emerge dev-python/twisted easy_install orbited==0.7.10
-
Setup Xmpp4r gem =================== We should use Rails with the xmpp4r gem which is a wrapper over the standard XML that XMPP/Jabber/Ejabberd uses, thus allowing us to work with Ruby rather than generate XML. Gemfile gem 'xmpp4r' bundle install http://home.gna.org/xmpp4r/ http://www.rubyfleebie.com/im-integration-with-xmpp4r/ http://www.rubyfleebie.com/im-integration-with-xmpp4r-part-2/ http://www.rubyfleebie.com/im-integration-with-xmpp4r-2-mistakes-to-avoid/
-
Useful materials =================== http://siddharth-ravichandran.com/2011/01/21/multiuser-chat-using-xmpp-and-orbited-using-ruby-on-rails/# http://devblog.famundo.com/articles/2006/10/14/ruby-and-xmpp-jabber-part-2-logging-in-and-sending-simple-messages https://github.com/supersid/FireDemon