openfire IM服务器搭建

2018-06-25  本文已影响0人  走在成长的道路上

下载安装包

    wget http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm

安装

    yum install -y glibc.i686
    yum install -y openfire-4.2.3-1.x86_64.rpm

设置开机启动

    chkconfig openfire on

启动服务

    systemctl start openfire

服务启动,进入 http://<ip>:9090 进行数据库设置即可

安装 mariadb 数据库

    yum -y install mariadb-server mariadb-client

启动数据库

    systemctl start mariadb #启动服务
    systemctl enable mariadb #设置开机启动
    systemctl restart mariadb #重新启动
    systemctl stop mariadb.service #停止MariaDB

初始化 mariadb 服务器配置,并修改密码 root:root , 命令如下:

    mysql_secure_installation

链接 db 测试

    mysql -uroot -p root

创建用户并修改访问权限

    MariaDB [(none)]> use mysql
    MariaDB [mysql]> create user openfire@localhost identified by 'password';
    MariaDB [mysql]> grant all on *.* to openfire@localhost indentified by 'password';
    MariaDB [mysql]> grant all privileges on *.* to openfire@'%' identified by 'password';
    MariaDB [mysql]> grant all privileges on *.* to openfire@'hostname' identified by 'password' with grant option;

进入到上述 openfire 后台,默认用户名密码 admin/admin, 配置 mysql 即可。

唯一一步是在初始化设置域名时,需要指定相应域名(这里主要关系到 spark 客户端注册时所书写的域名,通常也会存在于消息体xmpp中)

上一篇 下一篇

猜你喜欢

热点阅读