{"id":11291,"date":"2018-02-07T08:12:14","date_gmt":"2018-02-07T13:12:14","guid":{"rendered":"https:\/\/www.contus.com\/blog\/?p=11291"},"modified":"2023-11-30T02:04:18","modified_gmt":"2023-11-30T07:04:18","slug":"install-erlang-ejabberd-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.contus.com\/blog\/install-erlang-ejabberd-on-ubuntu\/","title":{"rendered":"Procedure to Install, Setup Erlang &#038; Ejabberd XMPP Server on Ubuntu"},"content":{"rendered":"<style>\n.post-featured-img .single-title {position: absolute; bottom: 35px; margin: 0 auto; width: 100%; line-height: normal; font-size: 30px;}\n.content pre {color: #FFF;  background: #3c3f42 !important;border-color: #0295ff;border-style: solid;\nborder-width: 1px 1px 1px 6px;line-height: 1.5em;font-size: 0.9em;margin: 24px 0px;overflow-x: auto;\noverflow-y: hidden;padding: 10px 20px;word-wrap: break-word;}\n.article .blockdiv {background: #f5f5f5; padding: 14px 20px 1px 25px; margin-left: 15px; list-style-type:none;}\n.post-single-content .blockdiv li p {color: #757373; font-weight: 400; font-size: 16px;}\n<\/style>\n<h1 style=\"padding: 10px; text-align: center; margin: 30px 0 8px; font-size: 27px;\"><span style=\"color: #000;\">How to Install and Setup Erlang on Ubuntu?<\/span><\/h1>\n<style>\n.steps {font-weight: bold; background: #455BC7;padding: 3px 8px;font-size: 9pt;color: #fff;\nborder-radius: 5px;font-family: \"Lato\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;text-transform: uppercase;  margin-right: 8px;}\n.single-post-title {background-color: #2F49CA; padding: 3px 10px;}\n.post-featured-img {background-size: inherit; background-position: 0 0; text-shadow: 1px 1px 3px #424242;}\n<\/style>\n<p>Erlang is a general-purpose functional programming language and open source used for real-time scalability and high availability at the time of system requirement. It has inbuilt support for concurrency, distribution and fault tolerance. Erlang widely used in many industries like instant messaging, automobile, eCommerce, banking etc.<\/p>\n<p>The following steps are the installation procedure of Erlang in the Ubuntu server:<\/p>\n<p><strong class=\"steps\">STEP 1: <\/strong> <strong>Download the Erlang in the Ubuntu Server<\/strong>  <\/p>\n<p>In Linux server, download the Erlang source file using the below link. Here Erlang version of 18.0 is used and this extends the updates regularly. <\/p>\n<p>The wget command is used to download the Erlang source files. <\/p>\n<pre>$ wget http:\/\/erlang.org\/download\/otp_src_18.0.tar.gz<\/pre>\n<p><strong class=\"steps\">STEP 2: <\/strong> <strong>Extract the Erlang tar File<\/strong><\/p>\n<p>Extract the downloaded tar file using the command.<\/p>\n<pre>$ tar -xvzf otp_src_18.0.tar.gz<\/pre>\n<p><strong class=\"steps\">STEP 3: <\/strong>  <strong>Adding Dependencies in the Command<\/strong><\/p>\n<p>Provide the required dependencies in the single library function to perform a specific task. Below listed are the dependencies that will do a certain task.<\/p>\n<pre>$ sudo apt-get install gcc make build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev libwxbase3.0 libwxgtk3.0-dev libqt4-opengl-dev autoconf<\/pre>\n<p><strong class=\"steps\">STEP 4: <\/strong> <strong>Start Compilation and Install the Erlang<\/strong><\/p>\n<p>To compile the source code use \u201cmake\u201d command that starts to execute the file and finally install the Erlang using \u201cmake install\u201d on the Linux server. The configure command will help you to verify the dependencies. <\/p>\n<pre>$ sudo .\/configure \r\n$ sudo make\r\n$ sudo make install<\/pre>\n<p>The mentioned steps are the simple way to install the Erlang program on the Ubuntu Server.<\/p>\n<p style=\"background-color: #eaeaea; padding: 10px 10px 10px 15px;\" dir=\"ltr\">\nRead : <a href=\"https:\/\/www.contus.com\/blog\/how-whatsapp-works-technically-and-how-to-build-an-app-similar-to-it\/\" style=\"color: #0087ff;\"><strong><\/strong>How to Build Chat App like WhatsApp?<\/a><\/p>\n<h1 style=\"padding: 10px; text-align: center; margin: 30px 0 8px; font-size: 27px;\"><span style=\"color: #000;\">How to Install and Start Ejabberd XMPP Server on Ubuntu?<\/span><\/h1>\n<p>Ejabberd is an XMPP (Extensible Messaging Presence Protocol) programming server written using Erlang programming language.  One of the most popular open sources and free software.  Ejabberd runs on multiple operating systems like Linux, Mac, Unix, Windows etc. XMPP is the backbone that allows to send real-time messages, online presence indicators, XML routing features and more.<\/p>\n<p>Upcoming section will explain the installation of Ejabberd XMPP server on Ubuntu 14.04\/16.04 in detail.<\/p>\n<p><strong class=\"steps\">STEP 1: <\/strong>  <strong>Download the Ejabberd in the Ubuntu Server<\/strong>  <\/p>\n<p>In Linux server, download the Ejabberd source file using the below link. Here Ejabberd version of 16.08 is used and this extends the updates regularly. <\/p>\n<p>The wget command is used to download the Ejabberd source files. <\/p>\n<pre>$ wget https:\/\/www.process-one.net\/downloads\/ejabberd\/16.08\/ejabberd-16.08.tgz<\/pre>\n<p><strong class=\"steps\">STEP 2: <\/strong>  <strong>Extract the Ejabberd tar File<\/strong><\/p>\n<p>Extract the downloaded tar file using the command.<\/p>\n<pre>$ tar -xvzf ejabberd-16.08.tgz<\/pre>\n<p><strong class=\"steps\">STEP 3: <\/strong> <strong>Adding Dependencies in the Command<\/strong><\/p>\n<p>Provide the required dependencies in the single library function to perform a specific task. Below listed are the dependencies that will do a certain task.<\/p>\n<pre>$ sudo apt-get install rebar libyaml-dev libexpat1-dev<\/pre>\n<p><strong class=\"steps\">STEP 4: <\/strong> <strong>Fix and Verify the Issue<\/strong><\/p>\n<p>autogen.sh used for compilation, verification of the functionality and overcome the initial issues. <\/p>\n<pre>$ .\/autogen.sh<\/pre>\n<p><strong class=\"steps\">STEP 5: <\/strong>  <strong>Start Execution and Install the Ejabberd<\/strong><\/p>\n<p>To compile the source code use \u201cmake\u201d command that starts to execute the file and finally install the Erlang using \u201cmake install\u201d on the Linux server.  The configure command will help you to verify the dependencies. <\/p>\n<pre>$ sudo .\/configure \r\n$ sudo make\r\n$ sudo make install<\/pre>\n<p><strong class=\"steps\">STEP 6: <\/strong> <strong>Open the Ejabberd Configuration File<\/strong><\/p>\n<p>Using the command, open the Ejabberd file to set the database.<\/p>\n<pre>$ sudo nano \/etc\/ejabberd\/ejabberd.yml<\/pre>\n<p>If you need MySQL database follow the mention command to enable the IP, Database name, User name, Password.<\/p>\n<p>1) Comment the following lines in ejabberd.yml file<\/p>\n<ul class=\"blockdiv\">\n<p>#auth_method: internal<\/p>\n<\/ul>\n<p>2) Uncomment the following lines in ejabberd.yml file<\/p>\n<ul class=\"blockdiv\">\n<p>auth_method: sql<\/p>\n<p>sql_type: mysql<\/p>\n<p>sql_server: \u201c52.13.12.123\u2033 (Mysql Database IP)<\/p>\n<p>sql_database: \u201cdatabasename\u201d (Database name)<\/p>\n<p>sql_username: \u201croot\u201d (Database user name)<\/p>\n<p>sql_password: \u201cpassword\u201d (Database password)<\/p>\n<\/ul>\n<p>Finally, save the file  \/etc\/ejabberd\/ejabberd.yml<\/p>\n<p><strong class=\"steps\">STEP 7: <\/strong> <strong>Run the Ejabberd<\/strong> <\/p>\n<p>Once the changes are done, run the Ejabberd which in turn helps to refresh the database. <\/p>\n<pre>$ sudo ejabberdctl start<\/pre>\n<p><strong class=\"steps\">STEP 8: <\/strong>  <strong>Check the Status using Local Host<\/strong> <\/p>\n<p>To verify and to check the status of the ejabberd installation use the below command. <\/p>\n<pre>$ sudo ejabberdctl status<\/pre>\n<p>The node Ejabberd at Localhost starts with the status command and shows the <span style=\"font-style: italic; font-weight: bold;\">ejabberd 16.08<\/span> is running<\/p>\n<p>Using a localhost IP <span style=\"font-style: italic; font-weight: bold;\">http:\/\/localhost:5222<\/span> the browser displays the XML.<\/p>\n<p><?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http:\/\/etherx.jabber.org\/streams' id='8950494058014700453' from='192.168.1.164' version='1.0'><stream:error><xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'><\/xml-not-well-formed><\/stream:error><\/stream:stream><\/p>\n<p>The above steps are easy ways to install and start running the Ejabberd program in XMPP on the Ubuntu.<\/p>\n<p>After the installation of Ejabberd, use the open source XMPP client libraries for Web &#8211; strophe JS, Android &#8211; Smack JAVA, and iOS &#8211; Robbiehanson for developing the chat application. <\/p>\n<p>In order to build and implement a messaging app, various features are required such as One to One chat, group chat, audio\/video calling and much more. Try Contus Fly to avoid complexity in <a href=\"https:\/\/www.contus.com\/messaging-solutions.php?utm_source=Erlang Ejabberd&#038;utm_medium=CTA&#038;utm_campaign=Blog\">building a chat app<\/a> on your own. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Install and Setup Erlang on Ubuntu? Erlang is a general-purpose functional programming language and open source used for real-time scalability and high availability at the time of system requirement. It has inbuilt support for concurrency, distribution and fault tolerance. Erlang widely used in many industries like instant messaging, automobile, eCommerce, banking etc. The [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":11317,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_stopmodifiedupdate":false,"_modified_date":"","_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[1902],"tags":[],"class_list":["post-11291","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-communication"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/posts\/11291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/comments?post=11291"}],"version-history":[{"count":1,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/posts\/11291\/revisions"}],"predecessor-version":[{"id":30867,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/posts\/11291\/revisions\/30867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/media\/11317"}],"wp:attachment":[{"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/media?parent=11291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/categories?post=11291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.contus.com\/blog\/wp-json\/wp\/v2\/tags?post=11291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}