Nov 012021
官方文档都很详细,ETCD编译,需要go的环境
- https://golang.org/doc/install
- https://etcd.io/docs/v3.5/quickstart/
过程倒是比较顺利
## 下载安装包
wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
## 解压
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
##设置环境变量
vi /etc/profile
## 增加一行
export PATH=$PATH:/usr/local/go/bin
#ssh退出再登录
go version
go version go1.17.2 linux/amd64
ETCD
git clone -b v3.5.0 https://github.com/etcd-io/etcd.git
cd etcd
./build.sh
## build 完成的安装包在bin的目录下
cd bin/
#查看编译出来的包
ls -la
总用量 74240
drwxr-xr-x 2 root root 4096 11月 1 09:26 .
drwxr-xr-x 20 root root 4096 11月 1 09:26 ..
-rwxr-xr-x 1 root root 31675675 11月 1 09:26 etcd
-rwxr-xr-x 1 root root 24202646 11月 1 09:26 etcdctl
-rwxr-xr-x 1 root root 20128729 11月 1 09:26 etcdutl
##查看版本
./etcd --version
etcd Version: 3.5.0
Git SHA: 946a5a6
Go Version: go1.17.2
Go OS/Arch: linux/amd64