概要
下载
Consul 的 下载地址
代码语言:javascript复制[root@h104 consul]# wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip
--2016-03-18 15:25:40-- https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip
Resolving releases.hashicorp.com (releases.hashicorp.com)... 103.245.224.69
Connecting to releases.hashicorp.com (releases.hashicorp.com)|103.245.224.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6206903 (5.9M) [application/zip]
Saving to: ‘consul_0.6.4_linux_amd64.zip’
100%[==========================================================================>] 6,206,903 200KB/s in 24s
2016-03-18 15:26:05 (258 KB/s) - ‘consul_0.6.4_linux_amd64.zip’ saved [6206903/6206903]
[root@h104 consul]# ll
total 6064
-rw-r--r-- 1 root root 6206903 Mar 17 00:55 consul_0.6.4_linux_amd64.zip
[root@h104 consul]# sha256sum consul_0.6.4_linux_amd64.zip
abdf0e1856292468e2c9971420d73b805e93888e006c76324ae39416edcf0627 consul_0.6.4_linux_amd64.zip
[root@h104 consul]#
Tip: 建议下载完成后进行一下 校验 以确保包的完整性,Consul 0.6.4 各平台版本可以参考 SHA256 checksums for Consul 0.6.4
解压安装
解压后就是一个可以直接使用的bin文件,拷贝到合适目录就行了
代码语言:javascript复制[root@h104 consul]# ls
consul_0.6.4_linux_amd64.zip
[root@h104 consul]# unzip consul_0.6.4_linux_amd64.zip
Archive: consul_0.6.4_linux_amd64.zip
inflating: consul
[root@h104 consul]# ll
total 28528
-rwxr-xr-x 1 root root 23002736 Mar 17 00:52 consul
-rw-r--r-- 1 root root 6206903 Mar 17 00:55 consul_0.6.4_linux_amd64.zip
[root@h104 consul]# file consul
consul: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
[root@h104 consul]# ./consul --help
usage: consul [--version] [--help] <command> [<args>]
Available commands are:
agent Runs a Consul agent
configtest Validate config file
event Fire a new event
exec Executes a command on Consul nodes
force-leave Forces a member of the cluster to enter the "left" state
info Provides debugging information for operators
join Tell Consul agent to join cluster
keygen Generates a new encryption key
keyring Manages gossip layer encryption keys
leave Gracefully leaves the Consul cluster and shuts down
lock Execute a command holding a lock
maint Controls node or service maintenance mode
members Lists the members of a Consul cluster
monitor Stream logs from a Consul agent
reload Triggers the agent to reload configuration files
rtt Estimates network round trip time between nodes
version Prints the Consul version
watch Watch for changes in Consul
[root@h104 consul]# ./consul version
Consul v0.6.4
Consul Protocol: 3 (Understands back to: 1)
[root@h104 consul]# cp consul /usr/local/bin/
[root@h104 consul]# consul version
Consul v0.6.4
Consul Protocol: 3 (Understands back to: 1)
[root@h104 consul]#