CentOS 7上搭建Zabbix4.0
开源Linux
共 5065字,需浏览 11分钟
· 2020-08-18
开源Linux
一个执着于技术的公众号
zabbix介绍
Zabbix 是一个基于 WEB 界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。它能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。
zabbix软件组成
zabbix-server
: 监控服务端
zabbix-agent
: 监控客户端
zabbix-web
: 监控网站服务
php
: 处理动态请求
mysql
: 数据库存储监控数据
zabbix
: 负责收集agent信息汇总告知zabbix-server
1.关闭防火墙和selinux
[ ]
[ ]
[ ]
2.添加zabbix源和epel源
[ ]
[ ]
3.安装zabbix和相关服务组件
[ ]
[ ]
[ ]
4.修改zabbix配置文件
[ ]
[ ]
5.配置数据库服务
~]# systemctl start mariadb #启动数据库
~]# mysql_secure_installation ##初始化数据库
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
new password:
Password updated successfully!
Reloading privilege tables..
Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
Success!
root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
Success!
By default, MariaDB comes with a database named 'test' that anyone can
This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] n
skipping.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
~]# mysql -uroot -p ##登录数据库
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 5.5.65-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; ##创建zabbix数据库
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; ##创建数据库管理用户
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Bye
~]# zcat /usr/share/doc/zabbix-server-mysql-4.0.20/create.sql.gz | mysql -uzabbix -pzabbix zabbix ##将数据表写入到zabbix库中
6.启动zabbix和相关服务
[root@zabbix ~]# systemctl start zabbix-server.service httpd mariadb.service
[root@zabbix ~]# systemctl enable zabbix-server.service httpd mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
7.登录zabbix的web界面,进行初始化
初始化地址http://172.16.210.56/zabbix/setup.php
点击Next step
检查php的一些变量条件,如果没有报错的信息可以点击next step
填写好对应的数据库密码和帐号点击Next step
设置主机和端口还有监控页面名字,然后点击Next step
确认信息.然后点击Next step
点击Finish
帐号Admin 密码zabbix ,再点Sign in
登录成功。
8.更改zabbix界面语言为中文
点击右上角的小人
选择Chinese
再点击update
更改成功!
链接:https://www.jianshu.com/p/7d798423ec58 作者:南南宫问天
关注「开源Linux」加星标,提升IT技能
好文章,分享、点赞、在看三连哦❤️↓↓↓
评论
搭建完美的技术写作环境,第1-10章
大家好,我是章北海,《机器学习算法与 Python 实战》和《玩机器学习的章北海》号主,985 统计学硕士,5 年时间撰写了 460 余篇优质原创文章,内容涵盖统计学、数据分析、机器学习、深度学习、Python 实战。毕业之后先后从事数据分析、机器学习工程师、项目管理,这些年积累了很多经验,工作之外
机器学习算法与Python实战
0
五一抢票难,Github上这几个Python项目,你可以试试
又到五一长假啦(虽然其实就放了1天),大家是打算家里蹲or出去玩,又或者是在公司加班呢...今天给大家介绍三个和12306相关的项目,看看你是否用得上。/01/ py12306py12306购票助手,顾名思义,12306买票的~需要在python 3.6以上版本运行程序。1. 安装依赖gi
Crossin的编程教室
0
教你基于 Jenkins 搭建一套 CI/CD 系统
原文链接:https://mp.weixin.qq.com/s/KVc4IFky1z7kZn-7bz79DQ一、CI/CD环境介绍本次要实现如下效果,开发人员完成功能开发并提交代码到gitlab仓库,jenkins自动完成拉取代码、编译构建、代码扫描(sonarqube)、打
码农编程进阶笔记
0
乐普心安宝及心电图机,助力安康市搭建“心电一张网”,打通全域“生命线”!
为持续推动胸痛中心建设,助力全民健康,全面提升心血管疾病等急危重症救治能力水平。4月20日,由安康市卫健委主办、安康市中医医院承办的“第七届心血管汉江学术会议暨安康市胸痛中心大会”在高新国际会议中心顺利举行。市人大常委会主任王彪、市政协副主席唐纹、市政府党组成员刘英华等领导亲临现场,受邀参会的中国科
乐普医疗AI
0
人人都能在本地电脑上部署LLama3大模型
电脑配置要求:推荐16GB内存以上,最低8GB。最近几年主流CPU均可。英伟达显卡性能表现会更好,但不是必须。部署流程:1、下载安装Ollama大模型运行框架2、下载运行LLama3大模型3、下载安装服务器容器Docker Desktop4、下载运行OpenWebUI应用服务搞定!视频演示
Python涨薪研究所
0
逛展|2024北京IFC上视听的科技与狠活
视说新语4月17日-19日,北京InfoComm China 2024大展在国家会议中心举行,“AI赋能智慧会议”“大屏显示新品”“智慧教育”等500余款新品登场,展示了视+听的多种可能。球幕、透明、弯曲、折叠,屏“千姿百态”屏发展这么多年,不管大屏幕还是小屏幕,截至目前最常用的是板板正正的长方形,
流媒体网
0
搭建完美的技术写作环境,第1-8章
大家好,我是章北海,《机器学习算法与 Python 实战》和《玩机器学习的章北海》号主,985 统计学硕士,5 年时间撰写了 460 余篇优质原创文章,内容涵盖统计学、数据分析、机器学习、深度学习、Python 实战。毕业之后先后从事数据分析、机器学习工程师、项目管理,这些年积累了很多经验,工作之外
机器学习算法与Python实战
10
手动部署jar包,太low!动态上传热部署真爽!
本文来源:https://blog.csdn.net/zhangzhiqiang_0912近期开发系统过程中遇到的一个需求,系统给定一个接口,用户可以自定义开发该接口的实现,并将实现打成jar包,上传到系统中。系统完成热部署,并切换该接口的实现。定义简单的接口这里以一个简单的计算器功能为例,接口定义
Java高效学习
10