confd is a lightweight configuration management tool focused on:
confd 安装需要依赖golang的源码的,官方安装教程如下:
Building
Go 1.10 is required to build confd, which uses the new vendor directory.
$ mkdir -p $GOPATH/src/github.com/kelseyhightower $ git clone https://github.com/kelseyhightower/confd.git $GOPATH/src/github.com/kelseyhightower/confd $ cd $GOPATH/src/github.com/kelseyhightower/confd $ make
You should now have confd in your bin/ directory:
$ ls bin/ confd
结果安装的编译的时候报如下错误:
# _/src/github.com/kelseyhightower/confd
./config.go:76:24: config.Endpoint undefined (type Config has no field or method Endpoint)
./config.go:77:24: config.Group undefined (type Config has no field or method Group)
./config.go:78:24: config.Namespace undefined (type Config has no field or method Namespace)
./config.go:79:24: config.AccessKey undefined (type Config has no field or method AccessKey)
./config.go:80:24: config.SecretKey undefined (type Config has no field or method SecretKey)
./config.go:81:22: config.OpenKMS undefined (type Config has no field or method OpenKMS)
./config.go:82:24: config.RegionId undefined (type Config has no field or method RegionId)
make: *** [build] Error 2
原来系统上没有golang,yum install -y golang.x86_64
安装完成后, $GOPATH 路径为空,没有显示设置,其实默认安装 golang的源码路径在 /usr/lib/golang/src 所以,可以显示设置
$GOPATH=/usr/lib/golang 然后按上述编译即可完成。
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!