http://ignite.apache.org/download.cgi下载bin.zip文件
http://dlcdn.apache.org/ignite/2.15.0/apache-ignite-2.15.0-bin.zip
解压后启动bin/ignite.sh
如果要启用集群,需要几个节点就启动几次,不需要关心端口的问题
如果要启用持久化,需要修改配置文件,上一个命令实际是加载的默认配置文件/config/default-config.xml
修改这个配置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--
默认配置
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"></bean>
-->
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="true"/>
</bean>
</property>
<!--持久化数据目录-->
<property name="storagePath" value="/dp/data/ignite"/>
</bean>
</property>
</bean>
</beans>
注意启用了持久化配置后,需要激活集群,否则所有操作都处于禁用状态查看状态
/bin/control.sh --state
激活
/bin/control.sh --set-state ACTIVE