标签:style blog http color io os ar for 文件
一、下载并安装openfire
1.到http://www.igniterealtime.org/downloads/index.jsp下载最新openfire for mac版
比如:Openfire 3.8.1,下载后的文件:openfire_3_8_1.dmg
2.点击安装,并执行默认操作

3.启动openfire服务
在系统偏好设置的其他里,点击openfire偏好

二、配置openfire服务器
1.设置语言,选中文

2.主机设置
设置主机的访问ip地址

注意:域不能是机器名,否则会如下错误:
HTTP ERROR: 500 INTERNAL_SERVER_ERROR
本地的域,要设置为127.0.0.1
3.数据库设置
如果要设置外部数据库(推荐,比如:MySQL),选择标准数据库连接

4.设置数据库连接

(1)数据库驱动选择:MySQL,前提是已安装MySQL(具体的安装方法可以参考上一篇:mac上安装MySQL)
(2)JDBC驱动,默认不变
(3)数据库URL:
形式如下:
- jdbc:mysql://你的主机名:端口号/数据库名称
复制代码
这里设置为
- jdbc:mysql://localhost:3306/openfire
复制代码
其中主机名[host-name]改为localhost,
其中数据库名称[database-name]改为openfire
解决数据库字符编码问题,可以在后面加
- ?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
复制代码
最终的url形式是
- jdbc:mysql://localhost:3306/openfire?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
复制代码
注意:前提是已存在一个名为openfire的数据库,否则会报如下错误,连接配置不成功
The Openfire database schema does not appear to be installed. Follow the installation guide to fix this error.
前期的MySQL数据库准备工作如下:
<1>设置/usr/local/openfire文件夹的访问权限为可读写
方法1:在finder中前往文件夹/usr/local/,右键openfire文件夹,显示简介
点击如图右下角中的锁图标解锁,并设置权限为:可以读写
<ignore_js_op>

MAC上搭建operfire服务器
标签:style blog http color io os ar for 文件
原文地址:http://www.cnblogs.com/BinZone/p/4002819.html