无网通过rpm安装zabbix6.0LTS全套

1.Linux内核版本和zabbix版本准备

Linux 内核为 CentOS8.1.1911 isos x86_64 

镜像下载地址

http://mirror.nsc.liu.se/centos-store/8.1.1911/isos/x86_64/CentOS-8.1.1911-x86_64-dvd1.iso

zabbix为6.0LTS版本

zabbix官网地址 和 我们安装的版本配置

https://www.zabbix.com/

 2.rpm包准备

下载rpm包

yumdownloader 要下载的名称 --resolve --destdir = 绝对路径

例如:yumdownloader kde-l10n-Chinese --resolve --destdir=/root/ch

需要的联系我

3.开始安装

1.将rpm包导入到自己的Linux主机上 ,再修改一下配置

vim /lib/tmpfiles.d/mdadm.conf
vim /lib/tmpfiles.d/radvd.conf

删除/var

setenforce 0
 
关闭防火墙
systemctl stop firewalld 

2.进入.rpm包文件夹解压

rpm -ivh * --nodeps --force

3.设置mysql不区分表大小写

vim /etc/my.cnf.d/mysql-default-authentication-plugin.cnf
vim /etc/my.cnf.d/mysql-server.cnf
在上面两个文件里面添加     lower_case_table_names=1

在/mysql-server.cnf 中添加sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

4.重启吗mysql,进入

systemctl start mysqld
这里mysql默认没有密码直接root进入
mysql -uroot 

5.查看大小写是否开启 (为1则为开启)

show variables like '%case_table%'

6.登入mysql创建数据库,用户

mysql -uroot
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'zabbix密码';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
exit

7.导入zabbix表数据 

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

密码为你刚刚设置的密码
导入完成可以看看是不是173张表

set global log_bin_trust_function_creators = 0;

设置远程连接
grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;                
flush privileges;
exit

8.为Zabbix server配置数据库

vim /etc/zabbix/zabbix_server.conf
修改DBPassword=password(该为自己设置的密码)

9.启动进程并设置为开机自启

systemctl restart zabbix-server zabbix-agent httpd php-fpm 
systemctl enable zabbix-server zabbix-agent httpd php-fpm 

10.可以按照需求修改一下httpd的端口

systemclt stop httpd
vim /etc/httpd/conf/httpd.conf
修改 httpd list为8080
systemclt start httpd

11.测试成功

主机ip:8080/zabbix

用户密码默认为 Admin zabbix

12.检测

zabbix测试  snmpwalk -v 2c -c public ip地址 .1.3.6.1.2.1.1.1.0

有些需要开启snmpwalk
systemclt start snmpwalk 

13.服务器重启时需要查看这些是否开启

systemctl status firewalld
systemctl status mysqld 
systemctl status zabbix-server
systemctl status zabbix-agent
systemctl status snmpd
systemctl status nginx     (重启报错 setenforce 0再试试)

后面就可以用远程连接工具试试了,有帮助记得点个免费的小赞👍 ! !