openfire学习与总结

openfire 学习总结          博客分类:

简单说下自己学习openfire的过程。 目的是想用mac搭建一个im即时通讯的服务端。 openfire来自于一个开源的项目,项目地址是: http://www.igniterealtime.org/projects/openfire/ 它需要依赖数据库,本身自带了一个数据库,但是推荐是用外部数据库,所以我选择了时下流行的mysql.
openfire要求mysql数据库版本在4.1以上,不用多说,下载了一个最新的,顺便把UI工具也下载过来,方便使用。
下载安装的教程参考: http://www.cnblogs.com/macro-cheng/archive/2011/10/25/mysql-001.html
接着要做一件事情是要创建一个连接openfire的实例数据库,你可以随意命名,但为了方便我把它命名为openfire.这步到此为止。
然后安装下载过来的openfire.装好以后用浏览器配置它。 openfire默认端口号是9090,所以在浏览器输入:http://localhost:9090就可以看到配置界面。 配置的过程参考: http://yp.oss.org.cn/software/show_resource.php?resource_id=356
配置完成后也许会碰到登陆时报出如下错误,如果没有报说明很走运:
Error代码 复制代码  收藏代码
  1. Login failed:make sure your username and password are correct and that you’re an admin or moderator  
 Login failed:make sure your username and password are correct and that you’re an admin or moderator
这个错误的本质是你可能也莫名奇妙不知道openfire数据库的表ofUser中username名,也不知道plainPassword字段不全。所以解决办法是直接打开数据库,清空这张表的数据再插入一条数据。最后重启openfire登陆就可以了。参考: http://re-reference.iteye.com/blog/1617812
配置好以后我们用spark来测试,同样在openfire官网下载它安装,完了打开创建一个新账户,登陆,在openfire后台会话里就可以看到当前活跃用户。

转载于:https://www.cnblogs.com/fenglh04/p/openfire.html

猜你喜欢

转载自blog.csdn.net/weixin_33979203/article/details/93186788
今日推荐