1、zabbix服务端
环境
ip 10.0.0.61 hostname zabbix-server
安装
安装zabbix 3.0 LTS1:配置zabbix yum仓库curl -o zabbix-release-4.0-1.el7.noarch.rpm https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpmrpm -ivh zabbix-release-4.0-1.el7.noarch.rpm[root@zabbix-server ~]# cat /etc/yum.repos.d/zabbix.repo[zabbix]name=Zabbix Official Repository - $basearchbaseurl=https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX[zabbix-non-supported]name=Zabbix Official Repository non-supported - $basearch baseurl=https://mirror.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIXgpgcheck=12:安装zabbix服务端和zabbix-web前端yum install zabbix-server-mysql zabbix-web-mysql -y3:安装mariadb,创建zabbix库,授权zabbix用户yum install mariadb-server -ysystemctl start mariadbsystemctl enable mariadbmysql_secure_installation回车nyyyymysqlcreate 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-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix检查zabbix库是否导入成功mysql -uroot zabbix -e 'show tables'4:配置启动zabbix-servervi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbixDBUser=zabbixDBPassword=zabbix启动zabbix-serversystemctl start zabbix-server systemctl enable zabbix-server检查:netstat -lntup5:修改Zabbix前端的PHP配置,并启动httpdvi /etc/httpd/conf.d/zabbix.confphp_value date.timezone Asia/Shanghaisystemctl start httpdsystemctl enable httpd6:前端zabbix-web的安装浏览器:http://10.0.0.61/zabbix后期修改zabbix数据库密码的时候,需要修改的配置文件:/etc/zabbix/web/zabbix.conf.phphttp://10.0.0.61/zabbix/zabbix.php登录的账号密码;Adminzabbix
2、zabbix客户端
本地监控
[root@zabbix-server ~]# rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-agent-4.0.11-1.el7.x86_64.rpm[root@zabbix-server ~]# systemctl start zabbix-agent.service[root@zabbix-server ~]# systemctl enable zabbix-agent.service
远程监控
[root@glusterfs02 ~]# rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-agent-4.0.11-1.el7.x86_64.rpm[root@glusterfs02 ~]# vim /etc/zabbix/zabbix_agentd.conf 98行 Server=10.0.0.61[root@glusterfs02 ~]# systemctl start zabbix-agent.service[root@glusterfs02 ~]# systemctl enable zabbix-agent.service