当前位置:网站首页>zabbix deployment
zabbix deployment
2022-08-04 10:31:00 【51CTO】
一、Zabbix安装与部署
1.1 关闭SeLinux/防火墙
1.2 关闭防火墙并设置开机不启动
查看防火墙状态:systemctl status firewalld.service
关闭:systemctl stop firewalld
开启:systemctl start firewalld
开机自动关闭:systemctl disable firewalld
开机自动启动:systemctl enable firewalld
查看开机是否启动:chkconfig --list|grep network(RHLE6)
1.2.1、临时和永久关闭Selinux
永久关闭:
setenforce 0
vim /etc/selinux/config
改SELINUX=disabled
1.3、安装apache
yum install -y httpd
设置开机自启动服务
systemctl enable httpd
Systemctl start httpd
Here is a screenshot of what I have installed successfully
1.4.、安装mysql
yum install -y mariadb mariadb-server
设置开机自启
systemctl enable mariadb
systemctl start mariadb
1.5安装php环境
yum install -y php php-mysql
1.6安装zabbix-----[都是一些yumThe source installation steps are omitted here,Follow the command to install step by step and you can't go wrong,Note that every time the installation is completed, you can turn on the boot and start automatically]
1)下载包
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
2)安装zabbix的包
yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender
3)[[email protected] ~]# mysql进入数据库
3.1)创建一个zabbix库并设置为utf8的字符编码格式
create database zabbix character set utf8 collate utf8_bin;
4)创建账户并且授权设置密码
grant all privileges on zabbix.* to [email protected] identified by 'zabbix'; flush privileges; --byThe following password can be changed
5)回到根目录下,导入表
cd /usr/share/doc/zabbix-server-mysql-****/ #进行解压
gunzip create.sql.gz
mysql-进入数据库
use zabbix
show tables;会发现zabbixThe corresponding table has been generated
6)The table corresponding to the database has been generated and then we configure itzabbix server配置文件
#配置文件目录
cd /etc/zabbix
#对zabbix_server.conf进行配置
----------------You can configure it as needed here
ListenPort=10051
#服务端监听的端口,保持默认即可
SourceIP=
#通过SourceIP参数可以指定服务端的源IP,当server端有多个IP地址时,我们可以指定服务端使用固定的IP与agent端进行通讯
LogType=file
下载 #通过LogType参数,可以指定通过哪种方式记录日志,此参数可以设置为三种值,system、file、console,system表示将日志发往syslog,file表示使用指定的文件作为日志文件,console表示将日志发往控制台,默认为file.
LogFile=/var/log/zabbix/zabbix_server.log
#当LogType设置为file时,通过LogFile参数设置日志文件位置.
LogFileSize=0
#指明日志文件达到多大时自动滚动,单位为MB,如果设置LogFileSize为50,表示日志大小达到50MB滚动一次,设置为0表示日志文件不会滚动,所有日志保存在一个文件中.
DebugLevel=3
#通过DebugLevel参数可以定义日志的详细程度,即为日志级别.
DBHost=localhost
#通过DBHost参数设置zabbix数据库所在的服务器IP,由于此处zabbix与mysql安装在同一服务器上,所以此处设置为localhost
DBName=zabbix
#通过DBName指定zabbix数据库对应的名称
DBUser=root
#通过DBUser指定zabbix数据库用户名
DBPassword=
#通过DBPassword指定zabbix数据库用户的密码
DBPort=3306
#通过DBPort指定zabbix所在数据库服务监听的端口号
开机自启zabbix-server服务
systemctl start zabbix-server.service
systemctl enablezabbix-server.service
7)配置php
cd /etc/httpd/conf.d #配置时间
vi zabbix.conf------Note that the preceding double quotation marks must be removed
The same configuration is completed to restart the service
systemctl start httpd
systemctl enable httpd
systemctl restart httpd
8)登陆zabbix网址设置 http://ip/zabbix
The database login address is the default accountzabbix密码zabbix(如果你是这个)
webInterface login account passwordAdmin-zabbix
边栏推荐
猜你喜欢
TCP协议 - 三次握手 - 四次挥手-内核参数调优
OD-Model【5】:YOLOv1
低代码是开发的未来吗?浅谈低代码开发平台的发展现状及未来趋势
使用ClickHouse分析COS的清单和访问日志
语音社交app源码——具备哪些开发优势?
iMeta | 德国国家肿瘤中心顾祖光发表复杂热图(ComplexHeatmap)可视化方法
iMeta | Baidu certification is completed, search "iMeta" directly to the publisher's homepage and submission link
sqlilabs less-38~39
什么是元宇宙?
[论文阅读] Unpaired Image-to-Image Translation Using Adversarial Consistency Loss
随机推荐
【C补充】指向指针或函数的指针
C#/VB.NET:在 Word 中设置文本对齐方式
八、MFC对话框
语音社交app源码——具备哪些开发优势?
暴力破解-破解 Apache BASIC 认证
黑马瑞吉外卖之员工账号的禁用和启用以及编辑修改
学习在微信小程序中判断url的文件后缀格式
美摄问答室|美映 VS 美摄云剪辑
MySQL之my.cnf配置文件
双向带头循环链表实现
标准C语言学习总结12
MySQL:完整性约束和 表的设计原则
Mobile open source low code tools beeware and kivy
小程序容器加快一体化在线政务服务平台建设
高级转录组分析和R数据可视化火热报名中(2022.10)
HCIP 第十八天
低代码是开发的未来吗?浅谈低代码开发平台的发展现状及未来趋势
sqlilabs less-40
知其然,知其所以然,JS 对象创建与继承
【Idea系列】idea配置