XMPP environment setup under Mac

Source: Internet
Author: User
Tags administrator password phpmyadmin

There are several ways to implement instant messaging, which is implemented under Mac using XMPP .

XML Messages presence Protocol Extensible Message Processing Protocol is simply the principle of point-to-point instant communication protocol based on XML language: at least two clients and one server to build XMPP environmentSeveral assistive tools are required
    1. Xampp
    2. OpenFire
    3. Spark
    • We first build the server environment, it is not easy to install Apache server, if you want to add MySQL, PHP and Perl, it is more difficult. XAMPP (Apache+mysql+php+perl) is a good assistant tool, TA is a powerful building XAMPP software station integration package. The original name of this package is LAMPP, which can be installed in various operating systems such as Windows, Linux, Solaris, Mac os X, and multi-language support. XAMPP is a version of Apache that is easy to install and contains MySQL, PHP, and Perl. XAMPP is really easy to install and use: Just download, unzip, start.
    1. Preparing the XAMPP installation package
    2. Installation (simple always next operation)
    3. Click Start all to open manage Server, this means to open all services. Note: If your Mac comes with an Apache that will cause startup to fail, you will need to open the terminal input sudo apachectl stop command to stop your own server from running.
    • OpenFire is an open source XMPP protocol-based server, the following is the installation and configuration guide for OpenFire login 127.0.0.1:9090
1. Prepare OpenFire installation package 2, double-click to install (Note: In System Preferences-security and privacy-universal settings allow Mac to install any source) 3, after the installation is complete, enter system Preferences, you will find a openfire icon 4, click on the icon to ensure that the status is Running is in the running state 5, after launch can click on the open Admin console to enter or through 127.0.0.1:9090 access (note: In order to avoid errors to use the SA inside the Mac Fari browse) OpenFire Server Web Configuration page Configuration 6, first select the language Chinese 7, Server set domain name: local hostname System Preferences-share can be viewed (generally by default continue to the next step) 8, database settings using standard database 9, number Database Settings-Standard connection
    • Use MySQL database (store chat history)
    • Here you also want to modify the two values of the database URL [host name] = 127.0.0.1 and [database name]
    • The latter need to use PhpMyAdmin to create a new database, through 127.0.0.1 login Xampp page, click Phpmyadmin-new Create database successful import table Openfire_mysql.sql
    • To get the desired file in the OpenFire file, open the Finder to the folder (Command + SHIFT + G) and enter/usr into the Usr-local-openfire
    • This time you will find that because you do not have permission to open the file, the solution is to select the file right-show introduction-Unlock-everyone modified to read and write-lock
    • At this point you can open the Openfire-resource-database to find the openfire_mysql.sql that we need you can choose to put on the desktop for easy import in phpMyAdmin
    • Select New Database-Import-Select file-Import succeeded [database name] = new DB name
    • User name = root
    • Password omitted
10, set the initial setting 11, set a new password (note: In order to avoid forgetting the password can skip this step, if you set a password error or do not set the password is the same as the account name of the admin) 12, installation completed, log in to the management console OpenFire boot failure resolution

When you find the OpenFire on your computer, whether you reinstall or reboot, you can follow the terminal instructions I wrote below to start your openfire without having to re-do your system again.
Generally you find your openfire open to such a window you can think of your openfire problem, very individual time you can be resolved by re-installation.

If everyone's problem is not resolved after reinstallation, then try my next method.

First open the terminal on your own computer and enter the following instructions

Get Permissions
sudo chmod-r 777/usr/local/openfire/bin

sudo su
sh-3.2# Cd/usr/local/openfire/bin
sh-3.2# export java_home= '/usr/libexec/java_home '
sh-3.2# Echo $JAVA _home
/usr/libexec/java_home
sh-3.2# export java_home= '/usr/libexec/java_home '//Remember this is not a single quotation mark but a left-hand button on the number 1 in English.

sh-3.2# Echo $JAVA _home
/library/java/javavirtualmachines/jdk1.8.0_25.jdk/contents/home
sh-3.2# Cd/usr/local/openfire/bin
sh-3.2#./openfire.sh
OpenFire 3.10.2 [9:50:05 AM]
Admin Console listening at http://niufangludemacbook-pro.local:9090
After you enter the instructions, you can open your openfire and you'll be fine.

Simply mention: completely uninstall OpenFire under Mac
    1. In phpMyAdmin, click Home-Database tick the database you created to delete directly
    2. In System Preferences, click Enter to modify status to stop running
    3. Open terminal and enter the following three commands:

sudo rm-rf/library/preferencepanes/openfire.prefpane
sudo rm-rf/usr/local/openfire
sudo rm-rf/library/launchdaemons/org.jivesoftware.openfire.plist

Note: The first article will let you enter the administrator password, although you enter the time, the terminal will not display, do not worry, the correct input after the press ENTER, it is executed.
After three orders, OpenFire disappeared completely.

 

XMPP environment setup under Mac

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.