h2数据库集群部署
一. 环境准备
- 准备两台机器,分别为Server1 , Server2
二. h2数据库安装
http://h2database.com/html/download.html
cd /opt
uzip h2-2019-10-14.zip
Server1:
mkdir /opt/h2/bin/h2ser1
Server2:
mkdir /opt/h2/bin/h2ser1
Server1:
vim /opt/h2/bin/h2.sh
java -cp "$dir/h2-1.4.200.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Server -tcpAllowOthers -tcpPort 9101 -webAllowOthers -webPort 8082 -baseDir /opt/h2/bin/h2ser1 -ifNotExists "$@"
Server2:
vim /opt/h2/bin/h2.sh
java -cp "$dir/h2-1.4.200.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Server -tcpAllowOthers -tcpPort 9101 -webAllowOthers -webPort 8082 -baseDir /opt/h2/bin/h2ser2 -ifNotExists "$@"