iOS Instant Messaging XMPP builds OpenFire server

Source: Internet
Author: User
Tags administrator password
<span id="Label3"></p><p><p>first, Download and install OpenFire</p></p><p><p>1. Download the latest OpenFire for Mac version to http://www.igniterealtime.org/downloads/index.jsp</p></p><p><p>For example: openfire 3.8.1, downloaded files: openfire_3_8_1.dmg</p></p><p><p>2. Click Install and perform the default action</p></p><p><p></p></p><p><p>3. Start the OpenFire service</p></p><p><p>In the other system preferences, click OpenFire Preferences</p></p><p><p></p></p><p><p>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><p>second, Configure the OpenFire server</p></p><p><p>1. Set the language, select Chinese</p></p><p><p></p></p><p><p>2. Host Settings</p></p><p><p>Set the Host's Access IP address</p></p><p><p></p></p><p><p>Note: The domain cannot be a machine name, otherwise it will be the following error:</p></p><p><p>HTTP error:500 Internal_server_error</p></p><p><p>Local domain, to be set to 127.0.0.1</p></p><p><p>3. Database Settings</p></p><p><p>If you want to set up an external database (recommended, for example: MySQL), Select Standard database connection</p></p><p><p></p></p><p><p>4. Setting up a database connection</p></p><p><p></p></p><p><p>(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><p>(2) jdbc driver, unchanged by default</p></p><pre><pre>Com.mysql.jdbc.Driver</pre></pre><p><p>(3) Database Url:</p></p><p><p>The form is as Follows:</p></p><pre><pre>Jdbc:mysql://your host name: Port number/database name</pre></pre><p><p>This is set to</p></p><pre><pre>Jdbc:mysql://localhost:3306/openfire</pre></pre><p><p>where hostname [host-name] is changed to localhost,</p></p><p><p>Where the database name [database-name] is changed to OpenFire</p></p><p><p>To solve the problem of database character encoding, you can add the following</p></p><pre><pre>? useunicode=true&characterencoding=utf-8&charactersetresults=utf-8</pre></pre><p><p>The final URL form is</p></p><pre><pre>Jdbc:mysql://localhost:3306/openfire?useunicode=true&characterencoding=utf-8&charactersetresults=utf-8</pre></pre><p><p>Note: if a database named OpenFire already exists, the following error will be reported, the connection configuration is unsuccessful</p></p><p><p>The OpenFire database schema does not appear to be installed. Follow the installation Guide to fix this Error.</p></p><p><p>Pre-mysql Database Preparation works as Follows:</p></p><p><p><1> Set/usr/local/openfire folder access to Read/write</p></p><p><p>Method 1: go to folder/usr/local/in the finder, right-openfire folder, display Introduction</p></p><p><p>Click on the lock icon in the lower right corner to unlock and set permissions to: can read and write</p></p><p><p></p></p><p><p>Method 2: Open the terminal and enter the following command</p></p><pre><pre>sudo chmod 777/usr/local/openfire</pre></pre><p><p>Where 777 means grant read and write permission, 000 means no access</p></p><p><p><2> in the terminal, log in to MySQL</p></p><pre><pre>Mysql-u root-p</pre></pre><p><p>Then enter the root password of the database</p></p><p><p><3> Create a database OpenFire</p></p><pre><pre>Create DATABASE openfire;</pre></pre><p><p><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><p>A row of import processes appears at the terminal</p></p><p><p></p></p><p><p><5> Refresh Permissions</p></p><pre><pre>Flush privileges;</pre></pre><p><p><6> quit MySQL</p></p><pre><pre>Exit</pre></pre><p><p>(4) User name and password</p></p><p><p>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><p>5. Feature Settings</p></p><p><p>If you do not intend to use ldap, leave the default setting</p></p><p><p></p></p><p><p>6. Set the OpenFire server Administrator's account and password</p></p><p><p></p></p><p><p>Can fill in an admin mailbox, enter the password to be set</p></p><p><p>Complete Registration</p></p><p><p></p></p><p><p></p></p><p><p>7. Login to the management console</p></p><p><p></p></p><p><p>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><p></p></p><p><p></p></p><p><p></p></p><p><p>If you want to remove the default admin account and customize it, you need to do the following</p></p><p><p></p></p><p><p>(1) in the terminal, login to the specific database (openfire)</p></p><p><p></p></p><pre><pre>Mysql-u root-p OpenFire</pre></pre><p><p></p></p><p><p>Then enter the root password of the database</p></p><p><p></p></p><p><p>(2) Delete the admin account in the table "ofuser"</p></p><p><p></p></p><pre><pre>Delete from Ofuser where username= ' admin ';</pre></pre><p><p></p></p><p><p>(3) Create a custom administrator (user name: xiaodao, password: 123)</p></p><p><p></p></p><pre><pre>INSERT into Ofuser (username, plainpassword, encryptedpassword, name, email, creationdate, modificationdate) VALUES (' Xia Odao ', ' 123 ', ' 123 ', ' Administrator ', ' [email protected] ', ' 0 ', ' 0 ');</pre></pre><p><p>note: If you reset the user name, you must restart the OpenFire server</p></p><p><p></p></p><p><p>8. Background Control Interface</p></p><p><p></p></p><p><p></p></p><p><p>third, Uninstall OpenFire</p></p><p><p>1. Stop the Service</p></p><p><p>In other settings in System preferences, open OpenFire Preferences</p></p><p><p></p></p><p><p>Click the Stop OpenFire button to stop the service</p></p><p><p></p></p><p><p>2. Deleting files</p></p><p><p>Open terminal, Enter the following command</p></p><pre><pre>sudo rm-rf/library/preferencepanes/openfire.prefpane</pre></pre><pre><pre>sudo rm-rf/usr/local/openfire</pre></pre><pre><pre>sudo rm-rf/library/launchdaemons/org.jivesoftware.openfire.plist</pre></pre><p><p>After the first command, you need to enter the native administrator password</p></p><p><p>iOS Instant Messaging XMPP builds OpenFire server</p></p></span>
Related Article

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.