官网下载地址 www.zabbix.com/download php
wget repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm yum install -y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql
会连带安装httpd和php
若是mysql以前没有安装的话,须要根据lamp那一章的mysql安装方法安装mysql
http://www.javashuo.com/article/p-hksqmazv-dy.htmlmysql
vim /etc/my.cnf //须要增长配置 character_set_server = utf8
重启mysqld服务后,进入mysql命令行,建立zabbix库ios
mysql -uroot -p123456 create database zabbix character set utf8; 再建立用户 grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'chen-zabbix'; 导入数据 cd /usr/share/doc/zabbix-server-mysql-3.2.11/ //若是文件夹不存在就自动不全,随着版本更新,文件名的后缀数字会改变 gzip -d create.sql.gz mysql -uroot -p123456 zabbix < create.sql systemctl start httpd systemctl enable httpd vim /etc/zabbix/zabbix_server.conf //修改或增长 DBHost=127.0.0.1 //在DBName=zabbix上面增长 DBPassword=chen-zabbix //在DBuser下面增长 systemctl start zabbix-server //启动服务 systemctl enable zabbix-server //将服务加入开机启动 chkconfig nginx off //关闭nginx的开启启动
ps -ef | grep zabbix //检查服务是否启动
若是没有启动,能够去查看log
less /var/log/zabbix/zabbix_server.log
netstat -lntp |grep zabbix //查看监听端口
浏览器访问http://192.168.127.133/zabbix/ web界面下面配置zabbixnginx
这里发现date后是fail web
vim /etc/php.ini 添加 date.timezone = Asia/Shanghai 重启httpd systemctl restart httpd
刷新web管理界面
ip填127.0.0.1
端口0就是默认的3306,若是端口修改了这里就填修改后的端口
配置完成后用管理员登录
用户名Admin 密码zabbix
进入后台第一件事情就是修改密码sql
保存配置并刷新网页数据库
进入mysql命令行,选择zabbix库vim
mysql -uroot -p123456 zabbix update users set passwd=md5('123456') where alias='Admin';
这样就更改了Admin用户的密码浏览器
在另外一台机器操做
在客户端上也须要下载zabbix的yum源架构
wget repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm rpm -ivh zabbix-release-3.2-1.el7.noarch.rpm yum install -y zabbix-agent vim /etc/zabbix/zabbix_agentd.conf //修改以下配置 Server=127.0.0.1修改成Server=192.168.127.133 //定义服务端的ip(被动模式) ServerActive=127.0.0.1修改成ServerActive=192.168.127.133 //定义服务端的ip(主动模式) Hostname=Zabbix server修改成Hostname=chinantfy-134 //这是自定义的主机名,一会还须要在web界面下设置一样的主机名 systemctl start zabbix-agent systemctl enable zabbix-agent