Openfire for mac 环境搭建

参考网址:

http://www.jianshu.com/p/f28c4193e8fc

http://cdn0.jianshu.io/p/729fa512d08d

1、openFire下载:

  https://igniterealtime.org/downloads/(下载dmg)

2、mySql下载:

http://dev.mysql.com/downloads/mysql/

myworkbench下载:

http://dev.mysql.com/downloads/workbench/

3、配置mysql

安装的时候记录 密码2016-06-13T06:08:05.901993Z 1 [Note] A temporary password is generated for root@localhost: 7vq&4xB3s&eL
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
进入成功还会出现问题


卸载MySQL:
http://stackoverflow.com/questions/1436425/how-do-you-uninstall-mysql-from-mac-os-x


ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
解决:
http://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac/33511149

运行mysql

alias mysql=/usr/local/mysql/bin/mysql

alias mysqladmin=/usr/local/mysql/bin/mysqladmin

mysql -u root -p

创建好 openfire 数据库

创建名为openfire数据库

$create database openfire;

显示所有数据库列表

$show databases;

打开某个数据库(比如数据库:openfire)

$use openfire;

显示本库中的所有表

$show tables;

4、配置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 //可通过 $java -version 查看版本
./openfire.sh

 终端设置好后的配置:

http://www.cnblogs.com/xiaodao/archive/2013/04/05/3000554.html

地址:http://localhost:9090/index.jsp

jdbc:mysql://localhost:3306/openfire?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

 遇到问题

卸载openFire    

sudo rm -rf /Library/PreferencePanes/Openfire.prefPane

sudo rm -rf /usr/local/openfire

sudo rm -rf /Library/LaunchDaemons/org.jivesoftware.openfire.plist
原文地址:https://www.cnblogs.com/superbobo/p/5581294.html