zabbix4.2局域网离线安装

时间:2024-03-26 07:59:39

zabbix离线安装,环境:CentOS7.x

 

zabbix官网地址 :https://www.zabbix.com/download

一、准备所有zabbix需要的rmp

  1. Install Zabbix repository。安装源码库配置部署包。这个部署包包含了yum配置文件。

网盘地址链接:https://pan.baidu.com/s/1AXNi0wnoazXq73MueBxEPg

提取码:kgzu

rpm包列表

  OpenIPMI-libs.x86_64 0:2.0.23-2.el7                                          

  OpenIPMI-modalias.x86_64 0:2.0.23-2.el7                                      

  fping.x86_64 0:3.10-1.el7                                                    

  httpd.x86_64 0:2.4.6-89.el7.centos.1                                         

  httpd-tools.x86_64 0:2.4.6-89.el7.centos.1                                   

  libzip.x86_64 0:0.10.1-8.el7                                                 

  mailcap.noarch 0:2.1.41-2.el7                                                

  mariadb.x86_64 1:5.5.60-1.el7_5                                              

  mariadb-server.x86_64 1:5.5.60-1.el7_5                                       

  perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7                                 

  perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7                                  

  perl-DBD-MySQL.x86_64 0:4.023-6.el7                                          

  perl-DBI.x86_64 0:1.627-4.el7                                                

  perl-IO-Compress.noarch 0:2.061-2.el7                                         

  perl-Net-Daemon.noarch 0:0.48-5.el7                                          

  perl-PlRPC.noarch 0:0.2020-14.el7                                            

  php.x86_64 0:5.4.16-46.el7                                                    

  php-bcmath.x86_64 0:5.4.16-46.el7                                            

  php-cli.x86_64 0:5.4.16-46.el7                                               

  php-common.x86_64 0:5.4.16-46.el7                                             

  php-gd.x86_64 0:5.4.16-46.el7                                                

  php-ldap.x86_64 0:5.4.16-46.el7                                              

  php-mbstring.x86_64 0:5.4.16-46.el7                                          

  php-mysql.x86_64 0:5.4.16-46.el7                                             

  php-pdo.x86_64 0:5.4.16-46.el7                                               

  php-xml.x86_64 0:5.4.16-46.el7                                               

  t1lib.x86_64 0:5.1.2-14.el7                                                  

  unixODBC.x86_64 0:2.3.1-11.el7                                               

  zabbix-agent.x86_64 0:4.2.5-1.el7                                            

  zabbix-server-mysql.x86_64 0:4.2.5-1.el7                                     

  zabbix-web.noarch 0:4.2.5-1.el7                                              

  zabbix-web-mysql.noarch 0:4.2.5-1.el7

 

依赖

  apr.x86_64 0:1.4.8-5.el7                                                      

  apr-util.x86_64 0:1.5.2-6.el7                                                

  dejavu-fonts-common.noarch 0:2.33-6.el7                                      

  dejavu-sans-fonts.noarch 0:2.33-6.el7                                        

  fontpackages-filesystem.noarch 0:1.44-8.el7                                  

  libX11.x86_64 0:1.6.7-2.el7                                                  

  libX11-common.noarch 0:1.6.7-2.el7                                           

  libXau.x86_64 0:1.0.8-2.1.el7                                                

  libXpm.x86_64 0:3.5.12-1.el7                                                 

  libaio.x86_64 0:0.3.109-13.el7                                               

  libevent.x86_64 0:2.0.21-4.el7                                                

  libjpeg-turbo.x86_64 0:1.2.90-8.el7                                          

  libxcb.x86_64 0:1.13-1.el7                                                   

  net-snmp-libs.x86_64 1:5.7.2-43.el7_7.3                                       

  perl-Data-Dumper.x86_64 0:2.145-3.el7

 

二、上传离线包

  1、进入 无外网 Linux  系统 创建 目录用于保存 zabbix  离线包 

# mkdir -p /usr/local/zabbix-rpm           

  2、上传离线包到上面的目录

 

三、离线安装

 1、安装

# cd /usr/local/zabbix-rpm/       

# yum clean all ; yum localinstall –y --skip-broken ./*               

 2、启动数据库,添加到开机启动

# systemctl start mariadb.service            

# systemctl enable mariadb.service               

 3、初始化数据库

# mysql_secure_installation

 zabbix4.2局域网离线安装

 

4、创建初始数据库 ( password为数据库账户zabbix的密码)

# mysql -uroot -p           

# Enter password:输入密码           

# MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;       

# MariaDB [(none)]> grant all privileges on zabbix.* to [email protected] identified by 'password';           

# MariaDB [(none)]> quit;               

 5、导入初始架构和数据

# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix       

 6、配置zabbix-server 数据库密码

# vi  /etc/zabbix/zabbix_server.conf            

zabbix4.2局域网离线安装

 7、配置 Zabbix 前端 PHP

# vi /etc/php.ini           

# max_execution_time = 300

# max_input_time = 300

# post_max_size = 16M

# date.timezone  = Asia/Shanghai

 8、关闭防火墙

# systemctl stop firewalld.service            #停止firewall       

# systemctl disable firewalld.service         #禁止firewall开机启动       

 9、启动zabbix相关服务,并设置为开启自启动

# systemctl restart zabbix-server zabbix-agent httpd           

# systemctl enable zabbix-server zabbix-agent httpd           

10、配置前端文件

下载zabbix文件包

https://www.zabbix.com/cn/download_sources#tab:unsupported

# tar –zxvf zabbix-4.x

# cp –r frontends/php/ /var/www/html/zabbix

 11、安装完成

 访问方式: http://服务器地址/zabbix/setup.php

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

点击完成,默认账号Admin密码zabbix

 

zabbix4.2局域网离线安装

zabbix4.2局域网离线安装

到此,服务端已经安装完成,稍后完善服务端对客户端的监控部署!