基于centos7系统安装部署zabbix4.2监控服务器
概述
之前其实分享过zabbix监控指标的需求,所以后面主要介绍一下怎么去实现,这里先介绍一下部署zabbix的教程~
环境:
1、配置yum源
不配置repel源直接装zabbix-server会提示libmysqlclient.so.18()(64bit) 被 zabbix-server-mysql-4.2.6-1.el7.x86_64 需要
libmysqlclient.so.18(libmysqlclient_18)(64bit) 被 zabbix-server-mysql-4.2.6-1.el7.x86_64 需要
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/Centos-7.repo >/dev/null 2>&1 rpm -Uvh --force https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh --force https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm yum clean all && yum makecache
2、安装zabbix Server/proxy/frontend
--install Zabbix server yum -y install zabbix-server-mysql zabbix-web zabbix-web-mysql
常见报错:错误:软件包:zabbix-server-mysql-4.2.8-1.el7.x86_64 (zabbix需要libmysqlclient.so.18()
解决:
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-libs-compat-5.7.24-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-compat-5.7.24-1.el7.x86_64.rpm
3、创建及初始化数据库
安装数据库部分省略..
--创建数据库及用户 set global validate_password_policy=0; create database zabbix default character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by 'fxxxxxx'; --初始化数据 zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
4、修改zabbix配置文件
vim /etc/zabbix/zabbix_server.conf ====================================================== DBHost=localhost //在92行下添加 DBPassword=fswl@1234 //在125行下添加 ====================================================== vim /etc/httpd/conf.d/zabbix.conf ====================================================== php_value date.timezone Asia/Shanghai //在第20行修改 ======================================================
5、启动Zabbix服务器和代理进程
Zabbix-server监听的端口为:tcp 10051
Zabbix-agent监听的端口为:tcp 10050
systemctl restart zabbix-server zabbix-agent httpd systemctl enable zabbix-server zabbix-agent httpd
6、图形界面配置
用浏览器访问地址:http://server_IP/zabbix
默认的用户为:Admin 密码:zabbix
安装后界面如下:
登录界面如下:
觉得有用的朋友多帮忙转发哦!后面会分享更多devops和DBA方面的内容,感兴趣的朋友可以关注下~
相关推荐
insularisland 2020-08-15
源码物语 2020-08-03
阿亮 2020-06-22
服务器开发的日子 2020-06-14
xzkjgw 2020-06-09
SoarFly00 2020-06-08
CharlesYooSky 2020-06-05
spb 2020-06-02
89284553 2020-06-02
CosEmon 2020-05-31
Neptune 2020-05-31
韩学敏 2020-05-19
heniancheng 2020-05-17
yishouwangnian 2020-05-10
SIMONDOMAIN 2020-05-09
aolishuai 2020-05-01