Install ejabberd2 and configure MYSQL as its database

Source: Internet
Author: User

I have used openfire as a server before, but the openfire cluster does not support very well, so I switched to ejabberd. Since it was developed using the Erlang language, its concurrency and distributed functions are both powerful, here I will record my installation and configuration processes.

1. Install the installation package on its official website. My system is Mac OS, so I only want to install it on Mac OS. After downloading the installation package, click Install. After installation, the ejabberd directory will be generated in the/applications directory, since I downloaded a Ejabberd-2.1.11, so the installation directory is:/applications/ejabberd-2.1.11/

2. The configuration supports MySQL, open/applications/ejabberd-2.1.11/CONF/ejabberd. cfg and make the following modifications

A. Notes

{auth_method, internal}.

After annotation

%%{auth_method, internal}.

B. Cancel the comment.

{auth_method, odbc}.

C. Create a database named ejabberd.

D. Create a table. If your MySQL version is earlier than 5.5.3, edit mysql. SQL and change set table_type = InnoDB; To set default_storage_engine = InnoDB;

cd /Applications/ejabberd-2.1.11/lib/ejabberd-2.1.11/priv/sqlmysql -u root -p ejabberd < mysql.sql

D. Configure MySQL

%%%% MySQL server:%%{odbc_server, {mysql, "localhost", "ejabberd", "root", "MySqlPassword"}}.

E. Add a _ ODBC

{mod_last_odbc,     []},{mod_offline_odbc,  []},{mod_privacy_odbc,  []},{mod_private_odbc,  []},{mod_pubsub_odbc,   [ % requires mod_caps ...{mod_roster_odbc,   []},{mod_vcard_odbc,    []},

3. Enable ejabberd,

cd /Applications/ejabberd-2.1.11/lib./start

Because MySQL does not have data, we register an account with the following command:

./ejabberdctl register admin mes1.com 123456

Now go to http: // localhost: 5280/admin/to login

Username: Admin

Password 123456

Reference: http://iohq.net/index.php? Title = building_an_ejabberd_server_with_mysql

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.