码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2014-07-23 20:44:35      阅读:568      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   io   

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

bubuko.com,布布扣

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

bubuko.com,布布扣

7. Plugin Settings

bubuko.com,布布扣

 

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:

bubuko.com,布布扣

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:

bubuko.com,布布扣

 

Login!!!

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

 

Send messages between different clients

bubuko.com,布布扣

 

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:

bubuko.com,布布扣

for the conversation record (archived)

bubuko.com,布布扣

 

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 消息中间件服务,布布扣,bubuko.com

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

标签:style   blog   http   color   os   io   

原文地址:http://www.cnblogs.com/spaceship9/p/3863758.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!