您好,登錄后才能下訂單哦!
本篇內容主要講解“windows怎么安裝consul”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“windows怎么安裝consul”吧!
官網下載速度慢,不推薦
?官網下載地址:https://www.consul.io/downloads.html?其他下載: https://javapro.lanzous.com/id77xza
打開 Windows PowerShell, 使用 .\consul.exe -h 查看命令幫助
PS C:\WINDOWS\system32> d:
PS D:\> cd .\consul_1.7.3_windows_amd64\
PS D:\consul_1.7.3_windows_amd64> .\consul.exe -h
Usage: consul [--version] [--help] <command> [<args>]
Available commands are:
acl Interact with Consul's ACLs
agent Runs a Consul agent
catalog Interact with the catalog
config Interact with Consul's Centralized Configurations
connect Interact with Consul Connect
debug Records a debugging archive for operators
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.
intention Interact with Connect service intentions
join Tell Consul agent to join cluster
keygen Generates a new encryption key
keyring Manages gossip layer encryption keys
kv Interact with the key-value store
leave Gracefully leaves the Consul cluster and shuts down
lock Execute a command holding a lock
login Login to Consul using an auth method
logout Destroy a Consul token created with login
maint Controls node or service maintenance mode
members Lists the members of a Consul cluster
monitor Stream logs from a Consul agent
operator Provides cluster-level tools for Consul operators
reload Triggers the agent to reload configuration files
rtt Estimates network round trip time between nodes
services Interact with services
snapshot Saves, restores and inspects snapshots of Consul server state
tls Builtin helpers for creating CAs and certificates
validate Validate config files/directories
version Prints the Consul version
watch Watch for changes in Consul
運行命令, 體驗開發版
PS D:\consul_1.7.3_windows_amd64> .\consul.exe agent -dev
notes: 以開發版運行的時候 K/V 不保存哦~
看到控制臺打印信息正常后,訪問 http://localhost:8500/ui/dc1/services
新建 server 服務,指定 data-dir 保存數據
consul agent -server -bootstrap-expect 1 -data-dir "D://consul_1.7.3_windows_amd64/consul" -advertise 192.168.0.105 -ui -node=server1 -bind 192.168.0.105 -client 0.0.0.0 -rejoin -config-dir "D://consul_1.7.3_windows_amd64//config"
?-server: consul 服務端?-bootstrap-expect: 在一個 datacenter 中期望提供的 server 節點數目,當該值提供的時候,consul 一直等到達到指定 server 數目的時候才會引導整個集群?-data-dir: 持久化數據目錄?-advertise: ip 地址,廣播地址?-client: 可訪問服務的 ip?-config-dir:配置文件地址
測試 consul 持久化
新增一個 Key/Value關閉,重新打開還在,ok
windows - consul 的安裝到此結束了哦~
到此,相信大家對“windows怎么安裝consul”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。