共計 2013 個字符,預計需要花費 6 分鐘才能閱讀完成。
這篇文章主要為大家展示了“如何安裝 orchestrator 元數據庫 MySQL”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓丸趣 TV 小編帶領大家一起研究并學習一下“如何安裝 orchestrator 元數據庫 MySQL”這篇文章吧。
安裝 orchestrator 元數據庫 MySQL 安裝 MySQL 的步驟省略,和常規安裝 MySQL 一樣。安裝完成后創建 orchestrator 需要用到的庫和用戶。
CREATE DATABASE IF NOT EXISTS orchestrator;
CREATE USER orchestrator @ 127.0.0.1 IDENTIFIED BY orchestrator
GRANT ALL PRIVILEGES ON `orchestrator`.* TO orchestrator @ 127.0.0.1
這里元數據庫 MySQL 和 orchestrator 在同一臺機器上,所以創建賬號的時候用的 127.0.0.1,如果不在同一臺機器上,將 IP 換成 orchestrator 所在機器 ip。
密碼按需修改。 安裝 orchestrator 下載 orchestrator 安裝包,這里用的是 orchestrator-3.1.0-linux-amd64.tar.gz。https://github.com/github/orchestrator/releases 解壓 orchestrator 安裝包。
tar -xvzf orchestrator-3.1.0-linux-amd64.tar.gz -C /
將 /usr/local/orchestrator/orchestrator-sample.conf.json 移動到 /etc 下,并命名為 orchestrator.conf.json。
[root@10-10-30-146 orchestrator]# ls
orchestrator orchestrator-sample-sqlite.conf.json orchestrator-sample.conf.json resources
[root@10-10-30-146 orchestrator]# cp orchestrator-sample.conf.json /etc/orchestrator.conf.json
目標監控數據庫授權在需要監控的目標數據庫上進行授權。這里目標數據庫是:10.10.30.129:3306
CREATE USER orchestrator @ orch_host IDENTIFIED BY orch_topology_password
GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO orchestrator @ orch_host
GRANT SELECT ON mysql.slave_master_info TO orchestrator @ orch_host
GRANT SELECT ON ndbinfo.processes TO orchestrator @ orch_host -- Only for NDB Cluster
其中,將 orch_host 改成對應 orch 所在服務器的 ip,orch_topology_password 改成合適的密碼。這里 orch_host 是 10.10.30.146,將密碼改為 orchestrator。 修改 orchestrator 配置文件修改 /etc/orchestrator.conf.json 如下:
/// 配置 orchestrator 后端元數據庫信息
MySQLOrchestratorHost : 127.0.0.1 ,
MySQLOrchestratorPort : 3306,
MySQLOrchestratorDatabase : orchestrator ,
MySQLOrchestratorUser : orchestrator ,
MySQLOrchestratorPassword : orchestrator ,
/// 配置 orchestrator 監控的目標數據庫信息
MySQLTopologyUser : orchestrator ,
MySQLTopologyPassword : orchestrator ,
啟動 orchestrator
cd /usr/local/orchestrator ./orchestrator --config=/etc/orchestrator.conf.json http
web 端訪問地址 10.10.30.146:3000。頁面效果如下:
以上是“如何安裝 orchestrator 元數據庫 MySQL”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注丸趣 TV 行業資訊頻道!