一、前言

  (一)、概述

  Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案,Zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位,解决存在的各种问题;Zabbix主要由两部分构成,Zabbix server与可选组件Zabbix agent;

  (二)、预处理

配置环境   

  OS:CentOS 7.5 64bit
    Zabbix版本:3.4
    PHP版本:7.2.8
    MySQL版本:5.7.22
    Nginx版本:1.14.0
    hostname:zabbix--1
    ip:10.18.43.141

 

基础需求

[root@zabbix-- ~]# systemctl stop firewalld
[root@zabbix-- ~]# sed -ri '/^SELINUX=*/cSELINUX=disabled' /etc/selinux/config
[root@zabbix-- ~]# setenforce [root@zabbix-- ~]# mkdir -p /date/zabbix [root@zabbix-- ~]# groupadd zabbix
[root@zabbix-- ~]# useradd -r -g zabbix -s /sbin/nologin zabbix

二、Zabbix安装

  (一)、Zabbix编译

依赖环境库下载:

[root@zabbix-1-1 ~]# yum install net-snmp-devel libevent-devel mysql-devel -y
[root@zabbix-1-1 ~]# wget -P /data/zabbix https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.4.11/zabbix-3.4.11.tar.gz 
[root@zabbix-- ~]# cd /data/zabbix/
[root@zabbix-- zabbix]# tar xf zabbix-3.4..tar.gz
[root@zabbix-- zabbix]# cd zabbix-3.4./

执行编译:

[root@zabbix-- zabbix-3.4.]# ./configure \
--enable-server \
--enable-agent \
--with-mysql \
--enable-ipv6 \
--with-net-snmp \
--with-libcurl \
--with-libxml2 \
--prefix=/usr/local/zabbix [root@zabbix-- zabbix-3.4.]# make install

  (二)、MySQL配置

MySQL编译安装请参考:传送门

[root@zabbix-1-1 ~]# mysql -p'Passwd@123' 
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1070
Server version: 5.7.22 Source distribution
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database zabbix default character set utf8;
Query OK, row affected (0.00 sec) mysql> grant all privileges on zabbix.* to 'zabbixadmin'@'10.18.43.141' identified by 'Zabbix@123';
Query OK, rows affected, warning (0.00 sec) mysql> grant all privileges on zabbix.* to 'zabbixadmin'@'127.0.0.1' identified by 'Zabbix@123';
Query OK, rows affected, warning (0.00 sec) mysql> grant all privileges on zabbix.* to 'zabbixadmin'@'localhost' identified by 'Zabbix@123';
Query OK, rows affected, warning (0.00 sec) mysql> grant all privileges on zabbix.* to 'zabbixadmin'@'%' identified by 'Zabbix@123';
Query OK, rows affected, warning (0.00 sec) mysql> flush privileges;
Query OK, rows affected (0.00 sec)
mysql> \q
Bye

数据导入(注意导入数据的先后顺序,如果顺序错误,就会使数据导入不成功或者其它错误)

[root@zabbix-- ~]# cd /data/zabbix/zabbix-3.4./database/mysql/

[root@zabbix-- mysql]# mysql -u'zabbixadmin' -p'Zabbix@123' zabbix < schema.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@zabbix-- mysql]# mysql -u'zabbixadmin' -p'Zabbix@123' zabbix < images.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@zabbix-- mysql]# mysql -u'zabbixadmin' -p'Zabbix@123' zabbix < data.sql
mysql: [Warning] Using a password on the command line interface can be insecure.

  (三)、Zabbix server配置

[root@zabbix-- ~]# vim /usr/local/zabbix/etc/zabbix_server.conf
### Option: LogFile
# Log file name for LogType 'file' parameter.
#
# Mandatory: no
# Default:
# LogFile= LogFile=/tmp/zabbix_server.log #日志存放位置 ### Option: DBHost
# Database host name.
# If set to localhost, socket is used for MySQL.
# If set to empty string, socket is used for PostgreSQL.
#
# Mandatory: no
# Default:
# DBHost=localhost
DBHost=10.18.43.141     #数据库IP地址 ### Option: DBName
# Database name.
# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
#
# Mandatory: yes
# Default:
# DBName=
DBName=zabbix     #数据库名称 ### Option: DBUser
# Database user. Ignored for SQLite.
#
# Mandatory: no
# Default:
# DBUser= DBUser=zabbixadmin     #数据库用户名称 ### Option: DBPassword
# Database password. Ignored for SQLite.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
# DBPassword=
DBPassword=Zabbix@     #数据库用户密码 ### Option: AlertScriptsPath
# Full path to location of custom alert scripts.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
# AlertScriptsPath=${datadir}/zabbix/alertscripts
AlertScriptsPath=/usr/local/zabbix/alertscripts #脚本存放位置

  (四)、Nginx配置

Nginx编译安装请参考:传送门

[root@zabbix-1-1 ~]# vim /usr/local/nginx/conf/nginx.conf
user  nginx;                    #修改使用用户
http {
  include     /usr/local/nginx/conf/conf.d/*.conf;    #添加子配置路径
} [root@zabbix-1-1 ~]# vim /usr/local/nginx/conf/conf.d/zabbix.conf
server {
       listen       80;
       server_name  _;  location / {

       root  /usr/local/nginx/html;
       index index.php;
       }

 location ~ "\.php$" {

       root    /usr/local/nginx/html;
       fastcgi_pass 127.0.0.1:9000;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
       include fastcgi_params;

       }
}

  (五)、PHP参数修改

PHP编译安装请参考:传送门

[root@mysql-- ~]# vim /usr/local/php/lib/php.ini
post_max_size = 16M
max_execution_time = 300
max_input_time = 300

三、Zabbix-server Web界面配置

(一)、访问Web页面

访问本机IP地址:http://10.18.43.141/setup.php

(二)、PHP参数修改

(三)、MySQL参数配置

(四)Zabbix-server 配置

(五)、信息确认

确认以上填写的Web信息,继续下一步。图略。。。

(六)、错误

无法自动下载配置文件,需要我们手动下载。

下载后,刷新页面即可。

(七)、登录界面

(八)、开始使用

安装完成之后的界面,下次访问 http://10.18.43.141/zabbix.php

Zabbix编译安装(全)的更多相关文章

  1. nginx配合zabbix编译安装时web下一步跳转问题

    很多时候编译安装的时候把zabbix的php包拷贝到web所在目录之后(本文为nginx所在html目录),网页打开http:/localhost/zabbix却进不去下图: 或者是点了下一步没反应, ...

  2. zabbix编译安装

    第一部分zabbix安装部署,实现分布式监控及网络知识 #yum install  lrzsz.x86_64   传送文件 安装mysql脚本 #!/bin/bash DIR = pwd NAME = ...

  3. 干货CentOS6.5_Nginx1.40_Php5.57_MySQL5.5.35编译安装全记录

    http://www.unixdo.com/Unix_Linux/CentOS65_Nginx140_Php557_MySQL5535.html 如果是编译升级php,之前做过nginx的虚拟主机配置 ...

  4. CentOS6.5_Nginx1.40_Php5.57_MySQL5.5.35编译安装全记录

    环境说明:CentOS 6.5 32位  PHP Version 5.5.7  mysql version _5.6.16 一.准备工作 配置防火墙,允许防火墙通过22(sshd).80(WEB).3 ...

  5. linux下php-5.4.8.tar.gz编译安装全攻略

    首先安装基础依赖组建,注:这些依赖组建也是LINUX+PHP+MYSQL+APACHE+NGINX+MEMCACHED时必要的系统组件  LANG=C yum -y install gcc gcc-c ...

  6. 1.zabbix编译安装(环境lnmp)

    zabbix服务端安装 1.使用脚本安装.脚本内容如下.安装完用http://192.168.159.20/zabbix #!/bin/bash #使用说明,此版本是针对程序安装路径不在/opt/下的 ...

  7. 使用Ubuntu系统编译安装Zabbix企业级监控系统

    使用Ubuntu系统编译安装Zabbix企业级监控系统   作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Ubuntu系统部署笔记:https://www.cnblogs.com/ ...

  8. 一文吃透zabbix4.0的编译安装,最全最详细的安装。

    什么是zabbix? zabbix作为一款企业级,开源的,分布式的监控套件,解决了以往监控软件的短板,可以说是现在流行的监控解决方案之一. 监控系统的理想化模样 1.监控数据收集及可视化. 2.数据要 ...

  9. 编译安装zabbix3.2

    1.1 环境准备 系统环境准备:redhat 6.6 64位mysql-5.6.34php-5.6.28zabbix-3.2.1配置前先关闭iptables和SELINUX,避免安装过程中报错. # ...

随机推荐

  1. 【Flink】深入理解Flink-On-Yarn模式

    1. 前言 Flink提供了两种在yarn上运行的模式,分别为Session-Cluster和Per-Job-Cluster模式,本文分析两种模式及启动流程. 下图展示了Flink-On-Yarn模式 ...

  2. MySQL5.7高版本 疑似内存泄露

    I have an instance running on mysql-5.7.19. However, I found that its physical memory and virtual me ...

  3. 微信小程序全局变量改变监听

    问题来源 最近工作需要写小程序页面,其中有个页面情况为:父页面中包含了一个组件页面,组件页面中又包含了另外一个组件页面.需求为:点击最后一个组件页面中的一个view,需要显示最外层父页面中的一个弹出层 ...

  4. Design Principles (设计原则)

    这是我在2018年4月写的英语演讲稿,可惜没人听得懂(实际上就没几个人在听). 文章的内容是我从此前做过的项目中总结出来的经验,从我们的寝室铃声入手,介绍了可扩展性.兼容性与可复用性等概念,最后提出良 ...

  5. 洛谷p1216 IOI1994 Day1T1

    洛谷p1216 IOI1994 Day1T1 洛谷原题 题目描述 观察下面的数字金字塔. 写一个程序来查找从最高点到底部任意处结束的路径,使路径经过数字的和最大.每一步可以走到左下方的点也可以到达右下 ...

  6. scala刷LeetCode--26 删除排序数组中的重复项

    一.题目描述 给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度. 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完 ...

  7. React躬行记(7)——表单

    表单元素是一类拥有内部状态的元素,这些状态由其自身维护,通过这类元素可让用户与Web应用进行交互.HTML中的表单元素(例如<input>.<select>和<radio ...

  8. Windows系列和office系列通用激活工具KMSAuto

    Windows系列和office系列通用激活工具KMSAuto KMSAuto 是一款俄罗斯人 Ratiborus 制作与设计开发的能够批量激活大客户授权版本的微软 Office 办公套件以及 Win ...

  9. Spring Cloud Alibaba | Nacos服务注册与发现

    目录 Spring Cloud Alibaba | Nacos服务注册与发现 1. 服务提供者 1.1 pom.xml项目依赖 1.2 配置文件application.yml 1.3 启动类Produ ...

  10. shell脚本常见错误一二三

    1.$'\r': 未找到命令的解决 2.: 不是有效的标识符h: 3.cd "$path"/webapps/ROOT 不能正常进入ROOT文件夹,$path并未与后面的字符结合起来 ...