CentOS7.X系统部署Zabbix6.0版本(可跟做)

一、部署环境说明

操作系统:CentOS 7.X

CentOS 7.X 系统默认不支持Yum方式安装Zabbix 6.0 服务端(CentOS 8.X支持),所以服务端采用编译安装方式!

部署组件:

序号 组件 版本 备注
1 Nginx 1.20.1 基本环境(LNMP)
2 PHP 72w 基本环境(LNMP)
3 MySQL|MariaDB 8.0.36|10.5.25 基本环境(LNMP),二选一 MariaDB版本要求在10.5及以上
4 zabbix-server 6.0 使用编译安装
5 zabbix-agent2 6.0 使用Yum安装

二、基本环境部署步骤

1、环境初始化操作

1、关闭防火墙

systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

2、定时时间同步

yum -y install ntpdate
ntpdate ntp1.aliyun.com

echo "0 1 * * * ntpdate ntp1.aliyun.com" >> /var/spool/cron/root
crontab -l

2、部署并配置Nginx

1、部署Nginx

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo

yum clean all
yum -y install nginx

nginx -v

2、添加Nginx虚拟主机配置

vim /etc/nginx/conf.d/zabbix.conf

server {
   
  listen 9780;
  
  location / {
   
    root /usr/share/nginx/html/zabbix;
    index index.php index.html index.htm;
  }
  
  location ~ \.php$ {
   
    root /usr/share/nginx/html/zabbix;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    access_log /var/log/nginx/zabbix_access.log;
	error_log /var/log/nginx/zabbix_error.log;
  }
}

3、启动Nginx并且加入开机自启动

nginx -t
systemctl start nginx
systemctl enable nginx

3、部署并配置PHP

1、部署PHP

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

神奇的海马体

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值