Giter VIP home page Giter VIP logo

mod_log_chat_mysql5's Introduction

mod_log_chat_mysql

Developed by Jérôme Sautret [email protected], Adapted for DB Logging by Michael Weibel [email protected].

Prerequisite

In order to compile Emysql, Erlang R13 or newer will need to be installed. If you are using the 2.1.10 ejabberd installer, that comes with an old version of Erlang and you will not be able to compile Emysql.

Installation

  • Download Emysql: https://github.com/Eonblast/Emysql
  • cd Emysql && make
  • Make sure that emysql.app is present in the Emysql/ebin folder. If not build the Emysql module again.
  • In another directory download ejabbed-modules from subversion: svn co https://svn.process-one.net/ejabberd-modules
  • Copy Emysql/ebin/* to your ejabberd-modules (ebin) folder: cp Emysql/ebin/* ejabberd-modules/ejabberd-dev/trunk/ebin/
  • Download mod_log_chat_mysql5 : git clone https://github.com/candy-chat/mod_log_chat_mysql5.git
  • Move the mod_log_chat_mysql5 directory into the root of the ejabberd-modules folder
  • Navigate to the mod_log_chat_mysql5 directory in the ejabberd-modules folder and call ./build.sh
  • If successful the module has been compiled and output to ebin/mod_log_chat_mysql5.beam. Copy this file to your ejabberd system ebin folder folder (e.g. /usr/lib/ejabberd/ebin on Debian)
  • Copy all the Emysql files to your ejabberd system ebin folder as well. (Emysql/ebin/*)
  • Create required mysql table like this
    CREATE TABLE mod_log_chat_mysql5 (
       id INT AUTO_INCREMENT PRIMARY KEY,
       fromJid VARCHAR(255) NOT NULL, 
       toJid VARCHAR(255) NOT NULL, 
       sentDate TIMESTAMP NOT NULL, 
       body TEXT, 
       type VARCHAR(10)
    ) ENGINE=MyISAM CHARACTER SET utf8;
  • See conf/ejabberd.conf.sample for an example configuration
  • Once the ejabberd module is loaded and you have started ejabberd. Look at the log files to see if the module has been correctly started (erlang.log)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.