Zabbix Server 3.0.7 Centos6.5编译安装
来源:互联网 发布:有没有钢琴软件 编辑:程序博客网 时间:2024/05/21 14:09
前言
服务器上线对于云服务商来说已经做得非常的完成,各种主机的监控数据。直观的反应服务器的运行状态、负载等,如AWS、Aliyun等。有时候需要对具体的程序进行监控如JVM MySQL Redis等,尝试了Zabbix 、Negios这两个监控解决方案,在此记录下编译安装过程。
环境
-系统:centos6.5
-软件:Zabbix 3.0.7 源码
前提
- selinux状态关闭
vi /etc/selinux/configSELINUX=disabled#重启服务器
- 下载zabbix 3.0.7 安装包
cd /tmpwget http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.7/zabbix-3.0.7.tar.gztar -zxvf zabbix-3.0.7.tar.gz
- 安装MySQL 5.6
Centos 6.5 安装MySQL 5.6
#配置my.cnf[mysqld]innodb_file_per_table=1
- 编译环境
yum -y install gcc mysql-community-devel libxml2-devel unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI-devel openssl-devel openldap-devel
- 安装PHP5.6 及Httpd
rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpmyum -y install httpd php56w php56w-gd php56w-mysqlnd php56w-bcmath php56w-mbstring php56w-xml php56w-ldap#配置php.inivim /etc/php.inipost_max_size = 16Mmax_execution_time = 300max_input_time = 300date.timezone = Asia/Shanghaialways_populate_raw_post_data = -1#配置httpd.confvim /etc/httpd/conf/httpd.confServerName 127.0.0.1DirectoryIndex index.html index.html.var index.php
Zabbix Installation
- 创建zabbix 用户组和用户
groupadd zabbixuseradd -g zabbix zabbix
- 编译及安装
将zabbix 安装到/usr/local/zabbix下
cd /tmp/zabbix-3.0.7/./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --enable-java --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl --prefix=/usr/local/zabbixmake install
- 修改配置文件zabbix_server.conf
vim /usr/local/zabbix/etc/zabbix_server.confDBName=zabbixDBUser=zabbixDBPassword=zabbix
- 安装前端Web
#创建前端Web文件mkdir /var/www/html/zabbixcd /tmp/zabbix-3.0.7/frontends/php/cp -a . /var/www/html/zabbix/#设置apache的执行和所有者chown -R apache:apache /var/www/html/zabbix#赋予可执行权限chmod +x /var/www/html/zabbix/conf/
- 添加Zabbix服务器和Zabbix代理启动脚本
cp /tmp/zabbix-3.0.7/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_servercp /tmp/zabbix-3.0.7/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd#修改 /etc/init.d/zabbix_server /etc/init.d/zabbix_agentd的BASEDIR=/usr/local/为BASEDIR=/usr/local/zabbix
- 导入数据库
登录数据库,创建zabbix用户并导入模板db
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix';show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || zabbix |+--------------------+use zabbix;source /tmp/zabbix-3.0.7/database/mysql/schema.sql;source /tmp/zabbix-3.0.7/database/mysql/data.sql;source /tmp/zabbix-3.0.7/database/mysql/images.sql;show tables;+----------------------------+| Tables_in_zabbix |+----------------------------+| acknowledges || actions || alerts || application_discovery || application_prototype || application_template || applications || auditlog || auditlog_details || autoreg_host || conditions || config || dbversion || dchecks || dhosts || drules || dservices || escalations || events || expressions || functions || globalmacro || globalvars || graph_discovery || graph_theme || graphs || graphs_items || group_discovery || group_prototype || groups || history || history_log || history_str || history_text || history_uint || host_discovery || host_inventory || hostmacro || hosts || hosts_groups || hosts_templates || housekeeper || httpstep || httpstepitem || httptest || httptestitem || icon_map || icon_mapping || ids || images || interface || interface_discovery || item_application_prototype || item_condition || item_discovery || items || items_applications || maintenances || maintenances_groups || maintenances_hosts || maintenances_windows || mappings || media || media_type || opcommand || opcommand_grp || opcommand_hst || opconditions || operations || opgroup || opinventory || opmessage || opmessage_grp || opmessage_usr || optemplate || profiles || proxy_autoreg_host || proxy_dhistory || proxy_history || regexps || rights || screen_user || screen_usrgrp || screens || screens_items || scripts || service_alarms || services || services_links || services_times || sessions || slides || slideshow_user || slideshow_usrgrp || slideshows || sysmap_element_url || sysmap_url || sysmap_user || sysmap_usrgrp || sysmaps || sysmaps_elements || sysmaps_link_triggers || sysmaps_links || timeperiods || trends || trends_uint || trigger_depends || trigger_discovery || triggers || users || users_groups || usrgrp || valuemaps |+----------------------------+113 rows in set (0.00 sec)exit
- 启动及开机自启动
#启动/etc/init.d/httpd start/etc/init.d/zabbix_server start/etc/init.d/zabbix_agentd start# 开机自启动chkconfig httpd onchkconfig --add /etc/init.d/zabbix_serverchkconfig --add /etc/init.d/zabbix_agentdchkconfig zabbix_server onchkconfig zabbix_agentd on
- 前端Web安装
访问http://localhost/zabbix/setup.php进行安装。
安装完成后,登陆:
用户名:Admin
密码:zabbix
至此,Zabbix Server和本地agent已经安装完成。登录后进行简单的配置,就可以清楚的看到本台机器的相关监控信息。
参考:http://www.cnblogs.com/zzzhfo/p/5820321.html
http://www.linuxidc.com/Linux/2016-07/132897.htm
http://blog.chinaunix.net/uid-25266990-id-3380929.html
0 0
- Zabbix Server 3.0.7 Centos6.5编译安装
- Centos6 安装zabbix-server
- Zabbix Agent Centos6.5编译安装
- Centos6.9 安装zabbix-server
- zabbix Server端在CentOS6.5上的安装过程
- centos6.6编译安装zabbix server3.0.1
- centos6.5下安装zabbix
- CentOS6.5安装部署zabbix
- centos 7编译安装部署zabbix-server端
- centos6.4安装zabbix-2.2.5
- CentOS6.5安装zabbix监控及汉化
- Centos6.5 64位系统安装zabbix
- Centos6.5下安装配置zabbix教程
- Zabbix Server CentOS6.8下安装部署详细步骤
- Centos6 安装zabbix-agent
- zabbix centos6 安装文档 zabbix下载链接
- Zabbix 编译安装 (zabbix-3.0.2 server_install )
- Zabbix Proxy在centos6.5final的安装
- ViewDragHelper基本方法讲解
- 剑指offer-面试题27-二叉搜索树与双向链表
- 基于sparkMLlib的机器学习_[1]_基本数据类型[4]分布式矩阵DistrubutedMatrix
- Redis的泛泛之谈
- 设备驱动中的pci(kernel-4.7)
- Zabbix Server 3.0.7 Centos6.5编译安装
- HDUoj 1872 稳定排序
- ECMAScript2016笔记
- 批量导入json到mongodb的shell脚本
- C/C++ 时间 & 日期
- OpenStack之keystone简介
- A+B问题
- C语言/结构体的初始化
- 最小编辑距离