centos7.2下快速安装zabbix4.0
本笔记是基于CentOS 7.2下最小化安装的操作系统搭建的Zabbix4.0环境,主要用于做一些企业路由器和交换机等设备的运行状态监控。
1、安装epel源

- yum -y install epel-release
2、安装php-fpm和mariadb

- yum -y install php-fpm mariadb mariadb-server wget
3、配置zabbix4.0源(我这里主要使用的是清华大学的zabbix镜像源)

- wget -P /etc/yum.repos.d/ http://down.whsir.com/downloads/zabbix.repo
4、安装zabbix4.0

- yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
5、启动mariadb

- systemctl enable mariadb
systemctl start mariadb
6、配置mariadb(创建zabbix数据库,默认密码为空,直接enter)

- mysql -u root -p

- MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'www.pengqi.club';
MariaDB [(none)]> quit
7、导入zabbix数据库

- zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pwww.pengqi.club zabbix
8、修改zabbix-server配置文件

- vi /etc/zabbix/zabbix_server.conf

- DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=www.pengqi.club
9、修改http配置文件,修改时区为亚洲上海

- vi /etc/httpd/conf.d/zabbix.conf

- php_value date.timezone Asia/Shanghai
10、启动相关应用服务并设置开机启动

- systemctl enable php-fpm
systemctl start php-fpm
systemctl enable httpd
systemctl start httpd
systemctl enable zabbix-server
systemctl start zabbix-server
systemctl enable zabbix-agent
systemctl start zabbix-agent
11、访问web页面初始化安装zabbix4.0(http://你的IP地址/zabbix/)
温馨提示:
1、需要关闭 selinux,一定要关闭这个,开启selinux会引起一连串问题。

- sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
2、关闭防火墙

- systemctl start firewalld.service#启动firewall
systemctl stop firewalld.service#停止firewall
systemctl disable firewalld.service#禁止firewall开机启动
添加被监控服务器(添加zabbix-agent)
- 安装zabbix-agent客户端
wget -P /etc/yum.repos.d/ http://down.whsir.com/downloads/zabbix.repo
yum install -y zabbix-agent
- 编辑修改配置文件
grep -n '^'[a-Z] /etc/zabbix/zabbix_agentd.conf
vim /etc/zabbix/zabbix_agentd.conf
13:PidFile=/var/run/zabbix/zabbix_agentd.pid
32:LogFile=/var/log/zabbix/zabbix_agentd.log
43:LogFileSize=0
98:Server=192.168.144.113 //zabbix服务器地址
139:ServerActive=192.168.144.113 //活跃服务器地址
150:Hostname=test
268:Include=/etc/zabbix/zabbix_agentd.d/*.conf
- 关闭防火墙,启动服务
systemctl stop firewalld.service
setenforce 0
systemctl enable zabbix-agent.service
systemctl restart zabbix-agent.servicenetstat -anpt | grep zabbix //监听在10050端口
WEB管理界面添加被管理主机
centos7.2下快速安装zabbix4.0的更多相关文章
- centos7.6下编译安装zabbix4.0.10长期支持版
一.安装数据库,这里使用的是percona-server5..24版本 配置如下 [root@zabbix4_clone:~]# cat /etc/my.cnf # Example MySQL con ...
- centos7上安装zabbix4.0
zabbix4.0已经推出有一段时间了,针对之前版本做了很多优化配置,易用性得到提高,特别lts(long team support)长技术支持版本,官方说提供5年的稳定技术支持,在商业化运用上,是比 ...
- Hyperledger fablic 1.0 在centos7环境下的安装与部署和动态增加节点
Hyperledger fablic 1.0 在centos7环境下的安装与部署和动态增加节点 一.安装docker 执行代码如下: curl -sSL https://get.daocloud.io ...
- Centos7下快速安装Mongo3.2
Centos7下快速安装Mongo3.2 一般安装Mongo推荐源码安装,有时候为了快部署测试环境,或者仅仅是想装个mongo shell,这时候yum安装是最合适的方式, 下面介绍一下如何在Cent ...
- Centos7安装Zabbix4.0步骤
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 Centos7安装Zabbix4.0步骤 官方搭建zabbix4.0的环境要求: 1. 环境搭建L ...
- centos7下编译安装php-7.0.15(PHP-FPM)
centos7下编译安装php-7.0.15(PHP-FPM) 一.下载php7源码包 http://php.net/downloads.php 如:php-7.0.15.tar.gz 二.安装所需依 ...
- Centos7一键编译安装zabbix-4.0.2
##只针对centos7的系统有效,centos6无效,mysql zabbix用户:zabbix,密码:zabbix;建议用全新的centos7服务器 软件版本: (nginx-1.14.2.php ...
- Linux(CentOS7)下rpm安装MySQL8.0.16
记录一下自己在 CentOS7 下 rpm 安装 MySQL8.0.16 的过程. 一.准备工作 1. 下载MySQL所需要的安装包 从 MySQL官网 下载,上传至 CentOS 系统 /usr/l ...
- CentOS7下编译安装redis-5.0.9
CentOS7下编译安装redis-5.0.9 本文地址http://yangjianyong.cn/?p=171转载无需经过作者本人授权 下载redis #code start wget https ...
随机推荐
- FPGA 报错ERROR:Simulator:861 – Failed to link the design。
问题综述: 我使用的是windows 10 32位专业版系统,电脑装的是ISE14.4版本,当我用此ISE自带的仿真器ISIM来仿真时,仿真器总是报错ERROR:Simulator:861 – Fai ...
- Mybatis缓存1----系统缓存及简单配置介绍
mybatis缓存 系统缓存:常用的一级缓存和二级缓存 一级缓存 一级缓存是SqlSession级别的缓存,在操作数据库时需要构建SqlSession对象,在对象中有一个数据结构用于存储缓存数据. ...
- 多线程实现奇偶统计v2 - 信号量实现
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "pthread.h& ...
- 【目录】mysql 进阶篇系列
随笔分类 - mysql 进阶篇系列 mysql 开发进阶篇系列 55 权限与安全(安全事项 ) 摘要: 一. 操作系统层面安全 对于数据库来说,安全很重要,本章将从操作系统和数据库两个层面对mysq ...
- ASE——热身作业自我介绍
自我介绍 大家好我是王皓,由于之前忙于保研的机试和面试导致第一次作业就拖到第二次写blog的时候才交(非常抱歉..)我喜欢玩CTF,觉得学习安全方向的知识,寻找软件或者硬件的漏洞是一件非常有意义且有趣 ...
- 【教程】虚拟机安装CentOS 7 ping不通百度/并且使用Xshell 连接
最近需要在电脑虚拟机上安装CentOS 7 ,之前对虚拟机并不熟悉,捅咕了两天时间,如果终于安装成功. 之前遇到的坑:安装完CentOS 7 之后一直ping 不通www.baidu.com 网上查询 ...
- 2018-2-13-win10-uwp-网络编程
title author date CreateTime categories win10 uwp 网络编程 lindexi 2018-2-13 17:23:3 +0800 2018-2-13 17: ...
- java笔试常见的选择题
1.已知表达式int m[] = {0,1,2,3,4,5,6}; 下面那个表达式的值与数组的长度相等()A m.length()B. m.lengthC. m.length()+1D. m.leng ...
- 查看github热门项目
访问 Trending 或者可以通过菜单 Explore -> 选择 "Trending" -- 默认是查看今天在github社区活跃的仓库 在 github 搜索框输入 s ...
- hibernate3.6异常
WARN DTDEntityResolver:73 - recognized obsolete hibernate namespace http://hibernate.sourceforge.net ...