Zabbix编译安装(全)
一、前言
(一)、概述
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编译安装(全)的更多相关文章
- nginx配合zabbix编译安装时web下一步跳转问题
很多时候编译安装的时候把zabbix的php包拷贝到web所在目录之后(本文为nginx所在html目录),网页打开http:/localhost/zabbix却进不去下图: 或者是点了下一步没反应, ...
- zabbix编译安装
第一部分zabbix安装部署,实现分布式监控及网络知识 #yum install lrzsz.x86_64 传送文件 安装mysql脚本 #!/bin/bash DIR = pwd NAME = ...
- 干货CentOS6.5_Nginx1.40_Php5.57_MySQL5.5.35编译安装全记录
http://www.unixdo.com/Unix_Linux/CentOS65_Nginx140_Php557_MySQL5535.html 如果是编译升级php,之前做过nginx的虚拟主机配置 ...
- 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 ...
- linux下php-5.4.8.tar.gz编译安装全攻略
首先安装基础依赖组建,注:这些依赖组建也是LINUX+PHP+MYSQL+APACHE+NGINX+MEMCACHED时必要的系统组件 LANG=C yum -y install gcc gcc-c ...
- 1.zabbix编译安装(环境lnmp)
zabbix服务端安装 1.使用脚本安装.脚本内容如下.安装完用http://192.168.159.20/zabbix #!/bin/bash #使用说明,此版本是针对程序安装路径不在/opt/下的 ...
- 使用Ubuntu系统编译安装Zabbix企业级监控系统
使用Ubuntu系统编译安装Zabbix企业级监控系统 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Ubuntu系统部署笔记:https://www.cnblogs.com/ ...
- 一文吃透zabbix4.0的编译安装,最全最详细的安装。
什么是zabbix? zabbix作为一款企业级,开源的,分布式的监控套件,解决了以往监控软件的短板,可以说是现在流行的监控解决方案之一. 监控系统的理想化模样 1.监控数据收集及可视化. 2.数据要 ...
- 编译安装zabbix3.2
1.1 环境准备 系统环境准备:redhat 6.6 64位mysql-5.6.34php-5.6.28zabbix-3.2.1配置前先关闭iptables和SELINUX,避免安装过程中报错. # ...
随机推荐
- JavaScript原型和原型链( prototype 与 __proto__ )
一.函数对象 所有引用类型(函数.数组.对象)都拥有__proto__属性(隐式原型) 所有函数拥有 prototype 属性(显式原型)(仅限函数) 原型对象:拥有 prototype 属性的对象, ...
- JavaScript面向对象之对象的声明、遍历和存储
一.对象的声明方式 1. 字面式(json格式)声明对象 var obj={ 属性名:属性值, 方法名:function(){ //函数执行体 } } 2. new 操作符+Object 声明对象 v ...
- fis3前端工程构建配置入门教程
一.前言 fis3是百度推出的一款前端工程构建工具,类似的还有webpack,gulp等工具:无论大家有没有使用过,从事前端行业应该都略知一二了,所以对于此类工具用干嘛的我这里就不做重复了. 其实对于 ...
- java虚拟机-简介
一.什么是JVM JVM是Java Virtual Machine(Java虚拟机)的缩写,JVM是一种用于计算设备的规范,它是一个虚构出来的计算机,是通过在实际的计算机上仿真模拟各种计算机功能来实现 ...
- POJ 2679:Adventurous Driving(SPFA+DFS)
http://poj.org/problem?id=2679 Adventurous Driving Time Limit: 1000MS Memory Limit: 65536K Total S ...
- 【原创】面试官:讲讲mysql表设计要注意啥
引言 近期由于复习了一下mysql的内容,有些心得.随手讲其中一部分知识,都是一些烟哥自己平时工作的总结以及经验.大家看完,其实能避开很多坑.而且很多问题,都是面试中实打实会问到的! 比如 OK,具体 ...
- 【Aizu - 0033】Ball (简单搜索)
-->Ball 原文是日语,这里直接写中文了 Descriptions: 如图所示,容器中间有一枢轴,下方分为两路.容器上方开口,从1到10连续编号的小球从容器开口A放入.通过调整枢轴E的方向, ...
- flink window实例分析
window是处理数据的核心.按需选择你需要的窗口类型后,它会将传入的原始数据流切分成多个buckets,所有计算都在window中进行. flink本身提供的实例程序TopSpeedWindowin ...
- RSYNC部署
1 rsync简介 1.1 什么是rsync rsync: - a fast, versatile, remote (and local) file-copying toolrsync:是一种快速,多 ...
- 2019-2020年值得关注的9个AR发展趋势
作者Andrew Makarov,由计算机视觉life编辑:乔媛媛编译 更好的阅读体验请看首发原文链接 2019-2020年值得关注的9个AR发展趋势 增强现实技术在2019年实现了创纪录的发展.微软 ...