外網服務器: www.InnovateDigital.com 用戶名/密碼 test/testgit
內網服務器:192.168.1.125bash
操做系統都是 Centos 7 64bit服務器
Hyperic 5.8.5 ,點擊 該連接ssh
參照 在Centos 6 64bit 上安裝 Hyperic HQ 5.8.2.1 中文版 在內網服務器(192.168.1.125)上,安裝好 Hyperic Server,並把Hyperic Agent安裝文件上傳到 外網服務器 www.InnovateDigital.com的 /home/test 目錄下spa
在內網服務器上,運行下面命令操作系統
ssh -N -v -R 7788:192.168.1.125:7080 test@www.innovatedigital.com
根據提示填寫密碼。 .net
其中code
-R 創建反向隧道(從外網服務器到內網服務器)orm
7788 是在外網服務器上的監聽端口server
192.168.1.125 是本地(內網服務器)地址
7080 是內網服務器的端口
將到外網服務器端口 7788的訪問,映射到內網服務器端口7080上。
在外網服務器上,使用 tar xzvf 解壓縮 Hyperic Agent 安裝包,而後運行:
[test@tester bin]$ cd /home/test/agent-5.8.5/bin [test@tester bin]$ ./hq-agent.sh start Starting HQ Agent...... running (20732). [ Running agent setup ] What is the HQ server IP address: localhost Should Agent communications to HQ always be secure [default=yes]: no What is the HQ server http port [default=7080]: 7788 - Testing secure connection ... Success What is your HQ login [default=hqadmin]: What is your HQ password: 請輸入hqadmin的密碼 What IP should HQ use to contact the agent [default=42.96.136.116]: What port should HQ use to contact the agent [default=2144]: - Received temporary auth token from agent - Registering agent with HQ The server to agent communication channel is using a self-signed certificate and could not be verified Are you sure you want to continue connecting? [default=no]: yes - HQ gave us the following agent token 1409038071406-733078726523143911-738338007125620383 - Informing agent of new HQ server - Validating - Successfully setup agent