yum安装zabbix监控,
yum安装zabbix监控,
zabbix服务端部署软件流程:
1.清华源
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm -- 老版本
或者
[root@m01 ~]# rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
[root@m01 ~]# sed -i 's#repo.zabbix.com#mirrors.tuna.tsinghua.edu.cn/zabbix#g' /etc/yum.repos.d/zabbix.repo
2.下载安装zabbix服务端相关软件
zabbix服务程序软件: zabbix-server-mysql
zabbix服务web软件: zabbix-web-mysql httpd php
数据库服务软件: mariadb-server
yum install -y zabbix-server-mysql zabbix-web-mysql httpd php mariadb-server
3.软件配置
vim /etc/zabbix/zabbix_server.conf
126 DBPassword=zabbix
vim /etc/httpd/conf.d/zabbix.conf
21 php_value date.timezone Asia/Shanghai
[root@m01 ~]# grep "[1]" /etc/zabbix/zabbix_server.conf
...............
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[root@m01 ~]# grep "Shanghai" /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
...............
4.编写配置数据库服务
systemctl start mariadb.service
systemctl status mariadb.service
创建zabbix数据库--zabbix
create database zabbix character set utf8 collate utf8_bin;
创建数据库管理用户
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
在zabbix数据库中导入相应的表信息
zcat /usr/share/doc/zabbix-server-mysql-4.0.20/create.sql.gz|mysql -uzabbix -pzabbix zabbix
5. 启动zabbix程序相关服务
数据库服务 zabbix服务 httpd服务
systemctl start zabbix-server.service httpd mariadb.service
systemctl enable zabbix-server.service httpd mariadb.service
6.登录zabbix服务端web界面, 进行初始化配置
http://10.0.0./zabbix/setup.php
7.登录zabbix服务web页面
用户名Admin 密码zabbix
第二部分 监控客户端部署流程
1) 清华源
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
2)下载安装zabbix客户端软件
yum install -y zabbix-agent
3)编写zabbix客户端配置文件
vim /etc/zabbix/zabbix_agentd.conf
98 Server=zabbix的IP地址
4) 启动zabbix-agent服务
[root@web01 ~]# systemctl start zabbix-agent
[root@web01 ~]# netstat -lntup|grep 10050
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 4509/zabbix_agentd
tcp 0 0 :::10050 ::
评论暂时关闭