Deploying OpenFire for IM (instant message) service (TCP/IP service) with database MySQL , client Spark on linux部署OpenFire IM 訊息中介軟體服務

來源:互聯網
上載者:User

標籤: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 packagessudo apt-get install apache2 openjdk-6-jre mysql-server mysql-client -y# thensudo dpkg -i /path/to/openfire_3.9.3_all.deb
4. Database settings
mysql -uroot -p# then create a database in the mysql consolemysql> 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 passwordmysql> 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!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.