Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6329951
  • 博文数量: 162
  • 博客积分: 3600
  • 博客等级: 中校
  • 技术积分: 10366
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-19 11:23
个人简介

专注系统运维、网络架构,研究技术解决方案,记录我的思想轨迹、工作学习、生活和关注的领域

文章分类
文章存档

2014年(2)

2013年(16)

2012年(27)

2011年(117)

分类: 系统运维

2013-09-13 16:56:42

最近接手服务器系统监控项目,开源软件hyperic-hq,安装了测试环境熟悉下。
Hyperic HQ 是一个开源的IT管理框架,让用户使用统一的界面来管理各种不同的IT技术。
下载地址:



我使用的是4.6版本,官方已经更新到5.0版本
下载安装包要注意,有32,64位选择,由于我的系统是64bit,下面的测试软件都将使用64bit。大家可以根据自己环境安装。

一、Server端安装:
hyperic-hq-installer-4.6-x86-64-linux.tar.gz
安装步骤
1 新建hyperic用户
  1. #useradd hyperic
2 解压下载文件移动到/var/lib/hyperic
  1. #tar -zxvf hyperic-hq-installer-4.6-x86-64-linux.tar.gz
  2. #mv hyperic-hq-installer-4.6 /var/lib/
3 切换hyperic用户
  1. #su - hyperic
  2. $
4 执行
  1. #/var/lib/hyperic-hq-installer-4.6/setup.sh -postgresql
按步骤提示安装
hyperic-hq可以支持报考MySQL、Oracle、postgresql等数据库,详细可以查看官方文档。我就简单说明下:
  1. 默认安装:/var/lib/hyperic-hq-installer-4.6/setup.sh 那么将使用hyperic-hq自带postgresql数据库
  2. 支持其他数据库安装:/var/lib/hyperic-hq-installer-4.6/setup.sh -full 在交互中选择自己想要的数据库
  3. 支持postgresql数据库安装:/var/lib/hyperic-hq-installer-4.6/setup.sh -postgresql
这里我选择支持postgresql数据库安装:

  1. # su - hyperic
  2. -bash-3.2$ /var/lib/hyperic-hq-installer-4.6/setup.sh -postgresql
  3. Unpacking JRE to temporary directory /tmp/jre
  4. Please ignore references to missing tools.jar
  5. Unable to locate tools.jar. Expected to find it in /tmp/lib/tools.jar
  6. Loading taskdefs...
  7. Taskdefs loaded
  8. Initializing Hyperic HQ 4.6 Installation...
  9. Choose which software to install:
  10. 1: Hyperic HQ Server
  11. 2: Hyperic HQ Agent
  12. You may enter multiple choices, separated by commas.
  13. 1
  14. HQ server installation path [default '/home/hyperic']:
  15. Enter the fully qualified domain name of the SMTP server that HQ will use to send email messages [default '192.168.138.1']:
  16. Enter the email address that HQ will use as the sender for email messages [default 'hqadmin@168.138.1']:
  17. Enter an encryption key to use to encrypt the database password.:
  18. What should the username be for the initial admin user? [default 'hqadmin']:
  19. What should the password be for the initial admin user?:
  20. (again):
  21. What should the email address be for the initial admin user? [default 'hqadmin@168.138.1']:
  22. Loading install configuration...
  23. Install configuration loaded.
  24. Preparing to install...
  25. Validating server install configuration...
  26. Checking server webapp port...
  27. Checking server secure webapp port...
  28. Verifying admin user properties
  29. Validating server DB configuration...
  30. Installing the server...
  31. Unpacking server to: /home/hyperic...
  32. Creating server configuration files...
  33. Copying binaries and libraries to server installation...
  34. Copying server configuration file...
  35. Copying server db-upgrade files...
  36. Copying server libs...
  37. Setting up server database...
  38. Setting up JDBC driver...
  39. Copying database files...
  40. Configuring database...
  41. Loading taskdefs...
  42. Taskdefs loaded
  43. Starting repopulation of configuration table...
  44. Starting built-in database...
  45. Waiting for built-in database to start (on port 9432)...
  46. Preparing database...
  47. Loading taskdefs...
  48. Taskdefs loaded
  49. Loading taskdefs...
  50. Taskdefs loaded
  51. Loading taskdefs...
  52. Taskdefs loaded
  53. Waiting for server to stop...
  54. Stopping built-in database...
  55. Built-in database stopped.
  56. Installing the server JRE ...
  57. Unpacking JRE amd64-linux-1.6.tar.gz to: /home/hyperic/server-4.6...
  58. Setting permissions on /home/hyperic/server-4.6...
  59. Setting permissions on server binaries...
  60. Fixing line endings on text files...
  61. --------------------------------------------------------------------------------
  62. Installation Complete:
  63. Server successfully installed to: /home/hyperic/server-4.6
  64. --------------------------------------------------------------------------------
  65. You can now start your HQ server by running this command:
  66. /home/hyperic/server-4.6/bin/hq-server.sh start
  67. Note that the first time the HQ server starts up it may take several minutes
  68. to initialize. Subsequent startups will be much faster.
  69. Once the HQ server reports that it has successfully started, you can log in
  70. to your HQ server at:
  71. username: hqadmin
  72. password: hqadmin
  73. To change your password, log in to the HQ server, click the "Administration"
  74. link, choose "List Users", then click on the "hqadmin" user.
  75. Setup completed.
  76. A copy of the output shown above has been saved to:
  77. /var/lib/hyperic-hq-installer-4.6/installer/logs/hq-install.log
  78. Deleting temporary JRE
报错执行:
You must run this script as root:
/var/lib/hyperic-hq-installer-4.6/installer/data/hqdb/tune-os.sh
5 安装完毕之后,切换root用户启动命令
  1. $exit
  2. #chmod +x /home/hyperic/server-4.6/bin/hq-server.sh
  3. #/bin/su - hyperic -c '/home/hyperic/server-4.6/bin/hq-server.sh start'
  4. Starting HQ Server...
6 相应端口对外限制 7443端口对客户机开放 7080端口对访问ip开放
  1. # netstat -ntlp | grep java
  2. tcp 0 0 0.0.0.0:7080 0.0.0.0:* LISTEN 24037/java
  3. tcp 0 0 0.0.0.0:7443 0.0.0.0:* LISTEN 24037/java
二、客户端安装:
现在包hyperic-hq-agent-4.4.0-1509-x86_64-linux.tar
解压
  1. #tar -zxvf hyperic-hq-agent-4.4.0-1509-x86_64-linux.tar
  2. #mv hyperic-hq-agent-4.4.0 /root/soft/
编辑配置文件
  1. #vim /root/soft/hyperic-hq-agent-4.4.0/conf/agent.properties
  2. #末尾添加:
  3. agent.setup.camIP=192.168.138.1 #指向server端IP
  4. agent.setup.camPort=7080 #端口
  5. agent.setup.camSSLPort=7443
  6. agent.setup.camSecure=yes
  7. agent.setup.camLogin=hqadmin #登陆账号
  8. agent.setup.camPword=hqadmin #登陆密码
  9. agent.setup.agentIP=192.168.138.134 #客户端ip
  10. agent.setup.agentPort=2144 #客户端监听端口
  11. #/root/soft/hyperic-hq-agent-4.4.0/bin/hq-agent.sh start
三、浏览器登陆


此时服务器将会自动显示客户端监控IP及系统自带的监控项目
如果出现监控项目异常(如出现感叹号),请确认服务端和客户端的时间是否一样。
这只是开始,后期很多需要细细研究……
阅读(23696) | 评论(0) | 转发(6) |
给主人留下些什么吧!~~