Build OpenFire Server on iOS instant Messaging client Development-mac

Source: Internet
Author: User
<span id="Label3"></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">first, Download and install OpenFire</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">1. Download the latest OpenFire for Mac version to http://www.igniterealtime.org/downloads/index.jsp</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">For example: openfire 3.8.1, downloaded files: openfire_3_8_1.dmg</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">2. Click Install and perform the default action</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">3. Start the OpenFire service</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">In the other system preferences, click OpenFire Preferences</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">After startup, click the Open Admin Console button to automatically open the local Web configuration page in the browser http://localhost:9090/setup/index.jsp</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">second, Configure the OpenFire server</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">1. Set the language, select Chinese</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">2. Host Settings</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">Set the Host's Access IP address</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">Note: The domain cannot be a machine name, otherwise it will be the following error:</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"><span style="color: #ff0000;">HTTP error:500 Internal_server_error</span></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">Local domain, to be set to 127.0.0.1</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">3. Database Settings</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">If you want to set up an external database (recommended, for example: MySQL), Select Standard database connection</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">4. Setting up a database connection</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">(1) Database-driven selection: mysql, If you have installed MySQL (specific installation method can refer to the previous article: install MySQL on Mac)</p></p><p style="margin: 0px 0px 10px; line-height: 24px;"><p style="margin: 0px 0px 10px; line-height: 24px;">(2) jdbc driver, unchanged by default</p></p><pre><pre>Com.mysql.jdbc.Driver</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">(3) Database Url:</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">The form is as Follows:</p></p><pre><pre>Jdbc:mysql:<span style="color: #008000;">// <span style="color: #008000;">Your host name: port number/database name</span> </span></pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">This is set to</p></p><pre><pre>Jdbc:mysql:<span style="color: #008000;">//<span style="color: #008000;">localhost:3306/openfire</span> </span></pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">where hostname [host-name] is changed to localhost,</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Where the database name [database-name] is changed to OpenFire</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">To solve the problem of database character encoding, you can add the following</p></p><pre><pre>? useunicode=<span style="color: #0000ff;">true&characterencoding=utf-<span style="color: #800080;">8&charactersetresults=utf-<span style="color: #800080;">8</span> </span> </span></pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">The final URL form is</p></p><pre><pre>Jdbc:mysql:<span style="color: #008000;">//<span style="color: #008000;">localhost:3306/openfire?useunicode=true&characterencoding=utf-8& Charactersetresults=utf-8</span> </span></pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Note: if a database named OpenFire already exists, the following error will be reported, the connection configuration is unsuccessful</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><span style="color: #ff0000;">The OpenFire database schema does not appear to be installed. Follow the installation Guide to fix this Error.</span></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Pre-mysql Database Preparation works as Follows:</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><1> Set/usr/local/openfire folder access to Read/write</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Method 1: go to folder/usr/local/in the finder, right-openfire folder, display Introduction</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Click on the lock icon in the lower right corner to unlock and set permissions to: can read and write</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Method 2: Open the terminal and enter the following command</p></p><pre><pre><span style="color: #0000ff;"><span style="color: #0000ff;"><span style="color: #800080;">777/usr/local/openfire</span></span></span></pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Where 777 means grant read and write permission, 000 means no access</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><2> in the terminal, log in to MySQL</p></p><pre><pre>Mysql-u root-p</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Then enter the root password of the database</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><3> Create a database OpenFire</p></p><pre><pre>Create DATABASE openfire;</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><4> Import <tt>The data table under</tt> openfire Resource folder Resources/database</p></p><pre><pre>Use openfire;</pre></pre><pre><pre>Source/usr/local/openfire/resources/database/openfire_mysql.sql</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">A row of import processes appears at the terminal</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><5> Refresh Permissions</p></p><pre><pre>Flush privileges;</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><6> quit MySQL</p></p><pre><pre>Exit</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">(4) User name and password</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">The username and password here is the account used to access the MySQL database: root, and the root password to install the MySQL settings</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">5. Feature Settings</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">If you do not intend to use ldap, leave the default setting</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">6. Set the OpenFire server Administrator's account and password</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Can fill in an admin mailbox, enter the password to be set</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Complete Registration</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><span style="line-height: 1.5;">7. Login to the management console</span></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">The default administrator account is "admin", the default administrator password "admin", if the above set a new password, then the administrator password is the new password</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">If you want to remove the default admin account and customize it, you need to do the following</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">(1) in the terminal, login to the specific database (openfire)</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><pre><pre>Mysql-u root-p OpenFire</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Then enter the root password of the database</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">(2) Delete the admin account in the table "ofuser"</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><pre><pre>Delete from Ofuser where username= ' admin ';</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">(3) Create a custom administrator (user name: xiaodao, password: 123)</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><pre><pre>INSERT into Ofuser (username, plainpassword, encryptedpassword, name, email, creationdate, modificationdate) VALUES (' Xia Odao ', ' 123 ', ' 123 ', ' Administrator ', '<span class="__cf_email__" data-cfemail="58203139373c3937182b2d3621392a3c763b3735">[email protected]</span>', ' 0 ', ' 0 ');</pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">note: If you reset the user name, you must restart the OpenFire server</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">8. Background Control Interface</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">third, Uninstall OpenFire</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">1. Stop the Service</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">In other settings in System preferences, open OpenFire Preferences</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Click the Stop OpenFire button to stop the service</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"></p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">2. Deleting files</p></p><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">Open terminal, Enter the following command</p></p><pre><pre><span style="color: #0000ff;"><span style="color: #0000ff;">Rm-rf/library/preferencepanes/openfire.prefpane</span></span></pre></pre><pre><pre><span style="color: #0000ff;"><span style="color: #0000ff;">Rm-rf/usr/local/openfire</span></span></pre></pre><pre><pre><span style="color: #0000ff;"><span style="color: #0000ff;">Rm-rf/library/launchdaemons/org.jivesoftware.openfire.plist</span></span></pre></pre><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;"><p style="margin: 0px 0px 10px; font-size: 14px; line-height: 24px;">After the first command, you need to enter the native administrator password</p></p><p><p>Build OpenFire Server on iOS instant Messaging client Development-mac</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.