On the slave node, start an ejabberd live shell: /etc/init.d/ejabberd live We are now going to join the cluster node to the master node. You can find more info on the module here: Now check if it succeeded: ls | grep easy_cluster.beam Save it and compile it into a working erlang module: cd /usr/lib/ejabberd/ebin/ Mnesia:change_table_copy_type(schema, node(), disc_copies), Io:format("server could NOT be reached.~n") Less errors: vim /usr/lib/ejabberd/ebin/easy_cluster.erlĪdd the following contents: -module(easy_cluster).Ĭase net_adm:ping(MasterNode) of 'pong' -> You can also execute the commands in the erlangįunctions itself on an erlang debug shell, but I find this easier and it gives This is a very small module which adds an erlang shell command to make theĬluster addition easier. We are now going to add and compile an erlang module, the easy_cluster module. Now remove all the mnesia tables: rm /var/lib/ejabberd/*Ĭopy the cookie from the ejabberd master node, either by cat and vim or viaĮcho "HFHHGYYEHF362GG1GF" > /var/lib/ejabberd/.okieĬhown ejabberd:ejabberd /var/lib/ejabberd/.okie If you use ejabberd internally then use the primary NIC address. vim /etc/ejabberd/ejabberd.cfgįirst we are going to add our chat domain name: Also, every config optionĮnds with a dot (.). Is erlang config, so comments are not # but %%. Now use your favorite text editor to edit the config files. We are going to configure the ejabberd service. You will also install a few dependencies for the erlang runtime. This is simple, use your package manager to install ejabberd: apt-get install ejabberd Want to set up a cluster, then also follow this part and continue with the next noĬlustering, then follow only this part and the DNS part of the tutorial. If you want to set up a single node installation of ejabberd, e.g. Single node / master node ejabberd installation This tutorial uses the domain as the chat domain, and the serverĬ as the xmpp server domain. The erlang source but that is not covered in this tutorial. It also works on Windows Server 2012 with the ejabberd compiled from This setup is tested on Debian 7, Ubuntu 12.04 and 10.04 and OS X 10.8 Server,Īll running ejabberd installed via the package manager, either apt or XMPP is an awesome and extendible protocol, on which you can find more here: I've got aĮjabberd cluster running for a client consisting of 4 Debian 7 VM's (2GB RAMĮach) spread over 3 sites and 1 datacenter, serving 12000 total users and most Or you might be a sysadmin in need of an internal chat solution. That big players like Facebook, WhatsApp and Google (used) to use XMPP as their Pidgin, Psi+, Empathy, Adium, iChat/Messages or Miranda IM.Īnd on Android you can use Xabber, Beem or OneTeam. You might want to use awesome multi-account chatting applications like Turn ofĮjabberd logging and use Off The Record which gives you full privacy (and Or you might want to have more control over the logging of your data. Protocol which is widely supported, not being locked in to google specific Gmail chat contacts you can keep chatting to them. Recently changed and it is going to drop XMPP compatibility. You might use Google Talk or as it now is named Hangouts. There are a few reasons to set up your own XMPP server. With this referral link you'll get $100 credit for 60 days. You can also sponsor me by getting a Digital Ocean VPS. It means the world to me if you show your appreciation and you'll help pay the server costs. Go check it out!Ĭonsider sponsoring me on Github. I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Please, if you found this content useful, consider a small donation using any of the options below: Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. It covers a basic single node ejabberd server and also the setup of anĮjabberd cluster, including errors and DNS SRV record examples. This tutorial shows you how to set up your own federated chat network usingĮjabberd.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |