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 ...
随机推荐
- The request with exception: The SSL connection could not be established, see inner exception. requestId 解决方案
DOTNET CORE 部署 Centos7 抛出异常 环境变量如下: .NET Core SDK (reflecting any global.json): Version: 2.2.401 Com ...
- 查看.Net Framework的版本(PC和WinCE)
一.在电脑上查看.Net Framework的版本 (1)第一步: 打开“我的电脑“,在地址栏输入 %systemroot%\Microsoft.NET\Framework 第二步:从列出来的文件夹中 ...
- 力扣算法——138CopyListWithRandomPointer【M】
A linked list is given such that each node contains an additional random pointer which could point t ...
- winserver 2008 找不到回收站的解决办法
桌面新建文件夹,命名为 “回收站.{645ff040-5081-101b-9f08-00aa002f954e}”,就可以了.
- apache的commons-fileupload中FileItem类和ServletFileUpload
FileItem类的常用方法 1.boolean isFormField().isFormField方法用来判断FileItem对象里面封装的数据是一个普通文本表单字段,还是一个文件表单字 ...
- JS模拟实现题目(new debounce throwee 等)
模拟new实现 function newObject() { let obj = new Object(); let Con = [].shift.apply(arguments) obj.__pro ...
- java全栈商业小程序开发
此次开发只为学习和巩固,第一次学习开发 一.开发前需要了解: 开发框架MVVM.痛点.开源工具.VUE前端框架.微信支付模块.uni-app前端框架.小程序申请.开发工具下载.编写测试小程序.小程序结 ...
- 在AndroidStudio2.3.2下JNI开发的详细步骤(转)
转自:http://blog.csdn.net/luhaoying1111/article/details/72468867 安装NDK 在工具栏点击File->Settings->App ...
- day09 python函数 返回值 参数
day09 python 一.函数 1.函数 函数是对功能的封装 语法: 定义函数: def 函数名(形参): ...
- tcp/ip的通俗讲述(转)
源地址:https://www.runoob.com/tcpip/tcpip-tutorial.html 对于我们来说网络世界丰富多彩,对于互联网来说也就是数据根据相应的规则在跑来跑去.(这些规则就是 ...