监控软件zabbix之安装

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介:

1.搭建LAMP环境和安装系统依赖包

[root@tong3 ~]# yum install gcc gcc-c++ crul crul-devel mysql mysql-server httpd php-gd php php-xml php-mbstring net-snmp snmp net-snmp-devel php-mysql php-bcmath -y

[root@tong3 ~]# cd /etc/httpd/conf
[root@tong3 conf]# vim httpd.conf

ServerName localhost

DirectoryIndex index.php index.html index.html.var

AddType application/x-httpd-php .php

[root@tong3 conf]# vim /var/www/html/index.php

<?php
phpinfo();
?>

[root@tong3 conf]# vim /etc/php.ini 

date.timezone = "Asia/Shanghai"

[root@tong3 conf]# /etc/init.d/httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]
[root@tong3 conf]# /etc/init.d/mysqld restart
Shutting down MySQL... SUCCESS! 
Starting MySQL.. SUCCESS! 
[root@tong3 conf]#

测试:

wKiom1UczTLhXEHsAARvBLzf9YI325.jpg

 

2.下载安装zabbix软件

[root@tong3 ~]# wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.4/zabbix-2.4.4.tar.gz

[root@tong3 ~]# tar xvf zabbix-2.4.4.tar.gz

[root@tong3 ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.21-log MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on zabbix.* to zabbix@'localhost' identified by 'system';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>\u zabbix

mysql> source /root/zabbix-2.4.4/database/mysql/schema.sql;

mysql> source /root/zabbix-2.4.4/database/mysql/images.sql;

mysql> source /root/zabbix-2.4.4/database/mysql/data.sql;

mysql> exit
Bye

[root@tong3 ~]# cd zabbix-2.4.4

[root@tong3 zabbix-2.4.4]# ./configure  --prefix=/usr/local/zabbix-2.4.4 --enable-server --enable-agent --with-net-snmp --with-libcurl --enable-proxy --with-mysql=/usr/bin/mysql_config

[root@tong3 zabbix-2.4.4]# make && make install

[root@tong3 zabbix-2.4.4]# vim /etc/services

zabbix-agent    10050/tcp               # client
zabbix-agent    10050/udp               #
zabbix-trapper  10051/tcp               # server
zabbix-trapper  10051/udp               # server

[root@tong3 zabbix-2.4.4]# cd /usr/local/zabbix-2.4.4/sbin/

[root@tong3 sbin]# useradd -r -s /sbin/nologin -u 10050 zabbix

[root@tong3 sbin]# vim ../etc/zabbix_server.conf

DBName=zabbix             --数据库名称

DBUser=zabbix               --数据库用户名

DBPassword=123456      --数据库密码

ListenIP=127.0.0.1          --数据库ip地址

[root@tong3 sbin]# cp -a ~/zabbix-2.4.4/misc/init.d/tru64/zabbix_* /etc/init.d/

[root@tong3 sbin]# chmod +x /etc/init.d/zabbix_agentd 
[root@tong3 sbin]# chmod +x /etc/init.d/zabbix_server

[root@tong3 sbin]# vim /etc/init.d/zabbix_agentd

DAEMON=/usr/local/zabbix-2.4.4/sbin/zabbix_agentd

[root@tong3 sbin]# vim /etc/init.d/zabbix_server

DAEMON=/usr/local/zabbix-2.4.4/sbin/zabbix_server

[root@tong3 sbin]# /etc/init.d/zabbix_agentd start
Zabbix agent started.
[root@tong3 sbin]# /etc/init.d/zabbix_server start
Zabbix server started.

[root@tong3 sbin]# cp -a ~/zabbix-2.4.4/frontends/php /var/www/html/zabbix

[root@tong3 sbin]# cd /var/www/html/

[root@tong3 html]# chown -R apache:apache zabbix/

[root@tong3 html]# vim /etc/php.ini

post_max_size = 16M

max_execution_time = 300

max_input_time = 300

[root@tong3 html]#

图:

wKioL1Uc3OTT8LAEAAOOlunpixo002.jpg

wKiom1Uc26aSIoQaAAS8wfbXJsQ894.jpg

wKioL1Uc3OXQcroMAAO99iKPrnM382.jpg

wKiom1Uc26eCKyO8AAMTxClPLew135.jpg

wKioL1Uc3OaQ52FCAAOYvtQnpMo551.jpg

wKiom1Uc26iBeni1AAL1L5p9euY203.jpg

用户名:admin,密码:zabbix

wKioL1Uc3OeAcEn_AANJ1JAmOe4954.jpg wKioL1Uc4AiTEGmdAAUWPYjEbsY395.jpg










本文转自 z597011036 51CTO博客,原文链接:http://blog.51cto.com/tongcheng/1627641,如需转载请自行联系原作者
相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
17天前
|
监控 Linux
yum install -y net-snmp-devel 安装不成功 zabbix项目安装,Errors during downloading metadata for repository ‘extras-common’:问题解决方案-优雅草卓伊凡
yum install -y net-snmp-devel 安装不成功 zabbix项目安装,Errors during downloading metadata for repository ‘extras-common’:问题解决方案-优雅草卓伊凡
53 13
yum install -y net-snmp-devel 安装不成功 zabbix项目安装,Errors during downloading metadata for repository ‘extras-common’:问题解决方案-优雅草卓伊凡
|
15天前
|
监控 Linux PHP
【02】客户端服务端C语言-go语言-web端PHP语言整合内容发布-优雅草网络设备监控系统-2月12日优雅草简化Centos stream8安装zabbix7教程-本搭建教程非docker搭建教程-优雅草solution
【02】客户端服务端C语言-go语言-web端PHP语言整合内容发布-优雅草网络设备监控系统-2月12日优雅草简化Centos stream8安装zabbix7教程-本搭建教程非docker搭建教程-优雅草solution
65 20
|
9天前
|
存储 缓存 监控
|
1月前
|
监控 Java 应用服务中间件
tomcat相关概念与部署tomcat多实例-zabbix监控(docker部署)
通过上述步骤,您可以在Ubuntu系统上成功编译并安装OpenCV 4.8。这种方法不仅使您能够定制OpenCV的功能,还可以优化性能以满足特定需求。确保按照每一步进行操作,以避免常见的编译问题。
61 23
|
1月前
|
监控 Java 应用服务中间件
tomcat相关概念与部署tomcat多实例-zabbix监控(docker部署)
通过上述步骤,您可以在Ubuntu系统上成功编译并安装OpenCV 4.8。这种方法不仅使您能够定制OpenCV的功能,还可以优化性能以满足特定需求。确保按照每一步进行操作,以避免常见的编译问题。
53 22
|
1月前
|
监控 Java 应用服务中间件
tomcat相关概念与部署tomcat多实例-zabbix监控(docker部署)
通过上述步骤,您可以在Ubuntu系统上成功编译并安装OpenCV 4.8。这种方法不仅使您能够定制OpenCV的功能,还可以优化性能以满足特定需求。确保按照每一步进行操作,以避免常见的编译问题。
70 25
|
2月前
|
监控 安全 前端开发
使用 Zabbix 监控堆外应用
使用 Zabbix 监控堆外应用
67 9
|
2月前
|
监控 数据可视化 Java
zabbix全面的监控能力
zabbix全面的监控能力
134 7
|
3月前
|
监控 Java Shell
监控堆外第三方监控工具Zabbix
监控堆外第三方监控工具Zabbix
64 5
|
3月前
|
SQL 监控 数据库
OceanBase社区版可以通过Zabbix监控
OceanBase社区版可以通过Zabbix监控
204 7

热门文章

最新文章

推荐镜像

更多