@zabbix6.0安装部署(centeros 8 stream)
文章目录
1.系统版本
#查看系统版本
[root@server ~]# cat /etc/redhat-release
CentOS Stream release 8
#关闭防火墙及selinux(临时关闭)
systemctl stop firewalld.service
setenforce 0
2.zabbix server官方查看
3.平台安装和配置Zabbix服务器
#下载安装源仓库
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
dnf clean all
安装Zabbix server,Web前端及agent
#下载安装软件包
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
4.数据库安装
#删除旧版本mysql
yum -y remove mysql*
#获取mysql8.0版本包
wget https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
#安装mysql8.0
rpm -ivh mysql80-community-release-el7-1.noarch.rpm
dnf install mysql-server
或者
yum install mysql-server
mysql8.0数据库启动并配置
#启动服务,并加入开机自启
systemctl start mysqld.service
systemctl enable mysqld.service
#查看mysql服务状态
systemctl status mysqld.service
netstat -lntp |grep 3306
tcp6 0 0 :::33060 :::* LISTEN 162737/mysqld
tcp6 0 0 :::3306 :::* LISTEN 162737/mysqld
数据库配置
#进入数据库(mysql8.0初始化无密码,直接回车进入即可)
mysql -uroot -p
#mysql版本确认
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.26 |
+-----------+
1 row in set (0.00 sec)
mysql>
#创建用户及配置root密码,权限赋予
CREATE USER 'root'@'%' IDENTIFIED BY “zeny@2022”;
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
#zabbix用户创建
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by 'zabbix@2022';
grant all privileges on zabbix.* to zabbix@localhost;
导入初始架构和数据
#zabbix架构数据导入数据库
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
5.Zabbix server配置数据库
#zabbix server配置(编辑配置文件添加数据库密码)
vim /etc/zabbix/zabbix_server.conf
DBPassword=password
6.Zabbix前端配置PHP
#编辑配置文件(去掉以下两行内容注释即可)
vim /etc/nginx/conf.d/zabbix.conf
listen 80;
server_name 本地IP地址;
7.zabbix相关组件服务启动
#启动Zabbix server和agent进程,并为它们设置开机自启
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
#web访问
http://server_ip_or_name
8.zabbix web配置
http://server_ip/setup.php
切换到更熟悉的中文
检查zabbix安装的配置是否都🆗
配置DB(短裤默认3306)
确认检查所有配置
web登录(默认账户:Admin:zabbix)
查看web状态
web版本确认,至此,zabbix6.0已经配置安装部署 🆗
本文来自博客园,作者:ଲ小何才露煎煎饺,转载请注明原文链接:https://www.cnblogs.com/zeny/p/16578222.html