title | weight |
---|---|
Download and build |
1 |
The etcd performance benchmarks run etcd on 8 vCPU, 16GB RAM, 50GB SSD GCE instances, but any relatively modern machine with low latency storage and a few gigabytes of memory should suffice for most use cases. Applications with large v2 data stores will require more memory than a large v3 data store since data is kept in anonymous memory instead of memory mapped from a file. For running etcd on a cloud provider, see the Example hardware configuration documentation.
The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, appc, and Docker. Instructions for using these binaries are on the GitHub releases page.
For those wanting to try the very latest version, build etcd from the master
branch. Go version 1.9+ is required to build the latest version of etcd. To ensure etcd is built against well-tested libraries, etcd vendors its dependencies for official release binaries. However, etcd's vendoring is also optional to avoid potential import conflicts when embedding the etcd server or using the etcd client.
To build etcd
from the master
branch without a GOPATH
using the official build
script:
$ git clone https://github.com/etcd-io/etcd.git
$ cd etcd
$ ./build
To build a vendored etcd
from the master
branch via go get
:
# GOPATH should be set
$ echo $GOPATH
/Users/example/go
$ go get -v go.etcd.io/etcd
$ go get -v go.etcd.io/etcd/etcdctl
Check the etcd binary is built correctly by starting etcd and setting a key.
If etcd is built without using go get
, run the following:
$ ./bin/etcd
If etcd is built using go get
, run the following:
$ $GOPATH/bin/etcd
Run the following:
$ ./bin/etcdctl put foo bar
OK
(or $GOPATH/bin/etcdctl put foo bar
if etcdctl was installed with go get
)
If OK is printed, then etcd is working!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。