https://www.cnblogs.com/Sungeek/p/9069999.htmlphp
zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。html
zabbix能监视各类网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各类问题。python
zabbix由2部分构成,zabbix server与可选组件zabbix agent。mysql
zabbix server能够经过SNMP,zabbix agent,ping,端口监视等方法提供对远程服务器/网络状态的监视,数据收集等功能,它能够运行在Linux,Solaris,HP-UX,AIX,Free BSD,Open BSD,OS X等平台上。linux
LAMP:Linux+Apache+Mysql/MariaDB+Perl/PHP/Python一组经常使用来搭建动态网站或者服务器的开源软件,自己都是各自独立的程序,可是由于常被放在一块儿使用,拥有了愈来愈高的兼容度,共同组成了一个强大的Web应用程序平台。nginx
L:linuxweb
A:apachesql
N:nginx数据库
M:mysql,mariaDBapache
P:php,python,perl
关闭SeLinux 临时关闭:setenforce 0
永久关闭:vi /etc/selinux/config
关闭防火墙
一、临时关闭
systemctl stop firewalld.service
二、永久关闭
systemctl disable firewalld.service
安装环境
LAMP
一、安装apache
yum install -y httpd
httpd服务开机进行自启
systemctl enable httpd
启动httpd服务
Systemctl start httpd
二、安装mysql
由于7版本mysql要收费,因此咱们安装mariadb
yum install -y mariadb mariadb-server
开机自启动
Systemctl enable mariadb
运行服务
Systemctl start mariadb
查看Mariadb是否安装成功
三、安装php环境
yum install -y php php-mysql
四、安装zabbix
(1)下载包
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
(2)安装zabbix的包
yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender
四、建立一个zabbix库并设置为utf8的字符编码格式
create database zabbix character set utf8 collate utf8_bin;
建立帐户而且受权设置密码
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
给来自loclhost的用户zabbxi分配可对数据库zabbix全部表进行全部操做的权限,而且设定密码为zabbix
刷新
flush privileges;
exit退出
五、导入表
切换到此目录下
cd /usr/share/doc/zabbix-server-mysql-3.2.10/
进行解压
gunzip create.sql.gz
对表进行导入
六、配置zabbix server配置文件
配置文件目录
cd /etc/zabbix
对zabbix_server.conf进行配置
运行zabbix-server服务
开机自启zabbix-server服务
七、配置php
cd /etc/httpd/conf.d
配置时间
vi zabbix.conf
Systemctl restart httpd
八、登录zabbix网址设置
192.168.85.11/zabbix
password是咱们设置的数据库密码zabbix
登录帐户是Admin
密码是zabbix
九、设置中文
十、对服务器自身进行监控
十一、解决中文乱码没法显示的问题
从咱们电脑win7里面找到黑体右键复制到桌面而后拉到zabbix服务器上面
直接修改字体名字
切换到这个目录下面: /usr/share/zabbix/fonts
如今的中文字体是显示正常的了
Sungeek博客
一名运维小菜鸟
http://www.cnblogs.com/Sungeek/
安装及设置Zabbix-agent
安装zabbix-agent
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
[root@ecs-5c78-0002 ~]# rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.centos.noarh.rpm
Retrieving https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:zabbix-release-3.4-1.el7.centos ################################# [100%]
[root@ecs-5c78-0002 ~]# yum install zabbix-agent –y
或者使用官网提供的连接,而后rpm -ivh进行安装:rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.0-1.el7.x86_64.rpm
配置zabbix-agent
[root@ecs-5c78-0002 ~]# vim /etc/zabbix/zabbix_agentd.conf
修改server IP地址
修改成zabbix-server服务端的IP地址
修改ServerActive IP地址
修改成zabbix-server服务器端的IP地址
启动zabbix-agent并设置开机启动
[root@ecs-5c78-0002 ~]# systemctl start zabbix-agent.service
[root@ecs-5c78-0002 ~]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
---------------------
做者:友人a笔记
来源:CSDN
原文:https://blog.csdn.net/tladagio/article/details/79056421
版权声明:本文为博主原创文章,转载请附上博文连接!
5、安装及设置Zabbix-agent
安装zabbix-agent
[root@ecs-5c78-0002 ~]# rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarh.rpm
Retrieving https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:zabbix-release-3.4-1.el7.centos ################################# [100%]
[root@ecs-5c78-0002 ~]# yum install zabbix-agent –y
或者使用官网提供的连接,而后rpm -ivh进行安装:rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.0-1.el7.x86_64.rpm
配置zabbix-agent
[root@ecs-5c78-0002 ~]# vim /etc/zabbix/zabbix_agentd.conf
修改server IP地址
修改成zabbix-server服务端的IP地址
修改ServerActive IP地址
修改成zabbix-server服务器端的IP地址
启动zabbix-agent并设置开机启动
[root@ecs-5c78-0002 ~]# systemctl start zabbix-agent.service
[root@ecs-5c78-0002 ~]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
6、Zabbix-server添加监控主机
手动添加监控主机
指定zabbix-agent机器IP
增长监控模板,只有添加了模板才会真正监控到主机
添加图形,以便观察数据
监控成功(客户端要关闭防火墙或者放通端口,要不ZBX图标会红色报错)
自动发现主机
添加发现规则
查看自动发现的主机
到此,zabbix简单监控就部署好了。
---------------------
做者:友人a笔记
来源:CSDN
原文:https://blog.csdn.net/tladagio/article/details/79056421
版权声明:本文为博主原创文章,转载请附上博文连接!
(2018-03-01 18:29:21)
标签: zabbix_agentzabbix_server |
分类: 服务器 |
当跨网段时,zabbix_agentd.conf 中 Server的值要填写全部的远程zabbix_server主机的ip地址,甚至要把所在的网关写上去,以半角逗号“,”分开,以下面配置的红色字体部分。
ServerActive的值也是填写远程zabbix_server的ip地址,EnableRemoteCommands=1 。
### Option: Server
# List of comma delimited IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers.
# Incoming connections will be accepted only from the hosts listed here.
# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally and '::/0' will allow any IPv4 or IPv6 address.
# '0.0.0.0/0' can be used to allow any IPv4 address.
# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
#
# Mandatory: no
# Default:
# Server=
Server=192.168.1.8,192.168.2.8,192.168.1.0/24,192.168.2.0/24
### Option: ServerActive
# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
# If port is not specified, default port is used.
# IPv6 addresses must be enclosed in square brackets if port for that host is specified.
# If port is not specified, square brackets for IPv6 addresses are optional.
# If this parameter is not specified, active checks are disabled.
# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=
ServerActive=192.168.1.8,192.168.2.8
EnableRemoteCommands=1