zabbix监控软件安装
zabbix监控软件安装
- yum 部署zabbix
- 部署LAMP
- 下载centos和epel源
- 安装httpd
- 安装php
- 安装mariadb
- 设置httpd服务
- 测试php页面和配置时间
- 浏览器访问
- 安装zabbix
- 配置zabbix源
- 安装
- 配置数据库并导入zabbix表数据
- 验证zabbix数据库数据
- 配置zabbix并启动服务
- 配置httpd并启动服务
- 浏览器访问http://192.168.40.99/zabbix
yum 部署zabbix
部署LAMP
下载centos和epel源
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# rm -rf *
[root@localhost yum.repos.d]# ls
[root@localhost yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed
100 2495 100 2495 0 0 11497 0 --:--:-- --:--:-- --:--:-- 11497
[root@localhost yum.repos.d]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
[root@localhost yum.repos.d]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
CentOS-8.5.2111 - Base - mirrors.aliyun.com 556 kB/s | 4.6 MB 00:08
CentOS-8.5.2111 - Extras - mirrors.aliyun.com 106 kB/s | 10 kB 00:00
CentOS-8.5.2111 - AppStream - mirrors.aliyun.com 358 kB/s | 8.4 MB 00:24
epel-release-latest-8.noarch.rpm 230 kB/s | 24 kB 00:00
依赖关系解决。
==========================================================================================================软件包 架构 版本 仓库 大小
==========================================================================================================
安装:epel-release noarch 8-17.el8 @commandline 24 k事务概要
==========================================================================================================
安装 1 软件包总计:24 k
安装大小:34 k
下载软件包:
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务准备中 : 1/1 安装 : epel-release-8-17.el8.noarch 1/1 运行脚本: epel-release-8-17.el8.noarch 1/1
Many EPEL packages require the CodeReady Builder (CRB) repository.
It is recommended that you run /usr/bin/crb enable to enable the CRB repository.验证 : epel-release-8-17.el8.noarch 1/1 已安装:epel-release-8-17.el8.noarch 完毕!
[root@localhost yum.repos.d]# ls
CentOS-Base.repo epel-modular.repo epel.repo epel-testing-modular.repo epel-testing.repo
[root@localhost yum.repos.d]#
安装httpd
[root@localhost ~]# dnf -y install httpd
已安装:apr-1.6.3-12.el8.x86_64 apr-util-1.6.1-6.el8.x86_64 apr-util-bdb-1.6.1-6.el8.x86_64 apr-util-openssl-1.6.1-6.el8.x86_64 centos-logos-httpd-85.8-2.el8.noarch httpd-2.4.37-43.module_el8.5.0+1022+541f3b1.x86_64 httpd-filesystem-2.4.37-43.module_el8.5.0+1022+b541f3b1.noarch httpd-tools-2.4.37-43.module_el8.5.0+1022+b541f3b1.x86_64 mod_http2-1.15.7-3.module_el8.4.0+778+c970deab.x86_64 完毕!
安装php
[root@localhost ~]# yum -y install php-xml.x86_64 php-json.x86_64 php-mysqlnd.x86_64 php-common.x86_64 php-fpm.x86_64 php-bcmath.x86_64 php-cli.x86_64 php.x86_64 php-gd.x86_64 php-pdo.x86_64 php-devel.x86_64 --allowerasing --skip-broken
....
已安装:nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch php-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-bcmath-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-cli-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-fpm-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-gd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-json-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-mysqlnd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-pdo-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-xml-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 完毕!
安装mariadb
[root@localhost ~]# dnf -y install mariadb-server mariadb
...
已安装:mariadb-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 mariadb-backup-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 mariadb-common-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 mariadb-connector-c-3.1.11-2.el8_3.x86_64 mariadb-connector-c-config-3.1.11-2.el8_3.noarch mariadb-errmsg-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 mariadb-gssapi-server-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 mariadb-server-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 mariadb-server-utils-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64 perl-DBD-MySQL-4.046-3.module_el8.3.0+419+c2dec72b.x86_64 完毕!
启动数据库服务,设置数据库密码
[root@localhost ~]# systemctl start mariadb.service
[root@localhost ~]# systemctl enable mariadb.service
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl enable httpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@localhost ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.Enter current password for root (enter for none):
OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] y... Success!By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!
MariaDB [(none)]>
[root@localhost ~]# mysql -uroot -p123456
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.3.28-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]>
设置httpd服务
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf
<IfModule dir_module>DirectoryIndex index.html index.php
测试php页面和配置时间
[root@localhost ~]# cd /var/www/html/
[root@localhost html]# ls
[root@localhost html]# vim index.php
<?php
phpinfo();
?>
[root@localhost html]# ls
index.php
[root@localhost html]#
root@localhost ~]# systemctl restart php-fpm.service
[root@localhost ~]# systemctl enable php-fpm.service
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
[root@localhost ~]#
[root@localhost ~]# vim /etc/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Shanghai
浏览器访问
安装zabbix
配置zabbix源
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo epel-modular.repo epel.repo epel-testing-modular.repo epel-testing.repo
[root@localhost yum.repos.d]# vim zabbix.repo
[Aliyun]
name=haha
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/8/x86_64/
enable=1
gpgcheck=0
[qinghua]
name=hehe
#baseurl=http://repo.zabbix.com/zabbix/3.4/rhel/7/$basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.4/rhel/8/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
安装
[root@localhost ~]# dnf -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent
haha 247 kB/s | 115 kB 00:00
hehe 61 kB/s | 115 kB 00:01
...
...
已安装:OpenIPMI-libs-2.0.31-3.el8.x86_64 fping-4.2-2.el8.x86_64 php-ldap-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 php-mbstring-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 unixODBC-2.3.7-1.el8.x86_64 zabbix-agent-4.4.10-1.el8.x86_64 zabbix-apache-conf-4.4.10-1.el8.noarch zabbix-server-mysql-4.4.10-1.el8.x86_64 zabbix-web-4.4.10-1.el8.noarch zabbix-web-mysql-4.4.10-1.el8.noarch 完毕!
配置数据库并导入zabbix表数据
[root@localhost ~]# mysql -uroot -p123456
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.3.28-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.001 sec)MariaDB [(none)]> grant all on zabbix.* to zabbix@'localhost' identified by '123456';
Query OK, 0 rows affected (0.001 sec)MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)[root@localhost ~]# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbix -p123456 zabbix
验证zabbix数据库数据
[root@localhost ~]# mysql -uroot -p123456
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 10.3.28-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| zabbix |
+--------------------+
4 rows in set (0.001 sec)MariaDB [(none)]> use zabbix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
MariaDB [zabbix]> show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
| alerts |
| application_discovery |
| application_prototype |
| application_template |
| applications |
| auditlog |
| auditlog_details |
| autoreg_host |
| conditions |
| config |
| config_autoreg_tls |
| corr_condition |
| corr_condition_group |
| corr_condition_tag |
| corr_condition_tagpair |
| corr_condition_tagvalue |
| corr_operation |
| correlation |
| dashboard |
| dashboard_user |
| dashboard_usrgrp |
| dbversion |
| dchecks |
| dhosts |
| drules |
| dservices |
| escalations |
| event_recovery |
| event_suppress |
| event_tag |
| events |
| expressions |
| functions |
| globalmacro |
| globalvars |
| graph_discovery |
| graph_theme |
| graphs |
| graphs_items |
| group_discovery |
| group_prototype |
| history |
| history_log |
| history_str |
| history_text |
| history_uint |
| host_discovery |
| host_inventory |
| host_tag |
| hostmacro |
| hosts |
| hosts_groups |
| hosts_templates |
| housekeeper |
| hstgrp |
| httpstep |
| httpstep_field |
| httpstepitem |
| httptest |
| httptest_field |
| httptestitem |
| icon_map |
| icon_mapping |
| ids |
| images |
| interface |
| interface_discovery |
| item_application_prototype |
| item_condition |
| item_discovery |
| item_preproc |
| item_rtdata |
| items |
| items_applications |
| lld_macro_path |
| maintenance_tag |
| maintenances |
| maintenances_groups |
| maintenances_hosts |
| maintenances_windows |
| mappings |
| media |
| media_type |
| media_type_param |
| opcommand |
| opcommand_grp |
| opcommand_hst |
| opconditions |
| operations |
| opgroup |
| opinventory |
| opmessage |
| opmessage_grp |
| opmessage_usr |
| optemplate |
| problem |
| problem_tag |
| profiles |
| proxy_autoreg_host |
| proxy_dhistory |
| proxy_history |
| regexps |
| rights |
| screen_user |
| screen_usrgrp |
| screens |
| screens_items |
| scripts |
| service_alarms |
| services |
| services_links |
| services_times |
| sessions |
| slides |
| slideshow_user |
| slideshow_usrgrp |
| slideshows |
| sysmap_element_trigger |
| sysmap_element_url |
| sysmap_shape |
| sysmap_url |
| sysmap_user |
| sysmap_usrgrp |
| sysmaps |
| sysmaps_elements |
| sysmaps_link_triggers |
| sysmaps_links |
| tag_filter |
| task |
| task_acknowledge |
| task_check_now |
| task_close_problem |
| task_remote_command |
| task_remote_command_result |
| timeperiods |
| trends |
| trends_uint |
| trigger_depends |
| trigger_discovery |
| trigger_tag |
| triggers |
| users |
| users_groups |
| usrgrp |
| valuemaps |
| widget |
| widget_field |
+----------------------------+
149 rows in set (0.001 sec)MariaDB [zabbix]>
配置zabbix并启动服务
[root@server ~]# vim /etc/zabbix/zabbix_server.conf
ListenPort=10051
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456 #打开注释并修改连接mysql的密码,在124行
DBSocket=/var/lib/mysql/mysql.sock
ListenIP=0.0.0.0
[root@localhost ~]# vim /etc/selinux/config
[root@localhost ~]# vim /etc/zabbix/zabbix_server.conf
[root@localhost ~]# systemctl restart zabbix-server.service
[root@localhost ~]# systemctl enable zabbix-server.service
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-server.service → /usr/lib/systemd/system/zabbix-server.service.
配置httpd并启动服务
[root@localhost ~]# systemctl restart httpd.service
[root@localhost ~]# systemctl enable httpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@localhost ~]#
浏览器访问http://192.168.40.99/zabbix
zabbix监控软件安装相关推荐
- 有关OCS监控软件安装在windows上, 服务端显示乱码的问题
OCS监控软件服务端目前安装在windows服务器上,但windows操作系统的默认字符集是是cp936,即gbk,可以通过chcp命令查看 导致OCS自带的MYSQL无法将字体集设置为utf8,最终 ...
- 傲云浏览器linux,Centos7安装部署zabbix监控软件
目录 部署监控服务器 部署监控服务器Zabbix Server Web页面验证设置 部署监控服务器 一.安装LNMP环境 Zabbix监控管理控制台需要通过Web页面展示出来,并且还需要使用MySQL ...
- Centos7安装部署zabbix监控软件
目录 部署监控服务器 部署监控服务器Zabbix Server Web页面验证设置 部署监控服务器 一.安装LNMP环境 Zabbix监控管理控制台需要通过Web页面展示出来,并且还需要使用MySQL ...
- zabbix监控软件介绍<一>
文章目录 1.zabbix介绍 2.监控分类 3.zabbix特点及主要功能 4.zabbix配置文件 5zabbix5.4帮助手册 1.zabbix介绍 zabbix是基于WEB界面,提供分布式系统 ...
- Zabbix监控服务安装部署
准备工作 主机 操作系统 IP地址 主要软件 hostName Zabbix server端 centos7.2 172.20.122.67 zabbix-server4.0 bigdata001 Z ...
- zabbix监控--环境安装
对服务的管理,不能仅限于可用性. 还需要服务可以安全.稳定.高效地运行. 监控的目的:早发现.早治疗. 被监控的资源类型: 公开数据:对外开放的,不需要认证即可获取的数据 私有数据:对外不开放,需要认 ...
- Zabbix监控平台安装教程,Zabbix入门教程
一.概述 1.什么是Zabbix -Zabbix是一个高度集成的监控解决方案 -可以实现企业级的开源分布式监控 -Zabbix通过C/S模式采集监控数据 -Zabbix通过B/S模式通过Web模式使数 ...
- zabbix 监控下载安装
打开官网地址: https://www.zabbix.com/cn/download? 1.选择您Zabbix服务器的平台 支持多种操作系统的不同版本 和数据库等 2.Install and conf ...
- 网络监控软件安装模式对比
一.外网监控与内网监控 企业网络管理涉及到两个部分.一部分是监视上Internet的行为和内容,也就是大家所谓的上网监控或外网监控:另一部分是如果这个电脑不上Internet但又在内部局域网上(比如打 ...
最新文章
- Screen 操作快捷键
- 【杂谈】手把手带你配置深度学习环境
- google圣诞节彩蛋
- javacv 写mp4_JavaCV实现获取视频每帧并保存
- 让hover效果平滑过渡回初始状态?
- RejectedExecutionException 分析
- Spring MVC 基于URL的映射规则(注解版)
- 一起写框架-控制反转(Ioc)概述(二)
- 人人商城源码怎么安装MySQL_人人商城插件开发手记
- 粉丝福利,抽5本《新程序员》004期免费送
- 4.PEB断链隐藏模块
- 2020年5G通信工程类项目一览,哪些企业成功抢滩?
- 行业寒冬:java生成微信支付二维码
- 基于沉积学教材的自顶向下的概念抽取(以沉积相为例为例)
- ArcGIS 缓冲区与叠加分析
- 如何定义visit函数_visit函数具体代码是什么啊
- 你有没有遇到叫二狗子的那个哥们?
- IE浏览器对象不支持Blob属性或方法,IE浏览器不支持canvas toBlob()方法的Polyfill
- 计算机教学质量提升,计算机科学系开展系列活动提升教育教学质量
- 共有65款 计算机视觉库/人脸识别开源软件