kafka_exporter
编译安装github上的kafka_exporter项目:https://github.com/danielqsj/kafka_exporter
1、安装go
| [root@localhost ~]# go
bash: go: command not found
[root@localhost ~]# yum -y install go
...
|
2、安装git工具
| [root@localhost ~]# git
bash: git: command not found
[root@localhost ~]# yum -y install git
|
4、从github上下载kafka_exporter的源码
| [root@localhost ~]# go get -d -v github.com/danielqsj/kafka_exporter
github.com/danielqsj/kafka_exporter (download)
created GOPATH=/root/go; see 'go help gopath'
|
5、暂时未知原因,需要这一步操作
| touch /root/go/bin/promu
ln -s /root/go/bin/promu /bin/promu
rm -f /root/go/bin/promu
|
6、安装kafka_exporter
| cd /root/go/src/github.com/danielqsj/kafka_exporter
make
|
附录:go get使用时的附加参数
使用 go get 时可以配合附加参数显示更多的信息及实现特殊的下载和安装操作,详见下表所示。
附加参数 |
备 注 |
-v |
显示操作流程的日志及信息,方便检查错误 |
-u |
下载丢失的包,但不会更新已经存在的包 |
-d |
只下载,不安装 |
-insecure |
允许使用不安全的 HTTP 方式进行下载操作 |