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 ...
随机推荐
- CodeForces - 841B-Godsend-思维
Leha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two pla ...
- 【题解】Crossing River
题目描述 几个人过河,每次过两人一人回,速度由慢者决定,问过河所需最短时间. 输入格式 输入t组数据,每组数据第1行输入n,第2行输入n个数,表示每个人过河的时间. 输出格式 输出t行数据,每行1个数 ...
- [轉]Reverse a singly linked list
Reverse a singly linked list http://angelonotes.blogspot.tw/2011/08/reverse-singly-linked-list.html ...
- HDU-4747 二分+线段树
题意:给出长度为n的序列,问任两个区间的mex运算结果的总和. 解法:直接讲线段树做法:我们注意到mex(1,1),mex(1,2),mex(1,3)...mex(1,i)的结果是单调不减的,那么我们 ...
- Codeforces 1182D Complete Mirror 树的重心乱搞 / 树的直径 / 拓扑排序
题意:给你一颗树,问这颗树是否存在一个根,使得对于任意两点,如果它们到根的距离相同,那么它们的度必须相等. 思路1:树的重心乱搞 根据样例发现,树的重心可能是答案,所以我们可以先判断一下树的重心可不可 ...
- HTTP/2的优先级
前言 记得HTTP/3即将标准化了.今日早读文章由@smallbonelu翻译授权分享. @smallbonelu,一枚爱好跑步的前端工程师 正文从这开始-- 以正确的顺序请求页面资源对于快速的用户体 ...
- express 使用art-template模板引擎
下载express-art-template art-template - app.js中配置 - 注册一个模板引擎 - `app.engine('.html',express-art-templat ...
- 使用appium1.4在android8.0真机上测试程序时报错command failed shell "ps 'uiautomator'"的解决方式
appium1.4,运行自动化脚本时提示 org.openqa.selenium.SessionNotCreatedException: A new session could not be crea ...
- Java基础之ArrayList类
一.ArrayList ArrayList继承了AbstractList分别实现了List.RandomAccess(随机访问).Cloneable(可被克隆(复制的意思)). Serializabl ...
- javaWEB 之文件的上传
1.1 文件上传三要素 提供form表单,method必须是post form表单的enctype必须是multipart/form-data 提供 input type=“file” 类型输入 1. ...