【meterspere】windows平台搭建metersphere二次开发环境

1、官网

https://www.fit2cloud.com/metersphere/index.html

 

2、文档

https://metersphere.io/docs/

https://github.com/metersphere/metersphere

 

3、环境

windwos10
jdk 1.8
maven 3.8.2
node 16.10.0(npm 6.14.15)
docker 4.5.0
mysql 5.7.31
kafka 2.8.0
redis 6.2.5
vscode

 

4、配置npm国内镜像源

https://developer.aliyun.com/mirror/NPM?spm=a2c6h.13651102.0.0.55c51b11AKG3xg

 

5、配置mvn国内镜像源

https://developer.aliyun.com/mirror/maven?spm=a2c6h.13651102.0.0.55c51b11AKG3xg

 

6、安装kafka

https://blog.csdn.net/weixin_39752599/article/details/122972580

 

7、安装mysql5.7.33

https://blog.csdn.net/huo_wa/article/details/117126880

 

8、下载项目

git clone https://github.com/metersphere/metersphere.git

 

9.相关配置

mysql配置

[mysqld]
default-storage-engine=INNODB
lower_case_table_names=1
table_open_cache=128
max_connections=2000
max_connect_errors=6000
innodb_file_per_table=1
innodb_buffer_pool_size=1G
max_allowed_packet=64M
transaction_isolation=READ-COMMITTED
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout=1800
innodb_flush_log_at_trx_commit=0
sync_binlog=0
 
server-id=1
log-bin=mysql-bin
expire_logs_days = 2
binlog_format=mixed
 
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
skip-name-resolve

这里坑了好久,一致初始化数据库过不去

 

后端项目配置

# 数据库配置
spring.datasource.url=jdbc:mysql://localhost:3306/metersphere_dev?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false
spring.datasource.username=root
spring.datasource.password=123456
 
# kafka 配置,node-controller 以及 data-streaming 服务需要使用 kafka 进行测试结果的收集和处理
kafka.partitions=1
kafka.replicas=1
kafka.topic=JMETER_METRICS
kafka.test.topic=JMETER_TESTS
kafka.bootstrap-servers=localhost:9092
kafka.log.topic=JMETER_LOGS
kafka.report.topic=JMETER_REPORT
 
# node-controller 所使用的 jmeter 镜像版本 
jmeter.image=registry.fit2cloud.com/metersphere/jmeter-master:0.0.6
 
# TCP Mock 端口范围
tcp.mock.port=10000-10010
 
# Redis 配置
spring.redis.host=localhost
spring.redis.port=6379
spring.redis.password=123456
 
# 启动模式,lcoal 表示以本地开发模式启动
run.mode=local

 

 

10、编译项目

mvn install

 

11、运行项目

java -jar .\backend\target\backend-1.16.jar

或者

#进入Metersphere后端目录
cd metersphere/backend
#运行spring-boot项目
sudo mvn spring-boot:run

 

12.查看效果

 

 

 默认用户名和密码

https://metersphere.io/docs/quick_start/quick_start/

 

参考链接:

https://blog.csdn.net/xiaohuigege/article/details/121082059

https://blog.csdn.net/cuishuangyuan/article/details/124406111

https://blog.csdn.net/weixin_39752599/article/details/122972580

https://blog.csdn.net/huo_wa/article/details/117126880

 

posted @ 2022-07-28 16:44  代码诠释的世界  阅读(1930)  评论(0编辑  收藏  举报