IOS instant messaging client development-openfire server built on Mac

Source: Internet
Author: User

1. Download and install openfire

1. download the latest openfire for Mac at http://www.igniterealtime.org/downloads/index.jsp

For example, openfire 3.8.1, the downloaded file: openfire_3_8_1.dmg

2. Click Install and perform the default operation.

3. Start the openfire Service

In other settings of system preferences, click openfire preferences.

After the startup, click the open Admin Console button to automatically open the Local Web configuration page http: // localhost: 9090/Setup/index. jsp in the browser.

2. Configure the openfire Server

1. Set the language and select Chinese

2. Host settings

Set the access IP address of the host

Note: The domain cannot be the machine name; otherwise, the following error occurs:

HTTP Error: 500 internal_server_error

Set the local domain to 127.0.0.1.

3. Database settings

If you want to set up an External Database (recommended, such as MySQL), select the standard database connection.

4. Set database connection

(1) database Driver selection: MySQL, provided that MySQL has been installed (for specific installation methods, refer to the previous article: Install MySQL on Mac)

(2) The JDBC driver remains unchanged by default.

 
Com. MySQL. JDBC. Driver

(3) Database URL:

The format is as follows:

 
JDBC: mysql://Your host name: Port Number/Database Name

Set

 
JDBC: mysql://Localhost: 3306/openfire

Change the host name [host-name] to localhost,

Change the database name [database-name] To openfire.

To solve the problem of character encoding in the database, add

 
? Useunicode =True& Characterencoding = UTF-8& Charactersetresults = UTF-8

The final URL format is

JDBC: mysql://Localhost: 3306/openfire? Useunicode = true & characterencoding = UTF-8 & charactersetresults = UTF-8

Note: A database named openfire already exists. Otherwise, the following error is reported, indicating that the connection configuration is unsuccessful.

The openfire database schema does not appear to be installed. Follow the Installation Guide to fix this error.

The preparations for the MySQL database are as follows:

<1> set the access permission for the/usr/local/openfire folder to read/write.

Method 1: Go to the/usr/local/folder in the finder, right-click the openfire folder, and display the introduction

Click the lock icon in the lower-right corner to unlock and set the permission to: read/write

Method 2: Open the terminal and enter the following command:

 
Sudo Chmod 777/Usr/local/openfire

777 indicates that the read/write permission is authorized, and 000 indicates that the read/write permission is not authorized.

<2> log on to MySQL

Mysql-u root-P

Enter the root password of the database.

<3> Create an openfire Database

 
Create Database openfire;

<4> Import openfire resource folder Data Tables under resources/Database

 
Use openfire;
 
Source/usr/local/openfire/resources/database/openfire_mysql. SQL

A batch of import processes appear on the terminal

<5> refresh Permissions

 
Flush privileges;

<6> log out of MySQL

 
Exit

(4) user name and password

The username and password here are the accounts used to access the MySQL database: root, and the root password set for installing MySQL.

5. feature settings

If you do not plan to use LDAP, keep the default settings

6. Set the account and password of the openfire server administrator.

You can enter an administrator email and the password you want to set.

Complete Registration

 

7. log on to the console

 

The default Administrator account is "admin", and the default administrator password is "admin". If a new password is set above, the administrator password is a new password.

 

 

To remove the default admin account and customize it, perform the following operations:

 

(1) log on to the specific database (openfire) on the terminal)

 

 
Mysql-u root-P openfire

 

Enter the root password of the database.

 

(2) Delete the admin account in the table "ofuser"

 

 
Delete from ofuser where username ='Admin';

 

(3) create a user-defined Administrator (username: Xiaodao, password: 123)

 

Insert into ofuser (username, plainpassword, encryptedpassword, name, email, creationdate, modificationdate) values ('Xiaodao','123 ','123','Administrator','Xiaodao@sunyard.com','0','0');

Note: If you reset the user name, you must restart the openfire server.

8. Background Control Interface

 

3. Uninstall openfire

1. Stop the service

Open openfire preference settings in other system preferences

Click Stop openfire to stop the service.

2. delete an object

Open the terminal and enter the following command

Sudo Rm-RF/library/preferencepanes/openfire. prefpane
 
Sudo Rm-RF/usr/local/openfire
 
Sudo Rm-RF/library/launchdaemons/org. jivesoftware. openfire. plist

After the first command, enter the administrator password of the local machine.

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.