Glowroot Central集群搭建经验总结

本文介绍了使用Glowroot Central最新版本0.13.1搭建高可用集群过程的一些经验总结,供后来者在使用Glowroot Central集群时借鉴。node

1.安装Cassandra集群

搭建Glowroot Central集群首先要搭建Cassandra集群。我使用的是Canssandra 3.11.4,使用两台CentOS 7.4服务器192.168.56.101和 192.168.56.102搭建集群,Cassandra服务器运行须要JDK环境,我这两台服务器上已经预装了Open JDK 1.8.0_191,若是服务器上没有安装JDK环境的话须要自行安装Oracle JDK或者Open JDK,安装方法再也不赘述。数据库

从Cassandra官网下载3.11.4的压缩包,分别解压缩到两台服务器的/opt/soft/cassandra目录下 bash

在两台服务器上建立cassandra用户,用于启动cassandra服务器,由于Cassandra 3不建议使用root用户启动Cassandra服务器, 将/opt/soft/cassandra目录的全部者改成cassandra用户。服务器

在/opt/soft/cassandra目录下创建data,commitlog和saved_caches三个目录,用于cassandra服务器运行时使用 修改conf目录下的cassandra.yaml文件,将192.168.56.101做为Seed服务器,修改内容以下表maven

192.168.56.102的cassandra.yaml文件修改的值与192.168.56.101同样,除了listen_address, rpc_address两个属性的值为192.168.56.102。oop

修改配置文件后还须要中止两台服务器的防火墙服务,以免干扰两台Cassandra服务器的内部通讯。spa

关闭防火墙后切换到/opt/soft/cassandra/bin目录,执行./cassandra文件启动Cassandra服务器,先启动192.168.56.101服务器,再启动192.168.56.102服务器(由于192.168.56.101服务器是Seed服务器) 。3d

咱们在192.168.56.101上执行如下命令,查看Cassandra集群节点启动状况code

cd /opt/soft/cassandra/bin
./nodetool status

查看到的集群节点状态以下图所示blog

咱们建立glowroot集群访问Cassandra集群的数据库用户glowroot。

在hadoop01上使用cqlsh命令登陆Cassandra集群(第一次登陆使用默认管理员用户cassandra,密码cassandra)

建立超级用户glowroot,密码glowroot

建立结束后,使用glowroot用户登陆cqlsh,确认glowroot用户已经建立成功

2.安装Glowroot Central集群

咱们使用两台服务器(192.168.56.103和192.168.56.104)搭建Glowroot Central集群,为了启动Glowroot集群方便,我在这两台服务器上都建立了glowroot用户,用于启动Glowroot服务器。

咱们使用的Glowroot Central是0.13.1版本,从https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.glowroot&a=glowroot-central&c=dist&e=zip&v=0.13.1-SNAPSHOT下载Glowroot Central压缩包, 上传并解压到192.168.56.103和192.168.56.104两台服务器的/opt/soft/glowroot-central目录下,并设置这个目录的owner是glowroot(以下图所示)

修改glowroot-central.properties文件以下:

相关文章
相关标签/搜索