1.上传到服务器
2.解压
tar -xvf weevent-1.4.0.tar.gz
3.修改配置文件 ./config.properties
修改了java地址,节点版本,节点sdk路径,数据库类型,数据库账户,密码
!!!!注意,java版本最好选择1.8.0_231一下版本,不然web3sdk会连不上,具体表现就是:
broker安装失败
deploy topic control failed.
deploy topic control contract failed
install broker failed, exit
或者
开发老师的话
推荐Oralce JDK,如果是1.8.0.231及以上版本,在使用时都需要配置jvm参数-Djdk.tls.namedGroups=“secp256k1”
如果在CentOS中使用Open JDK,请先升级到1.9
> 这里是引用
# Java jdk environment
JAVA_HOME=/software/jdk1.8.0_221
# Required module fisco-bcos
# support 2.x
fisco-bcos.version=2.4.1
# FISCO-BCOS node channel, eg: 127.0.0.1:20200;127.0.0.2:20200
fisco-bcos.channel=127.0.0.1:20200
# The path of FISCO-BCOS 2.0 that contain certificate file ca.crt/sdk.crt/sdk.key
fisco-bcos.node_path=~webase-deploy/nodes/127.0.0.1/sdk
# Required module api gateway
gateway.port=8080
zookeeper.default=true
zookeeper.connect-string=127.0.0.1:2181
# Required module broker
broker.port=7000
# Optional module governance
governance.enable=false
governance.port=7009
#support both h2 and mysql, default h2
database.type=mysql
mysql.ip=127.0.0.1
mysql.port=3306
mysql.user=test
mysql.password=123456
# Optional module processor
processor.enable=false
processor.port=7008
使用Weevent-sample
1.配置gradle
推荐版本:4.10.3
1.1下载安装包
wget https://downloads.gradle.org/distributions/gradle-4.10.3-all.zip
1.2解压到指定路径
unzip gradle-4.10.3-all.zip -d /software/
1.3配置环境 /etc/profile
export GRADLE_HOME=/software/gradle-4.10.3 //这里的路径由具体安装路径决定
export PATH=$GRADLE_HOME/bin:$PATH
1.4测试
gradle -v