首先安装openfire服务器,安装完成后打开openfire服务器,如图所示:

打开终端,按顺序输入以下命令:**(注意细小的标点符号,建议逐一复制命令到终端运行)
①:sudo chmod -R 777 /usr/local/openfire/bin
②:sudo su
③:cd /usr/local/openfire/bin
④:export JAVA_HOME=
/usr/libexec/java_home
⑤:echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home
⑥: cd /usr/local/openfire/bin
⑦: ./openfire.sh
一条条执行完毕后,再重新点击Start Openfire就可以了。
openfire启动成功后,点击Open Admin Console配置openfire服务器:
1.设置语言,选中文

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

3.数据库设置
如果要设置外部数据库(推荐,比如:MySQL),选择标准数据库连接

4.设置数据库连接

温馨提示:密码要空着,不然会报错
在此之前要导入openfire数据库,打开XAMPP服务器,如图:

点击Go To Application,进入到如下界面:


此时需要一个数据库文件,前往文件夹

找到openfire文件夹,如下图:


设置完成后进入到database文件夹找到openfire_mysql.sql文件,拷贝到桌面,然后回到导入openfire界面,点击浏览,把刚才拷到桌面的openfire_mysql.sql文件添加进去,点击执行,大功告成!接下来回到数据库设置界面,如下:

点击继续,输入邮箱和初始化密码

至此openfire配置完成,祝君成功!
网友评论
A connection to the database could not be made. View the error message by opening the "/logs/error.log" log file, then go back to fix the problem.