微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CentOS 6.8搭建zabbix平台

CentOS 6.8搭建zabbix平台:

安装httpd:

yum install httpd

安装MysqL

yum install MysqL-server

service MysqLd start

MysqL -u root

update user set password=password(‘xxxxx‘) where user=‘root‘;
flush privileges;
exit

MysqL -u root -p‘xxxx‘

create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to [email protected]‘localhost‘ identified by ‘xxxx‘;
exit

安装PHP5.6(要求PHP5.6以上):

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

yum install --enablerepo=remi --enablerepo=remi-PHP56 PHP PHP-MysqL PHP-bcmath PHP-mbstring PHP-gd

安装zabbix:

useradd zabbix

rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-release-4.0-1.el6.noarch.rpm

yum install zabbix-server-MysqL zabbix-web-MysqL zabbix-agent

zcat /usr/share/doc/zabbix-server-MysqL-4.0.4/create.sql.gz | MysqL -u zabbix -p‘xxxxx‘ zabbix

vi /etc/zabbix/zabbix_server.conf

DBPassword=xxxxx (认为注释掉的)
:wq

cp -rv /usr/share/doc/zabbix-web-4.0.4/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf

vi /etc/httpd/conf.d/zabbix.conf

PHP_value date.timezone Asia/Shanghai (认为注释掉的)
:wq

service httpd restart

/etc/init.d/zabbix-server restart (一定要disabled掉selinux,不然服务会起不来)

/etc/init.d/zabbix-agent restart

chkconfig --level 35 httpd on

chkconfig --level 35 zabbix-server on

chkconfig --level 35 zabbix-agent on

浏览器访问:http://ip/zabbix (配置略,比较简单),初始账号为:Admin(A为大写),密码:zabbix

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。