Reject spam articles using MySQL in Ejabberd

Source: Internet
Author: User
Tags mysql in mysql view

In order to extend the Ejabberd, MySQL is used to implement the database

But search online articles are actually a lot of rubbish, should be written by the person is not tested

1: Not saying database script where to download

2: No description of how to configure the Ejabberd.cfg, especially when the configuration of the database, you must go to configure Odbc.ini

3: No instructions on how to suggest an Administrator account

Spit out the trough, start to put the material

Server for CentOS6.6

Download the Ejabberd installation package at the command line

wget  http://Www.process-one.net/downloads/ejabberd/2.1.13/ejabberd-2.1.13-linux-x86_64-installer.run 

After downloading because it is a. Run package, you need to add permissions

chmodejabberd-2.1.13-linux-x86_64-installer.run

And then run the

./ejabberd-2.1. -linux-x86_64-installer.run

will be installed interface, the installation process to fill in the "Domain name" and "Administrator" and "User password" to remember

After the last run, you can try log in management to see if the installation is successful.

Successful description of Ejabberd's original installation success

The following describes how to use MySQL

The first thing to download is the MySQL script

You can go to git to download the address: Https://github.com/processone/ejabberd has a SQL folder and then downloads the Mysql.sql script

Install MySQL and create an IM database to run the current script to import, this step will not please Google other articles

Enter the Conf folder of the Ejabberd installation file,

Open Ejabberd.cfg

Comment out: {auth_method, internal}.

Uncomment: {Auth_method, ODBC}.

and add: {odbc_server, {mysql, "localhost", "Im", "root", "root"}}.

Pay special attention to the database that line of color is not display text highlighting, I originally copied in, Ejabberd start the report that this line format is wrong, and then after the call in

Search: Modules

Put him in the following configuration these parameters are appended with: "_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,    

When you save the configuration, you can configure the Odbc.ini file.

After the database is configured, register the Administrator account with the command line under Bin

Especially important, note the Administrator account (note that the administrator domain and password must be installed)

./ejabberdctl Register Admin ava.com.cn Admin

And then run

./start

Login account is the address marked red box, the actual configuration of the installation is different

Log in and add several users to the users in Virtual Hosts

Finally in MySQL view, found that the added user is already here

If there is anything unusual in the configuration process, be sure to learn to check the error log

Reject spam articles using MySQL in Ejabberd

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.