当前位置:网站首页>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
边栏推荐
猜你喜欢

《迁移学习导论》第2版,升级内容抢先看!

Apache Calcite 框架原理入门和生产应用

Techwiz OLED:OLED器件的发光效率

Win11系统重装用什么好 一键重装Win11教程

Win7C盘不能扩大怎么办?Win7C盘扩展卷不能点怎么解决

iMeta | Baidu certification is completed, search "iMeta" directly to the publisher's homepage and submission link

STM32前言知识总结

粤黔协作,山海同心!578种贵州特色农产品走进粤港澳大湾区

Libtomcrypt AES 加密及解密

AWS Lambda相关概念与实现思路
随机推荐
视频加密怎么播放_win播放器加密视频
XCTF-easy_Maze
【COS 加码福利】COS 用户实践有奖征文,等你来投稿!
知其然,知其所以然,JS 对象创建与继承
无线Mesh自组网方案,CV5200无线模组应用,支持高清数据远距离传输
Introduction to Mysql storage engine
sqlilabs less-40
LVS负载均衡群集
什么是元宇宙?
高级转录组分析和R数据可视化火热报名中(2022.10)
cubemx stm32 afm3000模块 气体流量传感器 驱动代码
onlyoffice设置跟踪变化trackChanges默认为对自己启动
[论文翻译] Unpaired Image-to-Image Translation using Adversarial Consistency Loss
MySQL: Integrity Constraints and Table Design Principles
美摄问答室|美映 VS 美摄云剪辑
学习在php中将特大数字转成带有千/万/亿为单位的字符串
2022 Cloud Native Computing代表厂商 | 灵雀云第三次入选Gartner中国ICT技术成熟度曲线报告
Mysql应用日志时间与系统时间相差八小时
图文手把手教程--ESP32 OTA空中升级(VSCODE+IDF)
学习使用php把stdClass Object转array的方法整理