安装zabbix3.4 centos7
服务端 192.168.70.133
客户端 192.168.70.134
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
sed -i 's/SELINUXTYPE=targeted/#&/' /etc/selinux/config
关闭防火墙,安全机制(reboot重启后生效)
修改字符集
localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
export LC_ALL =ZH_CN.UTF-8
echo 'LANG=zh_CN.UTF-8' >/etc/locale.conf
安装配置zabbix
yum -y install mariadb mariadb-devel mariadb-server
systemctl enable mariadb
systemctl start mariadb
设置密码
mysqladmin -u root -h localhost password '123456' #自定义密码
创建数据库授权
mysql -uroot -p123456
create database zabbix character set utf8 collate utf8_bin
grant all privileges on zabbix.* to zabbix@lozalhost identidied by '123456';
quit
安装zabbix-server zabbix-agent # 主机需要连接外网
rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
导入zabbix初始化数据
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p123456 zabbix
修改zabbix配置文件
vim /etc/zabbix/zabbix_server.conf
修改数据库配置
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456 #密码需要上部分同步
修改PHP时区
vim /etc/httpd/conf.d/zabbix.conf
改成上海
php_value date.timezone Asia/Shanghai
将zabbix-server zabbix-agent httpd 服务重新启动
测试页面http://192.168.70.133/zabbix
客户端
zabbix-agent 安装
rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install -y zabbix-agent zabbix-get
修改agent配置文件
vim /etc/zabbix/zabbix-agent.conf
Server=192.168.70.133 # zabbix服务端内网IP
ServerActive=192.168.70.133 # zabbix服务端内网IP,Active表示agent主动推送
Hostname=Jump Server # zabbix客户端主机名称,需要和web端添加的名称一致
Include=/etc/zabbix/zabbix_agentd.d/*.conf
转载连接 http://blog.51cto.com/andyxu/2120362 内有监控windows端的部署