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!

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

时间: 2024-08-25 02:41:19

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

c# TCP/IP编程

这东西很多朋友都有写过了,我也就写着玩玩,就当做个笔记吧.不废话了. TCP/IP在数据通信中被广泛的使用,自然得包含客户端和服务端,当然,自己自言自语不是什么不可以,可那样貌似有点神经. 好了,那就先来建立服务端吧. 1.新建一个项目,就取名叫MyServer吧,然后敲入如下代码: using System;using System.Net;using System.Net.Sockets; namespace MyServer{    class Program    {        st

linux视频学习3(linux安装,shell,tcp/ip协议,网络配置)

linux系统的安装: 1.linux系统的安装方式三种: 1.独立安装linux系统. 2.虚拟机安装linux系统. a.安装虚拟机,基本是一路点下去. b.安装linux. c.linux 安装的时候,分区是关键. /boot 分区 100M. /swap 交换分区.一般是物理内存的2倍,不超过256M. /root 根分区.尽可能的大. 3.双系统安装. 2 linux下的shell 3.TCP/IP 协议 4.samba服务器.主要是linux和window的交互.

SQL Server 连接问题-TCP/IP

原文:SQL Server 连接问题-TCP/IP 出自:http://blogs.msdn.com/b/apgcdsd/archive/2012/02/24/ms-sql-server-tcp-ip.aspx TCP/IP的基本工作原理这里就不浪费口水了.现在这网络年代,谁不知道TCP/IP啊.不要跟我抬杠说你偏就没听说过TCP/IP阿,真是这样那你得自己去补补课了. TCP/IP协议有两个基本的东西,一个是IP地址, 另一个是端口号. 在SQL Server 上使用TCP/IP协议是非常简单

TCP/IP协议攻击实验1

TCP/IP协议攻击实验1 实验环境: Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 安装工具 1.Wireshark sudo apt-get install wireshark 2.Netwag sudo apt-get install netwag 3.Netwox sudo apt-get install netwox 检查

tcp/ip 建立过程

1. tcp /ip : 在osi网络参考模型中,它提供着可靠的传输服务/ 定义:传输控制协议 a:   tcp/ip 的建立过程,通过三次握手,和四次挥手来完成. 2. 何为三次握手? 首先在这假设,syn="m"   ,syn 就是客户端在向务端发送链接请求,服务端会收到这个syn的链接请求 包,客户端的状态为:syn_sent 第一次握手:当客户端给服务器发送syn(m)链接请求,等待服务器的确认,然后客户端的状态为 syn_sent 第二次握手:当服务端收到syn(m)的包的链

用C#基于WCF创建TCP的Service供Client端调用

本文将详细讲解用C#基于WCF创建TCP的Service供Client端调用的详细过程 1):首先创建一个Windows Service的工程 2):生成的代码工程结构如下所示 3):我们将Service1改名为MainService 4): 添加一个Interface来定义Service的契约 4.1):截图如下所示 4.2):IOrderService.cs的代码如下所示 using System; using System.Collections.Generic; using System

TCP/IP篇--各协议简介

--百家菜 在学习网络方面的知识过程中,不可避免地要接触到各种协议,对于一开始接触协议的我们来说对于协议实在没有太多的概念和接触,如果你也是这样,那么博主的这一篇博文可能给你一些关于协议的概念.其中的部分介绍为博主自己总结而出,如有欠缺不当的地方,欢迎通过发表评论或线下交流的方式斧正. 关于协议数据的具体格式和数字表示可上网(百度等网站)或者抓包(抓包方式详细见博主的相关博文-<抓包篇--wireshark使用!>,链接http://powersource.blog.51cto.com/113

TCP/IP协议栈模型

OSI七层模型介绍: 下面4层(物理层.数据链路层.网络层和传输层)主要提供数据传输和交换功能,即以节点到节点之间的通信为主:第4层作为上下两部分的桥梁,是整个网络体系结构中最关键的部分:而上3层(会话层.表示层和应用层)则以提供用户与应用程序之间的信息和数据处理功能为主. 物理层的主要功能是:利用传输介质为数据链路层提供物理连接,实现比特流的透明传输,尽可能屏蔽掉具体传输介质和物理设备的差异. 数据链路层主要功能:建立和管理节点间的链路.通过各种控制协议,通过差错控制.流量控制方法,将有差错的

七、TCP/IP协议

1.定义: TCP/IP模型也被称作DoD模型(Department of Defense Model).TCP/IP字面上代表了两个协议:TCP(传输控制协议)和IP(网际协议). TCP/IP协议不是TCP和IP这两个协议的合称,而是指因特网整个TCP/IP协议族.从协议分层模型方面来讲,TCP/IP由四个层次组成:网络接口层.网络层.传输层.应用层. TCP/IP协议并不完全符合OSI的七层参考模型,OSI(Open System Interconnect)是传统的开放式系统互连参考模型,