Build openfire server Mac IOS instant messaging client development.

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

First, download and install openfire

1 to download the latest version of openfire for Mac

For example: Openfire 3.8.1, after downloading the file.: openfire_3_8_1.dmg

2 click Install, and execute the default action

3 start the openfire service

Set up in the system preferences and other preferences, click openfire

After the launch of Open Admin, click the Console button, automatically open the local web configuration page in a browser

Two, the configuration of openfire server

1 language settings, choose Chinese

2 host settings

Set the IP address of host access

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

HTTP ERROR: 500 INTERNAL_SERVER_ERROR

The local domain, to be set to 127.0.0.1.

3 database settings

If you want to set the external database (recommended, for example: MySQL), choose the standard database connection

4 set the database connection

(1)Database driven selection: MySQL, the premise is installed MySQL (specific installation method can reference a Mac installation: MySQL)

(2)JDBC driver, the default.

复制代码

com.mysql.jdbc.Driver

复制代码

(3)Database URL:

Form as follows:

复制代码

jdbc:mysql://The host: port number / name of your database name

复制代码

Set here to

复制代码

jdbc:mysql://localhost:3306/openfire

复制代码

The host name changed to [host-name] localhost,

The database name changed to [database-name] openfire

To solve the problem of the database character code, can add

复制代码

?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

复制代码

The final URL form

复制代码

jdbc:mysql://localhost:3306/openfire?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

复制代码

Note: the premise is a database named openfire already exists, otherwise they will be reported the following error, the connection configuration is not successful

The Openfire database schema does not appear to be installed. Follow the installation guide to fix this error. 

The MySQL database preparation work is as follows:

<1>Located in the /usr/local/openfire folder access permissions for read and write

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

Click the lock icon unlock angle such as the right, and set permissions for: can read and write

Method 2: open a terminal, enter the following command

复制代码

sudo chmod 777 /usr/local/openfire

复制代码

Where 777 is authorized to read and write permissions, with 000 indicating no access

<2>In the terminal, landing MySQL

复制代码

mysql -u root -p

复制代码

Then enter the database root password

<3>Create database openfire

复制代码

create database openfire;

复制代码

<4>Import the openfire resource folder   resources/database data sheet

复制代码

use openfire;

复制代码

复制代码

source /usr/local/openfire/resources/database/openfire_mysql.sql

复制代码

 The emergence of a row of the import process in the terminal

 <5>Refresh the permissions

复制代码

flush privileges;

复制代码

<6>Exit MySQL

复制代码

exit

复制代码

(4)The user name and password

The username and password, is the use of MySQL database access account: root, and install the MySQL set the root password

The 5 feature set

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

 6 set openfire server administrator account and password

Can be filled out an administrator mailbox, enter the password

Complete the registration


7 landing management console


The default administrator account is “ admin”, the default administrator password “ admin”, if the above set a new password, the administrator password is the password



If you want to remove the default admin account, and custom, need to operate as follows


(1)In the terminal, landing specific database(openfire)


复制代码

mysql -u root -p openfire

复制代码


Then enter the database root password


(2)Alter table “ ofUser” the admin account


复制代码

delete from ofUser where username='admin';

复制代码


(3)Create a custom administrator (user name: Xiaodao, password: 123)


复制代码

INSERT INTO ofUser (username, plainPassword, encryptedPassword, name, email, creationDate, modificationDate) VALUES ('xiaodao','123','123','Administrator','','0','0');

复制代码

  Note: if the reset the username, you must restart the openfire server

8 background control interface


Three, uninstall openfire

The 1 stop service

Set up in the system preferences of the other, open openfire preferences

Click the Stop Openfire button, stop service

2 to delete the file

Open a terminal, enter the following commands

复制代码

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, need to enter the administrator password

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Allen at November 22, 2013 - 9:20 AM