文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
安装 Consul
Consul 集群的每个节点都必须先安装 Consul.安装非常容易,Consul 发布为所支持的平台和架构的二进制包.这个指南不包含从源代码编译 Consul 的内容。
安装 Consul
安装 Consul,找到适合你系统的包下载他.Consul 打包为一个'Zip'文件。
下载后解开压缩包.拷贝 Consul 到你的 PATH 路径中,在 Unix 系统中 ~/bin 和 /usr/local/bin 是通常的安装目录.根据你是想为单个用户安装还是给整个系统安装来选择.在 Windows 系统中有可以安装到 %PATH% 的路径中。
OS X
如果你使用 homebrew 作为包管理器,你可以使用命令
brew install consul
来进行安装。
验证安装
完成安装后,通过打开一个新终端窗口检查 consul 安装是否成功.通过执行 consul 你应该看到类似下面的输出
[root@hdp2 ~]# consul
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
如果你得到一个 consul not be found 的错误,你的 PATH 可能没有正确设置.请返回检查你的 consul 的安装路径是否包含在 PATH 中。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论