0209.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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,Browser Based,Home Lab,Home Lab Ideas,Install Guide,Web Based,Web Based Tools,Chat,Chat Server,Host Your Own IM Server,Secure Communication,OpenFire Server,Java,Instant Messager,Install XMPP Server On Linux,Install OpenFire On Linux,How To Install OpenFire XMPP Server On Linux,How To Host Instant Messenger Server,How To,Tutorial,i12bretro">
  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. <meta name="revised" content="05/25/2022 07:12:37 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Install OpenFire Debian/Ubuntu Self-Hosted Instant Messaging Server</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>XMPP Server Download and Installation</h2>
  26. <ol>
  27. <li>Log into the Ubuntu/Debian device</li>
  28. <li>Run the following commands in terminal:<br />
  29. <code class="codeBlock"># update software repositories<br />
  30. sudo apt update<br />
  31. # install available software updates<br />
  32. sudo apt upgrade<br />
  33. # download OpenFire installer<br />
  34. wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_4.5.2_all.deb -O openfire.deb<br />
  35. # execute the installer<br />
  36. sudo apt install ./openfire.deb<br />
  37. # start the OpenFire service<br />
  38. sudo systemctl enable --now openfire<br />
  39. # install MySQL/MariaDB<br />
  40. sudo apt install mariadb-server<br />
  41. # configure the MySQL database<br />
  42. sudo su<br />
  43. mysql_secure_installation</code></li>
  44. <li>Press Enter to login as root</li>
  45. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  46. <li>Type Y and press Enter to remove anonymous users</li>
  47. <li>Type Y and press Enter to disallow root login remotely</li>
  48. <li>Type Y and press Enter to remove the test database</li>
  49. <li>Type Y and press Enter to reload privilege tables</li>
  50. <li>Run the following command to login into MySQL: <code class="codeBlock">mysql -u root</code></li>
  51. <li>Authenticate with the root password set earlier</li>
  52. <li>Run the following commands to create the OpenFire database and database user<br />
  53. <code class="codeBlock">MariaDB [(none)]&gt; CREATE DATABASE openfire;<br />
  54. MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON openfire.* TO openfire@localhost IDENTIFIED BY &#39;0p3nF1re!!&#39;;<br />
  55. MariaDB [(none)]&gt; FLUSH PRIVILEGES;<br />
  56. MariaDB [(none)]&gt; USE openfire;<br />
  57. MariaDB [(none)]&gt; source /usr/share/openfire/resources/database/openfire_mysql.sql;<br />
  58. MariaDB [(none)]&gt; QUIT;</code></li>
  59. <li>Open a web browser and open to http://localhost:9090/setup/index.jsp</li>
  60. <li>Select a language &gt; Click Continue</li>
  61. <li>Set the XMPP domain name and input the server fully qualified domain name &gt; Click Continue</li>
  62. <li>Select Standard Database Connection &gt; Click Continue</li>
  63. <li>Enter the following database parameters:
  64. <p>Database Driver Presets:MySQL<br />
  65. JDBC Driver Class: com.mysql.jdbc.Driver<br />
  66. Database URL: jdbc:mysql://127.0.0.1:3306/openfire?rewriteBatchedStatements=true&amp;characterEncoding=UTF-8&amp;characterSetResults=UTF-8&amp;serverTimezone=UTC<br />
  67. Username: openfire<br />
  68. Password: 0p3nF1re!!</p>
  69. </li>
  70. <li>Select Default on the Profile Settings page &gt; Click Continue</li>
  71. <li>Input an admin email address and password &gt; Click Continue</li>
  72. <li>Click the Login to the admin console button</li>
  73. <li>Login with username admin and the password created previously</li>
  74. <li>Click the Users/Groups tab</li>
  75. <li>Click Create New User in the left navigation menu</li>
  76. <li>Create a username and password for the new user</li>
  77. <li>Follow the steps to create as many users as needed, at least 2 are needed for testing</li>
  78. </ol>
  79. <h2>Setting Up A XMPP Client</h2>
  80. <ol>
  81. <li>Run the following command in terminal:<br />
  82. <code class="codeBlock">sudo apt install pidgin</code></li>
  83. <li>Launch Pidgin</li>
  84. <li>Click Add...</li>
  85. <li>Select XMPP from the protocol dropdown</li>
  86. <li>Input the first username created above along with the XMPP domain setup in OpenFire and the user&#39;s password</li>
  87. <li>Click the Advanced tab &gt; Select Use encryption if available from the Connection security dropdown</li>
  88. <li>Enter the OpenFire fully qualified server name in the server field</li>
  89. <li>Click the Add button</li>
  90. <li>Click Accept on the self-signed certificate popup</li>
  91. <li>Copy the extracted Pidgin Portable folder to another device</li>
  92. <li>Launch Pidgin Portable on the second device</li>
  93. <li>Select Modify Account</li>
  94. <li>Update the username and password to be a different account from the previous device</li>
  95. <li>From one of the devices, select Buddies &gt; Add Buddy</li>
  96. <li>Input the opposite devices&#39;s username</li>
  97. <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>
  98. </ol>
  99. </div>
  100. </div>
  101. </body>
  102. </html>