Xmpp sorting notes: Quick environment configuration (with installation package included) and xmpp installation package

Source: Internet
Author: User

Xmpp sorting notes: Quick environment configuration (with installation package included) and xmpp installation package

Although the xmpp framework of huanxin is very popular, it also has some drawbacks. Some of the code of the huanxin framework is not open-source, and the charging mode is not scientific. The number of users is always lower than that of the Free Line. Once it is exceeded, the charges are extremely high. Xmpp is still relatively scientific from the xmppFramework framework. I can better understand the APIs used in various operations in instant messaging, even if a new framework is developed in the future. The main tools and software used include Openfire, mysql, javajdk, phpMyAdmin, and Adium.

Pull this article to the bottom to see the chat effect after the configuration is complete.

Attachment: the required software address is http://pan.baidu.com/s/1tr7oa Network Disk password d3lb

Step 1: Install jdk because xmpp has many things to run in the java environment. In the Openfire folder of the online storage, jdk completes the next step as prompted.

If you did not see this article in Dong Boran's blog Park, click to view the original article

Step 2: Install the Openfire server, which is also in the Openfire folder. The next step is to complete.

 

Step 3: Install mysql. This is in the database folder. This is divided into 10.9 systems and 10.10 systems. If it is 10.9, install 5.6.21. If it is 10.10, install 5.6.23.

After installation, the following page is displayed in the preference settings.

Enable Both MySQL and Openfire and start both.

 

Step 4: Set the "administrator password" For MySQL. The reason is: after MySQL is installed, MySQL cannot be accessed from the network without the administrator password.

Operate in the terminal (dollar sign $ do not enter)

$ Cd database directory (drag from Finder)

$./Alias

Restart the terminal and input ls. If the Directory turns blue, the configuration is correct.

If the password cannot be set when the script is run, use

$ Mysqladmin-u root password: Change the mysql password, for example, 123456.

$ Mysql-u root-p log on to the database

If the login succeeds, quit will exit and proceed to the next step.

 

Step 5: Configure phpMyAdmin

This is a database management software, which is easy to use. The software on mac is charged at $328. There is also a pirated folder, but it cannot be updated, and 10.10 of the system is useless. (NaviCat is not recommended)

PhpMyAdmin is a good web page management tool. The configuration is as follows:

Copy to the Apache root directory → change the directory name to phpMyAdmin → set config. sample. inc. php copy, renamed to: config. inc. php → open config. inc. php changes localhost to 127.0.0.1

Start the apache server after configuration.

$ Sudo apachectl-k start

If Apache is not configured, see this article to configure a very simple http://www.cnblogs.com/dsxniubility/p/4294456.html.

The phpMyAdmin logon page is as follows:

 

Step 6: Create a database

Open the browser and enter http: // localhost → select phpMyAdmin To Go To The phpadmin logon page → enter the mysql user name and password, root Password 123456

→ Create a new database, name: openfire sorting rule: utf8_general_ci → click openfire (empty database just created) → click SQL

A series of script code is required to be copied here.

Open the finder and enter the directory/usr/local → on the openfire folder, right-click, select "show Introduction", click "share and permission", and then add the local account with the "read and write" permission after unlocking.

→ Access/usr/local/openfire/resources/database → find openfire_mysql. SQL and use Xcode to open cmd + A, cmd + C

Return to safari and check that in the SQL input box, run cmd + v and click execute. The table is created. Click openfire on the left to confirm that the database is correctly installed!

 

Step 7: configure the openfire Server

Click openfire in preference settings and open the open admin console on the right of the Panel to open the openfire server configuration page (if there is no change, go directly to the next step)

Select Simplified Chinese. Next Step → domain "dsx. local" is very important! The default value is "computer name. local". You can view your computer name in System Preference sharing.

→ Set "standard database connection" for the database → database driver option: MySQL changes the URL of the automatically generated database

Jdbc: mysql: // 127.0.0.1: 3306/openfire? RewriteBatchedStatements = true (in fact, the host name is changed to 127.0.0.1 and the database name is openfire)

→ The username and password are root and 123456 → click to continue entering the xmpp administrator's initial password: for example, write another 123456

Log on to the Management page and enter the xmpp username and password admin and 123456. If the logon succeeds, the Server installation is complete!

 

Step 8: create several new users and click "User/group". To create a new user, you only need to fill in the blank space with an asterisk (for later Client Login)

Step 9: configure the client (to configure two, you can chat first to feel that even if communication is done, then you will write a program to run in the simulator and chat with the client)

Configure client iChat (iMessage) 1] Add User, select another account type: jabber User name: admin@dsx.local 123456 trust certificate

Configure the duck Adium_1.5.10. In the client folder, drag the application as prompted to complete the installation. The first startup may be slow.

Then the iMessage and the two accounts in the duck client Add friends to each other to start chatting.

 

If you did not see this article in Dong Boran's blog Park, click to view the original article

In the future, we will soon sort out study notes on various xmpp modules (users going offline, registering users, adding friends, sending messages to each other, sending pictures and Audio Information, if you are interested, follow me.

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.