zabbix安装及监控

1 先搭建好nginx和php
1配置nginx文件内容
[root@m03 /etc/nginx/conf.d]#cat zabbix.etiantian.org.conf

server {

 listen 80;

 server_name zabbix.etiantian.org;

 root /data/zabbix;

 location / {

index  index.php;

}

location ~ \.php$ {

  fastcgi_pass 127.0.0.1:9000;

  fastcgi_index index.php;

}

}
2.zabbix源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum install mariabd-server zabbix-server-mysql zabbix-agent2 sedi.bak's#http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch#https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/x86_64/#g'
数据库初始化
mysql_secure_installation
create database zabbix character set utf8 collate utf8_bin;创建用户字符集
grant all on zabbix.* to 'zabbix'@'localhost' identified by '1';
select user,host from mysql.user;查看
安装数据
zcat /usr/share/doc/zabbix-server-mysql-5.0.15/create.sql.gz | mysql -uzabbix -p1 zabbix
grep '^[a-Z]' /etc/zabbix/zabbix_server.conf
将zabbix_server.conf 中的DBHost= 和DBPasswrd=1

你可能感兴趣的:(zabbix安装及监控)