Some tips on using OpenFire

Source: Internet
Author: User
Tags auth locale socket vcard
some tips on using OpenFire Author: Chszs, copyright, without consent, may not be reproduced. Blogger Home: Http://blog.csdn.net/chszs 1. Install OpenFire as system service

For Redhat, CentOS, Fedora and other systems, you can use the RPM package installation OpenFire, after installation naturally has OpenFire service. At this point you can start or stop OpenFire by command:

#/etc/init.d/openfire Stop/start/restart/reload

If it is through the. tar.gz decompression of the installed OpenFire, then the OpenFire start or stop can be through the command:

#./bin/openfire Start/stop

In this way, to install OpenFire as a system service, there are two scripts in the OpenFire Bin/extra subdirectory: 1) redhat-postinstall.sh script

Suitable for redhat system, can automatically install OpenFire as system service. It creates a user named "Jive" and copies the openfired to the INIT.D directory, and the script must be executed with root privileges. 2) openfired script

Use OpenFire as a script for system services. This script must be configured manually. Detailed information on how to configure it later. 2. Custom Parameters

When advanced users run OpenFire, they can pass some parameters to the JVM for better performance.
If the OpenFire is installed via RPM, you can edit the/etc/sysconfig/openfire and find the openfire_opts option to adjust.
If you are installing through tar, you need to adjust the startup script yourself to meet your needs. 3. Plugins

The plugin allows OpenFire to support additional features and protocols. After the server installs OpenFire, you can download and install the plug-in to enhance the OpenFire server. Plugins can be downloaded from the Igniterealtime.org plugin page or directly in the admin console.
Plugin page: http://www.igniterealtime.org/projects/openfire/plugins.jsp 1) Install plugin

If the plugin is downloaded from the server's management console, the plugin will be installed automatically.
If it is a manually downloaded plug-in (jar file), you can copy the plug-in file to the OpenFire plugins subdirectory. The OpenFire plug-in monitor automatically scans to the new plugin and completes the installation automatically. The OpenFire management console has the upload plugin feature, which uploads the plugin from the local file system and automatically completes the load. 2) Manage Plugins

Can be managed in the OpenFire management console. You can manually delete the plugin jar file for the Plugins subdirectory, OpenFire will automatically remove the plug-in from memory and delete its directory. 4. Add Chinese support

In the Conf subdirectory, edit the Openfire.xml configuration file and add the following at the place:

? useunicode=true&characterencoding=utf-8&charactersetresults=utf-8
namely:
<driver> Com.mysql.jdbc.driver</driver>
      <serverurl>jdbc:mysql://111.111.111.11:3306/openfiredb? rewritebatchedstatements=true?useunicode=true&characterencoding=utf-8&charactersetresults=utf-8</ serverurl>
      <username encrypted= "true" >08d7675ce83b8f765d0eaasdfasasdf9d8943ad4f8edf</username >
      <password encrypted= "true" >d1e1f004f6c252e04ab0ae6d02beb14e471e6002e0bb621</password>
      <testsql>select 1</testsql>
5. Modify the domain value of the OpenFire

Unlike Tigase, when OpenFire is installed, its configuration properties are not written to the XML file, but are essentially stored in the database table.
The data table where the configuration property resides is the Ofproperty table

Mysql> select * from Ofproperty; +--------------------------------------------+----------------------------------------------------------------- -----------------+
| name |
PropValue | +--------------------------------------------+----------------------------------------------------------------- -----------------+
| Adminconsole.port | 9090 | | Adminconsole.secureport | 9091 | | Connectionprovider.classname | Org.jivesoftware.database.DefaultConnectionProvider | | Database.defaultProvider.connectionTimeout | 1.0 | | Database.defaultProvider.driver | Com.mysQl.jdbc.Driver | | database.defaultProvider.maxConnections | 300 | | database.defaultProvider.minConnections | 10 | | Database.defaultProvider.password | b10f78asdfasdda441f52345234425215eba110 | | Database.defaultProvider.serverURL | Jdbc:mysql://111.111.111.11:3306/openfiredb?rewritebatchedstatements=true | | Database.defaultProvider.testAfterUse | False | | Database.defaultProvider.testBeforeUse | False | | Database.defaultProvider.testSQL | Select 1 | | Database.defaultProvider.username | Df94cSdfas5d71aefb9183asdfs80fbbb7 | | Locale | ZH_CN | | Locale.timezone | Asia/taipei | | Passwordkey | 0n5fddsanisyand | | Provider.admin.className | Org.jivesoftware.openfire.admin.DefaultAdminProvider | | Provider.auth.className | Org.jivesoftware.openfire.auth.DefaultAuthProvider | | Provider.group.className | Org.jivesoftware.openfire.group.DefaultGroupProvider | | Provider.lockout.className | Org.jivesoftware.openfire.lockout.DefaultLockOutProvider | | Provider.securityaudit.cLassname | Org.jivesoftware.openfire.security.DefaultSecurityAuditProvider | | Provider.user.className | Org.jivesoftware.openfire.user.DefaultUserProvider | | Provider.vcard.className | Org.jivesoftware.openfire.vcard.DefaultVCardProvider | | Setup | true | | Update.lastcheck | 1441615953135 | | xmpp.auth.anonymous | true | | Xmpp.domain | Ubuntu | | Xmpp.session.conflict-limit |                                                                    0            |
| xmpp.socket.ssl.active |
true | +--------------------------------------------+-----------------------------------------------------------------
 -----------------+ rows in Set (0.00 sec)

As you can see, the domain domains are configured in the Xmpp.domain line.
Modify its value.

mysql> Update ofproperty set propvalue= ' tt.com ' where name= ' xmpp.domain ';

Note, however, that the OpenFire server needs to be restarted for the modified domain to take effect.

# cd/opt/openfire/
#/bin/openfire Restart
shutting down OpenFire
Stopped.
Restarting OpenFire

This can be verified with the XMPP client, OK.
But in fact, this step is not really done. OpenFire after modifying the domain value, its corresponding certificate is invalid, and the certificate needs to be regenerated (even if it is a self-signed certificate). The process of generating self-signed certificates can be done simply by:

1) Stop OpenFire Service
2) Modify the Openfire.xml configuration file under the Conf subdirectory to True
Change to False
3) Start OpenFire
4) browser access to http://server:9090, OpenFire reconfiguration, automatically generates a self-signed certificate to match the new domain value.
5) Complete the configuration, log in to the admin console, and delete all certificates belonging to the old domain name at admin Console > server > Server Settings > Server certificates. If a certificate is not there, you will need to manually generate a new certificate. 6. Modify the OpenFire im Port

The default is 5222 port, to modify the default port, also modify the above data table, find Xmpp.socket.plain.port row, if not this line, then insert this line, the value is changed to 15222.

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.