0209.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install OpenFire Debian/Ubuntu Self-Hosted Instant Messaging Server</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Instant Messaging,Pidgin,Self-Hosted,IM,XMPP,OpenFire,LAN">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install OpenFire Debian/Ubuntu Self-Hosted Instant Messaging Server">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  12. <script type="text/javascript">
  13. $(function(){
  14. $('textarea').each(function(i,e){
  15. theTextarea = $(this);
  16. theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
  17. });
  18. $('li').each(function(i,e){
  19. if(!$(this).hasClass('noCheckbox')){
  20. var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
  21. $(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
  22. $(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
  23. }
  24. });
  25. $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
  26. theElement = $(this);
  27. var lines = theElement.html().split("\n");
  28. theElement.empty();
  29. for(l=0;l<lines.length;l++){
  30. if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
  31. theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ $.trim(lines[l].replace(/"/g, '&quot;')) +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
  32. } else {
  33. theElement.append(lines[l]);
  34. }
  35. }
  36. });
  37. $(document).on('click','input.copy-text',function(){
  38. theButton = $(this);
  39. $('input.copy-text').attr('src','images/clipboard.png');
  40. $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
  41. try {
  42. if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
  43. $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
  44. } else if($('#'+ theButton.attr('rel')).parent('div').hasClass('CMD')){
  45. $('#'+ theButton.attr('rel')).addClass('copy-animation-cmd');
  46. } else {
  47. $('#'+ theButton.attr('rel')).addClass('copy-animation');
  48. }
  49. navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
  50. theButton.attr('src','images/clipboard_active.png');
  51. } catch(err) {
  52. }
  53. return false;
  54. });
  55. $(document).on('click','input.completeBox',function(){
  56. theBox = $(this);
  57. $('#'+ theBox.attr('rel')).addClass('strikethrough');
  58. theBox.prop('disabled',true);
  59. theBox.parent('li').prevAll().each(function(i,e){
  60. theLI = $(this);
  61. if(theLI.find('input[type=checkbox]').not(':checked')){
  62. $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
  63. theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
  64. }
  65. });
  66. });
  67. if(window.self !== window.top){
  68. window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
  69. }
  70. });
  71. </script>
  72. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  73. </head>
  74. <body>
  75. <div id="gridContainer">
  76. <div class="topMargin"></div>
  77. <div id="listName" class="topMargin">
  78. <h1>Install OpenFire Debian/Ubuntu Self-Hosted Instant Messaging Server</h1>
  79. </div>
  80. <div></div>
  81. <div id="content">
  82. <h2>XMPP Server Download and Installation</h2>
  83. <ol>
  84. <li>Log into the Ubuntu/Debian device</li>
  85. <li>Run the following commands in terminal:<br />
  86. <code class="codeBlock"># update software repositories<br />
  87. sudo apt update<br />
  88. # install available software updates<br />
  89. sudo apt upgrade<br />
  90. # download OpenFire installer<br />
  91. wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_4.5.2_all.deb -O openfire.deb<br />
  92. # execute the installer<br />
  93. sudo apt install ./openfire.deb<br />
  94. # start the OpenFire service<br />
  95. sudo systemctl enable --now openfire<br />
  96. # install MySQL/MariaDB<br />
  97. sudo apt install mariadb-server<br />
  98. # configure the MySQL database<br />
  99. sudo su<br />
  100. mysql_secure_installation</code></li>
  101. <li>Press Enter to login as root</li>
  102. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  103. <li>Type Y and press Enter to remove anonymous users</li>
  104. <li>Type Y and press Enter to disallow root login remotely</li>
  105. <li>Type Y and press Enter to remove the test database</li>
  106. <li>Type Y and press Enter to reload privilege tables</li>
  107. <li>Run the following command to login into MySQL: <code class="codeBlock">mysql -u root</code></li>
  108. <li>Authenticate with the root password set earlier</li>
  109. <li>Run the following commands to create the OpenFire database and database user<br />
  110. <code class="codeBlock">MariaDB [(none)]&gt; CREATE DATABASE openfire;<br />
  111. MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON openfire.* TO openfire@localhost IDENTIFIED BY &#39;0p3nF1re!!&#39;;<br />
  112. MariaDB [(none)]&gt; FLUSH PRIVILEGES;<br />
  113. MariaDB [(none)]&gt; USE openfire;<br />
  114. MariaDB [(none)]&gt; source /usr/share/openfire/resources/database/openfire_mysql.sql;<br />
  115. MariaDB [(none)]&gt; QUIT;</code></li>
  116. <li>Open a web browser and open to http://localhost:9090/setup/index.jsp</li>
  117. <li>Select a language &gt; Click Continue</li>
  118. <li>Set the XMPP domain name and input the server fully qualified domain name &gt; Click Continue</li>
  119. <li>Select Standard Database Connection &gt; Click Continue</li>
  120. <li>Enter the following database parameters:
  121. <p>Database Driver Presets:MySQL<br />
  122. JDBC Driver Class: com.mysql.jdbc.Driver<br />
  123. Database URL: jdbc:mysql://127.0.0.1:3306/openfire?rewriteBatchedStatements=true&amp;characterEncoding=UTF-8&amp;characterSetResults=UTF-8&amp;serverTimezone=UTC<br />
  124. Username: openfire<br />
  125. Password: 0p3nF1re!!</p>
  126. </li>
  127. <li>Select Default on the Profile Settings page &gt; Click Continue</li>
  128. <li>Input an admin email address and password &gt; Click Continue</li>
  129. <li>Click the Login to the admin console button</li>
  130. <li>Login with username admin and the password created previously</li>
  131. <li>Click the Users/Groups tab</li>
  132. <li>Click Create New User in the left navigation menu</li>
  133. <li>Create a username and password for the new user</li>
  134. <li>Follow the steps to create as many users as needed, at least 2 are needed for testing</li>
  135. </ol>
  136. <h2>Setting Up A XMPP Client</h2>
  137. <ol>
  138. <li>Run the following command in terminal:<br />
  139. <code class="codeBlock">sudo apt install pidgin</code></li>
  140. <li>Launch Pidgin</li>
  141. <li>Click Add...</li>
  142. <li>Select XMPP from the protocol dropdown</li>
  143. <li>Input the first username created above along with the XMPP domain setup in OpenFire and the user&#39;s password</li>
  144. <li>Click the Advanced tab &gt; Select Use encryption if available from the Connection security dropdown</li>
  145. <li>Enter the OpenFire fully qualified server name in the server field</li>
  146. <li>Click the Add button</li>
  147. <li>Click Accept on the self-signed certificate popup</li>
  148. <li>Copy the extracted Pidgin Portable folder to another device</li>
  149. <li>Launch Pidgin Portable on the second device</li>
  150. <li>Select Modify Account</li>
  151. <li>Update the username and password to be a different account from the previous device</li>
  152. <li>From one of the devices, select Buddies &gt; Add Buddy</li>
  153. <li>Input the opposite devices&#39;s username</li>
  154. <li>On the second device accept the message request and the two devices should be able to send and receive instant messages using the OpenFire XMPP server</li>
  155. </ol>
  156. </div>
  157. </div>
  158. </body>
  159. </html>