Ignite安装

单机

1、首先先安装jdk,保证环境中可找到JDK;且jdk版本为8; 执行命令 java -version 确认。
2、下载ignite安装包 https://ignite.apache.org/download.cgi 解压并配置环境变量
echo “export IGNITE_HOME=/opt/apache-ignite/bin” >> /etc/profile
3、可不做任何配置直接启动(在bin目录下执行ignite.sh启动)或者进行以下配置再启动。
4、配置如下:

  <beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/utilhttp://www.springframework.org/schema/util/spring-util.xsd">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"><!--对等类加载是否启用,默认为true不开启很容易报错--><property name="peerClassLoadingEnabled" value="true"/>
<!--失败检测 超时时长--><property name="failureDetectionTimeout" value="60000"/>
<!--公共线程池大小 --><property name="publicThreadPoolSize" value="512"/>
<!--系统线程池大小 --><property name="systemThreadPoolSize" value="512"/>
<!--源线程池大小 --><property name="stripedPoolSize" value="512"/>
<!--数据流线程池大小 --><property name="dataStreamerThreadPoolSize" value="512"/>
<!--查询线程池大小 根据实际情况而定--><property name="queryThreadPoolSize" value="512"/>
<!--平衡线程池大小 根据实际情况而定--><property name="rebalanceThreadPoolSize" value="15"/>
<!--用户验证是否开启 默认为false 开启后默认用户名密码都是ignite--><property name="authenticationEnabled" value="true"/>
<!--数据存储配置 --><property name="dataStorageConfiguration"><bean class="org.apache.ignite.configuration.DataStorageConfiguration"><!--并发性水平   可由自己实际情况而定 --><property name="concurrencyLevel" value="72"/><!--数据分布配置 默认是都存放到内存中,此处进行持久化 -->
<property name="defaultDataRegionConfiguration"><bean class="org.apache.ignite.configuration.DataRegionConfiguration"><!--是否持久化到磁盘 true为持久化 --><property name="persistenceEnabled" value="true"/><property name="name" value="vehicle_Region"/><!-- 2G initial size. 初始化内存--><property name="initialSize" value="#{1L * 1024 * 1024 * 1024}" /><!-- 10G maximum size. 最大内存大小--><property name="maxSize" value="#{1L * 1024 * 1024 * 1024}" /><property name="checkpointPageBufferSize" value="#{1L *1024* 1024 * 1024L}" /></bean></property><!-- Defining several data regions for different memory regions 持久化数据存储目录 ******注意该地方目录需修改成自己的****** --><property name="storagePath" value="/home/igniteServer/Storage" /><property name="walArchivePath" value="/home /igniteServer/WalArchive" /><property name="walPath" value="/home/igniteServer/Wal" /></bean></property><!-- Explicitly configure TCP discovery SPI to provide list of initial nodes.
Ignite自己本身有发现机制,只需要配置静态IP即可相互发现;单机只需要配置自己即可--><property name="discoverySpi"><bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"><property name="ipFinder"><bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"><property name="addresses"><list><value>127.0.0.1:47500..47509</value></list></property></bean></property></bean></property></bean>
</beans>

5、在bin目录下执行 ./ignite.sh …/config/default-config.xml 前台执行并查看 未报错且显示如下即为成功。截图如下:

集群部署

1、 首先先在一台节点中进行单机版安装(上方单机安装);
2、 执行ps –aux | grep ignite 获取ignite的pid,并将ignite进程杀死;
3、 将config目录下default-config.xml文件添加配置,如下:
原文件:

<property name="discoverySpi"><bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"><property name="ipFinder"><bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"><property name="addresses"><list><value>127.0.0.1:47500..47509</value></list></property></bean></property></bean></property>

修改添加后:

<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. --><property name="discoverySpi"><bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"><property name="ipFinder"><bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"><property name="addresses"><!--此处放置全部节点IP 如下方--><list><value>192.168.11.13:47500..47509</value><value>192.168.11.14:47500..47509</value><value>192.168.11.15:47500..47509</value></list></property></bean></property></bean></property><!--通信串行外设接口配置--><property name="communicationSpi"><bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi"><!--本节点IP--><property name="localAddress" value="192.168.11.13" /><!--连接超时时长--><property name="connectTimeout" value="60000" /></bean></property><!--网络超时时长 --><property name="networkTimeout" value="60000"/>

4、 修改之后进入bin目录 执行命令 nohup ./ignite.sh ../config/default-config.xml 1>/dev/null 2>&1 &启动ignite并后台运行(说明:最后一个&表示后台运行
5、 启动过程需要时间,可以执行./control.sh --user ignite --password ignite --state查看运行状态,如下即为启动成功:

6、 扩容节点:将配置好的整个ignite目录及/etc/profile文件同步到其他节点中,并记得修改本机IP地址。
7、 进入其他节点bin目录,执行 chmod 700 *
8、 同第一个节点一样,执行nohup ./ignite.sh ../config/default-config.xml 1>/dev/null 2>&1 &启动ignite后台运行,并通过./control.sh --user ignite --password ignite --state查看运行状态。启动成功并显示active即进行下一步。
9、 进入其他节点bin目录 执行./control.sh --user ignite --password ignite --baseline结果如下:

加入节点命令:./control.sh --user ignite --password ignite --baseline add e17db3dd-2ada-49b4-944a-75803810f10e

输入y
执行结果:

重复加入节点命令 将剩余的节点加入集群。
10、执行./control.sh --user ignite --password ignite --activate激活集群。至此集群部署完毕。

切记,ignite集群安装时,正确的步骤是:先配置好第一个节点,接着将该节点全部ignite文件传输到剩余其余节点。将各个节点配置中的ip修改,再全部启动。使用使用baseline查看节点,再加入节点。最后激活集群即可。

相关问题及解决方案

1、如果遇到ignite启动报错时,请检查:
JAVA环境是否正常
peerClassLoadingEnabled配置是否为true
防火墙是否关闭ps –aux | grep ignite 进程是否存在
www.baidu.com重新搭建。

2、当遇到如下报错时:

启动之后查看状态失败,这时候首先先查看ignite进程是否存在 ps –ef | grep ignite
如果不存在,则可认定为ignite配置有问题,则不使用后台启动,直接执行ignite.sh前台执行即可发现报错信息。
3、当遇到如下错误时:

首先查看配置文件default-config.xml。查看80行配置,需要注意的是注释有时候会影响读取,所以可以在排除配置错误之后还报错则将ignite的配置文件中的注解删掉重新测试。
4、如果遇到如下错误:

此时你需要将你持久化本地的文件目录删除干净之后再次重新启动即可。
5、如果遇到如下错误:

[code=html][igniteserver@localhost bin]$ ./control.sh --user ignite --password ignite --state
Control utility [ver. 2.7.6#20190912-sha1:21f7ca41]
2019 Copyright(C) Apache Software Foundation
User: igniteserver
--------------------------------------------------------------------------------
Cluster is active
[igniteserver@localhost bin]$ ./control.sh --user ignite --password ignite --baseline
Control utility [ver. 2.7.6#20190912-sha1:21f7ca41]
2019 Copyright(C) Apache Software Foundation
User: igniteserver
--------------------------------------------------------------------------------
Cluster state: active
Current topology version: 2Baseline nodes not found.

配置集群时配置文件正确但是执行baseline发现节点时无法正常获取,请在配置文件中添加如下配置:

<property name="metricsEnabled" value="true">

参考:https://www.javacodegeeks.com/2018/12/apache-ignite-baseline-topology-examples.html
然后启动ignite激活集群,之后查看baseline就正常显示了。 (野比小熊雄-----提供)

CentOs7如何搭建Ignite单机及集群相关推荐

  1. centos7 kafka2.3.1单机伪集群部署

    接上篇文章centos7 zookeeper单点部署,准备好相应的包 cp config/server.properties config/server0.properties vi config/s ...

  2. centos7 zookeeper3.5.6单机伪集群部署

    接上篇文章centos7 zookeeper单点部署准备好zookeeper包,进行集群部署 单机伪集群部署 zookeeper1 zookeeper2 zookeeper3 三个目录分别部署一个服务 ...

  3. centos7服务器搭建elasticsearch7.6.0集群

    虚拟机环境 软件:VMWare 系统:CentOS7 主机:192.168.25.132.192.168.25.133.192.168.25.134 IP 节点名称 192.168.25.132 no ...

  4. centos7 rabbitmq 单机部署 集群部署 HAProxy 负载均衡搭建

    准备工作 搭建 RabbitMQ Server 单机版 搭建 RabbitMQ Server 高可用集群 搭建 HAProxy 负载均衡 一.准备工作 节点 系统 版本 ip node1 centos ...

  5. RocketMq单机和集群搭建教程

    文章目录 1. rocketMQ单机版安装 2. rocketMQ集群方案 3. rocketMQ集群搭建 4. Dleger搭建rokcetMQ高可用集群 5. 启动rockerMQ控制台界面 6. ...

  6. 【运维技术】Zookeeper单机以及集群搭建教程

    Zookeeper单机以及集群搭建教程 单机搭建 单机安装以及启动 安装zookeeper的前提是必须有java环境 # 选择目录进行下载安装 cd /app # 下载zk,可以去官方网站下载,自己上 ...

  7. zookeeper单机和集群搭建过程详细步骤

    文章目录: ▶ 单机环境搭建 ▶ 设置zookeeper为开机服务 ▶ 集群环境搭建 单机环境搭建 要求: 依赖Java环境 单机搭建过程: 进入到/opt目录下,创建zookeeper 文件夹 cd ...

  8. Centos7 安装ELK/EFK 7.x 集群搭建实战攻略

    Centos7 安装ELK/EFK 7.x 集群搭建实战攻略 1.1 写在前面的话 1.2 开始之前 1.3 安装ELK/EFK 1.3.1 海量数据存储和检索-->E-->安装Elast ...

  9. 多台es服务器搭建elasticsearch集群,es单机伪集群搭建,在一台服务器上以三个不同的端口模拟三台主机完成es伪集群搭建,windows和Linux操作方法一致

    目录 (一)es单机伪集群搭建 一.准备三台elasticsearch服务器(复制三个es目录) 二.修改每台服务器的配置 1.修改es配置文件 2.配置注意 (二)多台服务器es集群搭建: 1 安装 ...

最新文章

  1. 第一讲 网络安全概述笔记
  2. vmware中系统开机黑屏_macOS Catalina系统Vmware Fusion虚拟机黑屏问题的解决过程
  3. 2018-04-12 Linux学习
  4. 使用FMDB多线程訪问数据库,及database is locked的问题
  5. 『设计模式』--常见面向对象设计原则
  6. qq浏览器极速版_安卓手机QQ轻聊版大升级,极速版正式上线:无广告/省内存
  7. 财报上新不久的Mobvista,还内藏何种“惊艳”?
  8. angularjs 表单校验指令_angular4.0的模板式表单、响应式表单及其错误提示
  9. python批处理将图片进行放大实例代码
  10. 服务器iis如何开启tlsv1.2协议,Windows系统中IIS启用TLS 1.2
  11. 如何连接文档服务器,如何连接服务器地址
  12. Cadence导入AD的pcb文件中元件的封装
  13. PPT模板 | 红色学术风论文答辩PPT模板
  14. ZEMAX | 在OpticStudio中建立扩增实境(VR)头戴式显示器
  15. 第二次练车,练了一天倒库
  16. vrchat新手教程_VRChat简易教程3-往世界里导入模型和VRC接口初探
  17. 作为Senior Recruiter想跟大家聊聊求职,希望对大家有所帮助~
  18. 从u盘引导进入linux6,使用U盘启动安装U盘内linux6.1
  19. manjaro安装百度网盘
  20. 读漫画中国式项目管理总结

热门文章

  1. unity编写代码控制飞机飞行
  2. 理解虚数、复数、复数坐标系、复平面
  3. 王者之争-谁是浏览器速度王者?
  4. hive的location和External
  5. tmpfs临时文案系统
  6. sharepoint网站如何发布到外网
  7. 开源数据库管理系统DBeaver
  8. 70%嵌入式从业人员月薪3000-8000元
  9. 读书笔记:《MBA 轻松读(第二辑):博弈论》
  10. Android调用系统相机和相册