• Deploying OpenFire for IM (instant message) service (TCP/IP service) with database MySQL , client Spark on linux部署OpenFire IM 消息中间件服务


    Are you a hacker?

    How to build another QQ/Wechat/whatsapp/skype/imessage?

    Let's go through this!!!!

    Materials:

    A linux/unix/windows/mac computer/server, and do some basic things!

    Are you feeling high?

      Okay, let's ride the rocket!

    Get materials:

    1. A search engine

    duckduckgo.com to search 'openfire'

    2. Service software

     'OpenFire' from here http://www.igniterealtime.org/downloads/index.jsp

    and the client software spark: 'Spark'             ( here for example: download the http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3.9.3_all.deb , because i deployed it on a debian/ubuntu machine )

    3. Packages installation

    # for some situations, some other packages such as openjdk-6-jre should be installed or other packages
    sudo apt-get install apache2 openjdk-6-jre mysql-server mysql-client -y
    # then
    sudo dpkg -i /path/to/openfire_3.9.3_all.deb

    4. Database settings

    mysql -uroot -p
    # then create a database in the mysql console
    mysql> create database openfire;

    5. Service Deployment

    Go to the web page: 

    xx.xx.xx.xx:9090

    then you will see some references guiding you to install. ( choose the outer base database , not the default database. Here MySQL preferred)

    next and next => then finish.

    6. Plugin installation: Monitoring Service

    Go to the web page:

    xx.xx.xx.xx:9090

    click on the green 'cross' button  on the right.

    7. Plugin Settings

    toggle the "Archive one-to-one chats" and/or "Archive group chats"

    8. Have an instant conversation

    (P.S. you will need to add some one before the conversation one-to-one, of course)

    In this case, create a user here:

    Then open the client software!!!

    # start the client 'Spark'
    sudo sh /path/to/Spark/resources/startup.sh &

    Then you will see the user interface as this:

    Login!!!

    Do the same thing for another account . e.g. another account: 'admin'

    Send messages between different clients

    From the page:   Server -> Archiving -> Search archive , we can see their talking record. WOW! What a conversation :P

    9. Data tasting

    We are not satisfied with that just reading some thing from web page.

    Here feel what we got!

    mysql -uroot -p
    # input your password
    mysql> use openfire;
    mysql> select * from ofUser;
    "something dumped out"
    
    mysql> select * from ofMessageArchive;
    "other dumped out"

    Notice : the table 'ofMessageArchive' is created because of the enabling of the plugin 'monitor archiving'

    Let's see what we got!!

    for user:

    for the conversation record (archived)

    Yeah! we see that!

    "Next big" : 

    client A -> middleware -> client B

    client B -> middleware -> client A

    domestic server -> middleware -> client A

    domestic server -> middleware -> client A, client B, client C, ...

    client A  -> middleware -> domestic server

    Happy hacking!

  • 相关阅读:
    Hibernate-查询缓存
    Hibernate-二级缓存 sessionFactory
    Hibernate-二级缓存策略
    Hibernate-一级缓存session
    缓存和连接池的区别
    Hibernate-一对多的关系维护
    Hibernate-缓存
    Java基础-jdk动态代理与cglib动态代理区别
    Java基础-CGLIB动态代理
    Java基础-静态代理与动态代理比较
  • 原文地址:https://www.cnblogs.com/spaceship9/p/3863758.html
Copyright © 2020-2023  润新知