zabbix 安装_玩转zabbix之非常详细的二进制安装

#查看系统版本和内核

[root@zabbix ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [root@zabbix ~]# uname -r3.10.0-862.el7.x86_64

#1.首先进行初始配置

#centos 7 添加阿里云镜像wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoyum install epel-release  -y  #配置yum仓库        关闭SElinux和iptablessystemctl stop firewalld.servicesystemctl disable  firewalld.servicesetenforce 0sed -i 's#SELINUX=enforcing#SELINNUX=disabled#' /etc/selinux/config         安装常用的开发组件yum  groups install "Development Tools" -yyum groups info  "Development Tools" -y    

#2.安装zabbix

#增加Zabbix镜像源wget  https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpmrpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm安装Zabbix Server和Frontendyum install zabbix-server-mysql -yyum install zabbix-web-mysql -y

#3.安装和配置MySQL

#安装wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpmrpm -ivh mysql57-community-release-el7-7.noarch.rpmyum install mysql-community-server -y#配置数据库systemctl start mysqld  #启动服务grep password /var/log/mysqld.log   #查找出临时密码mysql -uroot -p"t2/w_hWUShT1"  #登录数据库mysql> set global validate_password_policy=LOW; #修改密码策略Query OK, 0 rows affected (0.00 sec)mysql> set password for root@localhost=password('guoke123'); #修改密码Query OK, 0 rows affected, 1 warning (0.00 sec)mysql> create database zabbix character set=utf8; #创建utf8字符集的数据库Query OK, 1 row affected (0.00 sec)mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'guoke123'; #创建用户Query OK, 0 rows affected, 1 warning (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)#导入数据结构# zcat /usr/share/doc/zabbix-server-mysql-4.0.18/create.sql.gz | mysql -uroot -p zabbix

#4.配置zabbix

#配置Zabbix Servevim /etc/zabbix/zabbix_server.confDBPassword="guoke123"#启动Zabbix Serversystemctl  start zabbix-server.servicesystemctl  status zabbix-server.service#日志文件/var/log/zabbix/zabbix_server.log#配置zabbix frontentvim /etc/php.inimax_execution_time = 300memory_limit = 128Mpost_max_size = 16Mupload_max_filesize = 2Mmax_input_time = 300max_input_vars = 10000always_populate_raw_post_data = -1date.timezone = Asia/Shanghai#启动httpdsystemctl  start  httpd.servicesystemctl  status  httpd.service

#访问

#http://192.168.226.147/zabbix/

ba249eddc8ee3b3a27601ad0332a54f3.png
87cdeba7ed64862939b0fc75a562de2a.png
3535a457f6e2e0046347e05e027b1995.png
6a78cd5dff8381b027298170f88d5d11.png
b41eb25a87313498ead7c7c98abe6b51.png
eec172aa354d49f1f9e3bed5297c9cc6.png
c48f6e6bd9ae51911a163008ea38e5af.png

#默认登录用户名和密码

Admin

zabbix

#自己监控自己,安装agent客户端

[root@zabbix yum.repos.d]# yum install zabbix-agent.x86_64  -y[root@zabbix ~]# systemctl start zabbix-agent.service  #启动

#显示已经监控起自己

#提示:如果重启agent客户端还没有绿起来,可以重启zabbix-server可以快速生效

ebb736c7f5b3ba3a539fcb266cce8e66.png

#获取更多资料,点击更多,关注老油条IT记公众号,一起学习

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值