云计算
zabbix 概述
zabbix 是一个高度集成的企业级开源网络监控解决方案,与 cacti、nagios 类似,提供分布式监控以及集中的 web 管理界面。由 zabbix serve r端与 zabbix agent 组成。被监控对象只有支持 snmp 协议或者运行 zabbix_agents 代理程序即可。zabbix 的官方网址为 http://www.zabbix.com/ ,软件可以自由下载使用。
zabbix 具备常见商业监控软件所具备的功能:主机性能检测网络设备性能监控、数据库性能监控、ftp等同于协议的监控,能够利用灵活的可定制警告机制,运行用户对事件发送基于 e-mail 的警告,可以保证相关维护人员对问题作出快速响应,还可以利用存储数据提供杰出的报表及实时的图形化数据处理。
zabbix 特点
支持自动发现网络设备和服务器
支持分布式监控
可设置报警阀值
可通过多种方式进行数据收集
可定制的报警方式
实时的绘图功能
通过web监控系统与设置
案例环境,如表所示。
主机 操作系统 ip地址 主要操作
zabbix服务器 centos 7 192.168.66.146 搭建lamp 架构,部署zabbix-sever
linux客户机 centos 7 192.168.66.145 部署zabbix-agent
解决中文乱码的软件包链接:
链接:https://pan.baidu.com/s/1obft9zepwo9l05k-f79zfq
提取码:nxy3
zabbix 通过 c/s 模式采集数据,通过 b/s 模式在 web 端展示和配置。其中 zabbix_server 可以运行在 centos 、rhel 、suse 、ubuntu 等 linux 系统上,还需要使用 lamp 平台来承载数据库和 web 界面。
一. 在监控端部署 lamp 架构
1.关闭防火墙
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service
removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
removed symlink /etc/systemd/system/dbus-org.fedoraproject.firewalld1.service.
[root@localhost ~]# setenforce 0
2.安装 lamp 所需的软件包
[root@localhost ~]# yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash
3.修改配置文件
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf //httpd 的主配置文件
95 servername www.yun.com:80 //设置servername
163 <ifmodule dir_module>
164 directoryindex index.html index.php //页面首页类型支持 index.php
编辑 /etc/php.ini 配置文件,设置时区
[root@localhost ~]# vim /etc/php.ini
878 date.timezone = prc //设置中国时区
4.启动 httpd 服务和 maruadb 服务,并查看端口。
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl start mariadb.service
[root@localhost ~]# netstat -ntap | egrep '(3306|80)' //查看3306和80端口
tcp 0 0 0.0.0.0:3306 0.0.0.0:* listen 4630/mysqld
tcp6 0 0 :::80 :::* listen 4351/httpd
5.初始化数据库的配置
[root@localhost ~]# mysql_secure_installation
note: running all parts of this script is recommended for all mariadb
servers 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 //设置root密码
new
re-enter new
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] n //是否删除匿名用户 n
… skipping.
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] n //运行远程登录
… skipping.
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] n //删除测试数据库 n
… skipping.
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!
华为云服务器怎么安装虚拟机域名服务器在华为云购买如何开发公司内部邮箱普通企业级云服务器怎么用美国Neustar注册管理机构服务部一行到访易介集团阿里云怎么看服务器的公共镜像陌陌官网遭嫌弃, 池俊秀喊话快拿下hello.com域名提交备案后被退回原因是域名注册商那里是英文