阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Tigase服务器安装以及集群

404次阅读
没有评论

共计 10108 个字符,预计需要花费 26 分钟才能阅读完成。

推荐阅读:CentOS 安装 Tigase http://www.linuxidc.com/Linux/2014-03/97858.htm

安装第一台 tigase 服务器
1.
安装 tigase 服务器所需环境。

[root@tigase3~]# yum install java-1.7.0-openjdk.x86_64 java-1.7.0-openjdk-devel.x86_64
2.
下载 tigase 服务器软件包。

[root@tigase3tmp]#wget https://projects.tigase.org/attachments/download/1342/tigase-server-5.2.0-b3447.jar
3.
建立一个服务器安装路径。

root@tigase3tmp]# mkdir /opt/tigase-server
4.
开始安装软件。

[root@tigase3tmp]# java -jar tigase-server-5.2.0-b3447.jar –console

press1 to continue, 2 to quit, 3 to redisplay

按 1 继续

Theinstalled application needs a JDK. A java runtime environment (JRE)will be not sufficient.

Enterpath: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64

输入 JDK 的路径再按回车键

Thewizards you want to execute

Installationof the Tigase Server

[on,off]

选择:on

Configurationof the Tigase Server

[on,off]

选择:on

press1 to continue, 2 to quit, 3 to redisplay

按 1 继续

1. I accept the terms of this license agreement.

2. I do not accept the terms of this license agreement.

Choosenumber (1-2): 输入 1

press1 to continue, 2 to quit, 3 to redisplay

按 1 继续

Selecttarget path [/tmp]

/opt/tigase-server

设置 tigase 服务器的安装路径。

r => Redisplay menu

d => Done

 

Chooseaction: 选 d

0  [x] Defaultinstallation

1  [] Default plusextra components

2  [] Session Manageronly

3  [] Networkconnectivity only

inputselection: 选 1

YourXMPP (Jabber) domains [tigase3.test.com]

test.com            #设置 XMPP 域为 test.com

YourXMPP (Jabber) domains [tigase3.test.com]

admin@test.com

Adminpassword [tigase]

 

0  [x] Derby (built-indatabase)

1  [] MySQL

2  [] PostgreSQL

3  [] SQLServer

4  [] Other…

inputselection: 选 2         

Advanced configurationoptions

[on, off]

Off

PostgreSQLsuper user account will be used only to create and configure databasefor the Tigase server. It will not be used by the Tigase server lateron.

 

Super user accountname: [root]

postgres                              #输入 postgres 数据库超级用户和密码.

WARNING:password will be visible while entering

Superuser password: postgres

WARNING:password will be visible while entering

Retypepassword: postgres

 

PostgreSQLdatabase details. It will be created automatically if it does notexist.

Databaseaccount: [tigase]                #输入存放 tigase 数据的数据库用户名和密码

tigase

Accountpassword: [tigase12]

tigase

Databasename: [tigasedb]

tigasedb

Databasehost or IP: [localhost]

127.0.0.1

Additionaldatabase parameters: []

 

press1 to continue, 2 to quit, 3 to redisplay

1

PerformingDB tasks

 

Checkingconnection to the database 

ConnectionOK

Checkingif the database exists 

ExistsOK

Checkingthe database schema 

Newschema loaded OK

Checkingwhether the database needs conversion 

Conversionnot needed

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Initialized database connection:jdbc:postgresql://127.0.0.1/tigasedb?user=postgres&password=postgres

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Initialized database connection:jdbc:postgresql://127.0.0.1/tigasedb?user=postgres&password=postgres

 

Allusers added

Postinstallation actions 

Finalizing…completed OK

Loadingsocks5 component schema 

Loadingsocks5 schema… completed OK

LoadingPubSub component schema 

LoadingPubSub schema… completed OK

 

 

 

Installwas successeful

applicationinstalled on /opt/tigase-server

[Console installation done]
5.
启动 tigase 服务并添加到系统启动服务.

[root@tigase3tmp]# cd /opt/tigase-server/

[root@tigase3tigase-server]# ./scripts/tigase.sh start etc/tigase.conf

StartingTigase:

Tigaserunning pid=1217

nohup:redirecting stderr to stdout

[root@tigase3tigase-server]# cd /opt/tigase-server/scripts/RedHat/init.d

[root@tigase3init.d]# cp tigase /etc/init.d/

[root@tigase3init.d]# cd /etc/init.d/

[root@tigase3init.d]# chmod a+x tigase

[root@tigase3init.d]# useradd tigase

[root@tigase3init.d]# chown -R tigase:tigase /opt/tigase-server/logs

[root@tigase3init.d]# vi tigase

TIGASE_HOME=/opt/tigase-server    安装目录改为:/opt/tigase-server

[root@tigase3init.d]# chkconfig –add /etc/init.d/tigase

[root@tigase3init.d]# chkconfig tigase on

[root@tigase3init.d]# service tigase start

StartingTigase XMPP server

Tigasestarted[OK]

安装第二台 tigase 服务器实现集群
1.
安装部署与第一台 tigase 服务器一样,只是选择数据库时不是选择本地,而是选择安装在第一台 tigase 服务器上的数据库,实现一台数据库做了后端集群,也是目前最简单最实用的方法。

安装时不同之处如下:

PostgreSQLdatabase details. It will be created automatically if it does notexist.

 

Databaseaccount: [tigase]

Tigase                        #存放 tigase 数据的用户、密码以及数据库相同

Accountpassword: [tigase12]

tigase

Databasename: [tigasedb]

tigasedb

Databasehost or IP: [localhost]

192.168.3.180                  #设置数据库连接安装在第一台 tigase 服务器的数据库.

 

最后输出时显示信息有一点不一样。

PerformingDB tasks

 

Checkingconnection to the database 

ConnectionOK

Checkingif the database exists 

ExistsOK

Checkingthe database schema 

SchemaOK, accounts number: 7

Checkingwhether the database needs conversion 

Conversionnot needed

AddingXMPP admin accounts  Apr 05, 2014 1:41:17 PMtigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

Apr05, 2014 1:41:17 PM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Initialized database connection:jdbc:postgresql://192.168.3.180/tigasedb?user=postgres&password=postgres

Allusers added

Postinstallation actions 

Finalizing…completed OK

Loadingsocks5 component schema 

Loadingsocks5 schema…

Socks5schema exists, skipping schema load

LoadingPubSub component schema 

LoadingPubSub schema…

PubSubschema exists, skipping schema load

 

重启两台服务器查看日志

tigase-console.log tigase.log.0

出现以下日志表示集群成功.

2014-04-0513:51:56.486 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted()  INFO: cluster connectionopened: 192.168.3.181, type: connect,id=192.168.3.180_54221_192.168.3.181_5277

 

如不从启服务有可能出现以下日志

2014-04-0513:51:41.400 [pool-16-thread-5] ClusterConnectionManager.processHandshake()  WARNING: Handshakingpassword doesn’t match, disconnecting: null, type: accept, Socket:nullSocket[addr=/192.168.3.180,port=54219,localport=5277], jid: null

 

重启服务都不行, 就有可能是域名解析的原因. 可用 hostname–f 查看你计算机的 FQDN,tigase5.2 后安装就实现自动集群, 但对计算机的 FQDN 比较严格.

如:

[root@tigase3logs]# hostname -f

tigase3.test.com

[root@tigase4logs]# hostname -f

tigase4.test.com

如 hostname–f 出来是未知主机, 那集群将无法实现. 改正以下两个地方

/etc/hosts

/etc/sysconfig/network

 

安装后系统集群成功后默认可以在不同服务器上登录以及添加联系人, 但建立 room 后不能实现不同服务器之前通信.

实现方法如下:

1 检查 /opt/tigase-server/jars 下是否有 tigase-acs.jar 包, 如果没有可到官网下载 max 包, 解压后再复制进去,MAX 包是最完整的,一般推荐下这个,然后按需所取即可!

2. 修改两台集群服务器的 /opt/tigase-server/etc/init.properties 文件.

将 –comp-class-1= tigase.muc.MUCComponent 改为

–comp-class-1= tigase.muc.cluster.MUCComponentClustered

两台集群服务器配置都改成一样.

重新启动 tigase 服务, 测试成功.

推荐阅读:CentOS 安装 Tigase http://www.linuxidc.com/Linux/2014-03/97858.htm

安装第一台 tigase 服务器
1.
安装 tigase 服务器所需环境。

[root@tigase3~]# yum install java-1.7.0-openjdk.x86_64 java-1.7.0-openjdk-devel.x86_64
2.
下载 tigase 服务器软件包。

[root@tigase3tmp]#wget https://projects.tigase.org/attachments/download/1342/tigase-server-5.2.0-b3447.jar
3.
建立一个服务器安装路径。

root@tigase3tmp]# mkdir /opt/tigase-server
4.
开始安装软件。

[root@tigase3tmp]# java -jar tigase-server-5.2.0-b3447.jar –console

press1 to continue, 2 to quit, 3 to redisplay

按 1 继续

Theinstalled application needs a JDK. A java runtime environment (JRE)will be not sufficient.

Enterpath: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64

输入 JDK 的路径再按回车键

Thewizards you want to execute

Installationof the Tigase Server

[on,off]

选择:on

Configurationof the Tigase Server

[on,off]

选择:on

press1 to continue, 2 to quit, 3 to redisplay

按 1 继续

1. I accept the terms of this license agreement.

2. I do not accept the terms of this license agreement.

Choosenumber (1-2): 输入 1

press1 to continue, 2 to quit, 3 to redisplay

按 1 继续

Selecttarget path [/tmp]

/opt/tigase-server

设置 tigase 服务器的安装路径。

r => Redisplay menu

d => Done

 

Chooseaction: 选 d

0  [x] Defaultinstallation

1  [] Default plusextra components

2  [] Session Manageronly

3  [] Networkconnectivity only

inputselection: 选 1

YourXMPP (Jabber) domains [tigase3.test.com]

test.com            #设置 XMPP 域为 test.com

YourXMPP (Jabber) domains [tigase3.test.com]

admin@test.com

Adminpassword [tigase]

 

0  [x] Derby (built-indatabase)

1  [] MySQL

2  [] PostgreSQL

3  [] SQLServer

4  [] Other…

inputselection: 选 2         

Advanced configurationoptions

[on, off]

Off

PostgreSQLsuper user account will be used only to create and configure databasefor the Tigase server. It will not be used by the Tigase server lateron.

 

Super user accountname: [root]

postgres                              #输入 postgres 数据库超级用户和密码.

WARNING:password will be visible while entering

Superuser password: postgres

WARNING:password will be visible while entering

Retypepassword: postgres

 

PostgreSQLdatabase details. It will be created automatically if it does notexist.

Databaseaccount: [tigase]                #输入存放 tigase 数据的数据库用户名和密码

tigase

Accountpassword: [tigase12]

tigase

Databasename: [tigasedb]

tigasedb

Databasehost or IP: [localhost]

127.0.0.1

Additionaldatabase parameters: []

 

press1 to continue, 2 to quit, 3 to redisplay

1

PerformingDB tasks

 

Checkingconnection to the database 

ConnectionOK

Checkingif the database exists 

ExistsOK

Checkingthe database schema 

Newschema loaded OK

Checkingwhether the database needs conversion 

Conversionnot needed

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Initialized database connection:jdbc:postgresql://127.0.0.1/tigasedb?user=postgres&password=postgres

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

Apr05, 2014 3:55:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Initialized database connection:jdbc:postgresql://127.0.0.1/tigasedb?user=postgres&password=postgres

 

Allusers added

Postinstallation actions 

Finalizing…completed OK

Loadingsocks5 component schema 

Loadingsocks5 schema… completed OK

LoadingPubSub component schema 

LoadingPubSub schema… completed OK

 

 

 

Installwas successeful

applicationinstalled on /opt/tigase-server

[Console installation done]
5.
启动 tigase 服务并添加到系统启动服务.

[root@tigase3tmp]# cd /opt/tigase-server/

[root@tigase3tigase-server]# ./scripts/tigase.sh start etc/tigase.conf

StartingTigase:

Tigaserunning pid=1217

nohup:redirecting stderr to stdout

[root@tigase3tigase-server]# cd /opt/tigase-server/scripts/RedHat/init.d

[root@tigase3init.d]# cp tigase /etc/init.d/

[root@tigase3init.d]# cd /etc/init.d/

[root@tigase3init.d]# chmod a+x tigase

[root@tigase3init.d]# useradd tigase

[root@tigase3init.d]# chown -R tigase:tigase /opt/tigase-server/logs

[root@tigase3init.d]# vi tigase

TIGASE_HOME=/opt/tigase-server    安装目录改为:/opt/tigase-server

[root@tigase3init.d]# chkconfig –add /etc/init.d/tigase

[root@tigase3init.d]# chkconfig tigase on

[root@tigase3init.d]# service tigase start

StartingTigase XMPP server

Tigasestarted[OK]

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计10108字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中

星哥玩云

星哥玩云
星哥玩云
分享互联网知识
用户数
4
文章数
19351
评论数
4
阅读量
7988153
文章搜索
热门文章
星哥带你玩飞牛NAS-6:抖音视频同步工具,视频下载自动下载保存

星哥带你玩飞牛NAS-6:抖音视频同步工具,视频下载自动下载保存

星哥带你玩飞牛 NAS-6:抖音视频同步工具,视频下载自动下载保存 前言 各位玩 NAS 的朋友好,我是星哥!...
星哥带你玩飞牛NAS-3:安装飞牛NAS后的很有必要的操作

星哥带你玩飞牛NAS-3:安装飞牛NAS后的很有必要的操作

星哥带你玩飞牛 NAS-3:安装飞牛 NAS 后的很有必要的操作 前言 如果你已经有了飞牛 NAS 系统,之前...
我把用了20年的360安全卫士卸载了

我把用了20年的360安全卫士卸载了

我把用了 20 年的 360 安全卫士卸载了 是的,正如标题你看到的。 原因 偷摸安装自家的软件 莫名其妙安装...
再见zabbix!轻量级自建服务器监控神器在Linux 的完整部署指南

再见zabbix!轻量级自建服务器监控神器在Linux 的完整部署指南

再见 zabbix!轻量级自建服务器监控神器在 Linux 的完整部署指南 在日常运维中,服务器监控是绕不开的...
飞牛NAS中安装Navidrome音乐文件中文标签乱码问题解决、安装FntermX终端

飞牛NAS中安装Navidrome音乐文件中文标签乱码问题解决、安装FntermX终端

飞牛 NAS 中安装 Navidrome 音乐文件中文标签乱码问题解决、安装 FntermX 终端 问题背景 ...
阿里云CDN
阿里云CDN-提高用户访问的响应速度和成功率
随机文章
安装并使用谷歌AI编程工具Antigravity(亲测有效)

安装并使用谷歌AI编程工具Antigravity(亲测有效)

  安装并使用谷歌 AI 编程工具 Antigravity(亲测有效) 引言 Antigravity...
星哥带你玩飞牛NAS-5:飞牛NAS中的Docker功能介绍

星哥带你玩飞牛NAS-5:飞牛NAS中的Docker功能介绍

星哥带你玩飞牛 NAS-5:飞牛 NAS 中的 Docker 功能介绍 大家好,我是星哥,今天给大家带来如何在...
多服务器管理神器 Nexterm 横空出世!NAS/Win/Linux 通吃,SSH/VNC/RDP 一站式搞定

多服务器管理神器 Nexterm 横空出世!NAS/Win/Linux 通吃,SSH/VNC/RDP 一站式搞定

多服务器管理神器 Nexterm 横空出世!NAS/Win/Linux 通吃,SSH/VNC/RDP 一站式搞...
终于收到了以女儿为原型打印的3D玩偶了

终于收到了以女儿为原型打印的3D玩偶了

终于收到了以女儿为原型打印的 3D 玩偶了 前些日子参加某网站活动,获得一次实物 3D 打印的机会,于是从众多...
星哥带你玩飞牛NAS-11:咪咕视频订阅部署全攻略

星哥带你玩飞牛NAS-11:咪咕视频订阅部署全攻略

星哥带你玩飞牛 NAS-11:咪咕视频订阅部署全攻略 前言 在家庭影音系统里,NAS 不仅是存储中心,更是内容...

免费图片视频管理工具让灵感库告别混乱

一言一句话
-「
手气不错
150元打造低成本NAS小钢炮,捡一块3865U工控板

150元打造低成本NAS小钢炮,捡一块3865U工控板

150 元打造低成本 NAS 小钢炮,捡一块 3865U 工控板 一块二手的熊猫 B3 工控板 3865U,搭...
让微信公众号成为 AI 智能体:从内容沉淀到智能问答的一次升级

让微信公众号成为 AI 智能体:从内容沉淀到智能问答的一次升级

让微信公众号成为 AI 智能体:从内容沉淀到智能问答的一次升级 大家好,我是星哥,之前写了一篇文章 自己手撸一...
零成本上线!用 Hugging Face免费服务器+Docker 快速部署HertzBeat 监控平台

零成本上线!用 Hugging Face免费服务器+Docker 快速部署HertzBeat 监控平台

零成本上线!用 Hugging Face 免费服务器 +Docker 快速部署 HertzBeat 监控平台 ...
星哥带你玩飞牛NAS-11:咪咕视频订阅部署全攻略

星哥带你玩飞牛NAS-11:咪咕视频订阅部署全攻略

星哥带你玩飞牛 NAS-11:咪咕视频订阅部署全攻略 前言 在家庭影音系统里,NAS 不仅是存储中心,更是内容...
小白也能看懂:什么是云服务器?腾讯云 vs 阿里云对比

小白也能看懂:什么是云服务器?腾讯云 vs 阿里云对比

小白也能看懂:什么是云服务器?腾讯云 vs 阿里云对比 星哥玩云,带你从小白到上云高手。今天咱们就来聊聊——什...