Battery historion windows环境搭建

Battery historion windows环境搭建

本文创建时间:2017-02-20

一、Go语言环境配置

1、首先下载Go的安装文件go1.8.windows-amd64.msi,下载地址如下:

https://golang.org/doc/install#testing

2、 配置Go环境变量:

Battery historion windows环境搭建
a.GOROOT的作用是告诉Go 命令和其他相关工具,在哪里去找到安装在你系统上的Go包,所以这里配置的是Go的安装目录

b.GOPATH可以简单理解为是工程的目录,所以创建一个GO的工程路径

c.最后配置一下环境变量,把Go的bin目录放到path环境变量中

d.检查Go是否安装成功,打开命令行输入go version

Battery historion windows环境搭建

二、git环境配置

1、下载git的安装文件Git-2.11.1-64-bit.exe

https://git-scm.com/download/win

2、安装完成检查:命令行输入gitversion

3、如果不行,把git下bin目录加入path环境变量

Battery historion windows环境搭建

三、安装Python环境

1、下载Python,地址:https://www.python.org/(注意:下载Python2.7)

2、环境变量配置,添加python的路径,一般默认C盘如下图:

Battery historion windows环境搭建

四、安装JAVA环境

1、下载安装java环境

路径:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

五、下载Battery historian源码并且运行

1、在E:\GoProject目录下运行git bashhere

2、输入命令行go get-d -u github.com/google/battery-historian/

Battery historion windows环境搭建

3、 进入到$GOPATH/src/github.com/google/battery-historian目录下方

Battery historion windows环境搭建

4、执行go run setup.go

Battery historion windows环境搭建

需*下载最好,不然可能下载不成功,可以手动下载,从 setup.go文件中可以找到下载地址

a. http://dl.google.com/closure-compiler/compiler-20160208.zip

b. https://github.com/google/closure-library

c. https://github.com/xuanluo/flot-axislabels.git

4、 下载完成后,执行go run cmd/battery-historian/battery-historian.go

5、 登录http://localhost:9999查看是否正常

Battery historion windows环境搭建

6、 导出bugreport

7、 上传bugreport文件至http://localhost:9999

a. 上传bugreport

b.查看结果