CentOS7 - yum方式安装Zabbix及使用
#rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
# yum clean all
2. 安裝mysql,zabbix-server agent和apache
#yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server -y
3. 配置数据库
#systemctl start mariadb
#systemctl enable mariadb
mysql -uroot
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p Zabbix
4. 配置数据库
#systemctl start mariadb
#systemctl enable mariadb
mysql -uroot
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p Zabbix
5. 配置Zabbix Server的数据库和网页
#vi /etc/zabbix/zabbix_server.conf
#vi /etc/httpd/conf.d/zabbix.conf
#vi /etc/php.ini
系统时区也设置下:
#timedatectl set-timezone Asia/Shanghai
启动 zabbix-server zabbix-agent httpd
# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd
如果开启了SELinux,可关闭或者执行以下操作:
#cat /var/log/audit/audit.log | grep zabbix_server | grep denied | audit2allow -M zabbix-server_setrlimit
#semodule -i zabbix-server_setrlimit.pp
#ausearch -c 'zabbix_server' --raw | audit2allow -M my-zabbixserver
#semodule -i my-zabbixserver.pp
#semodule -l
#systemctl restart zabbix-server
如果开启了Firewalld防火墙,需要放通端口
#firewall-cmd --zone=public --add-port=80/tcp --permanent
#firewall-cmd –reload
防火墙放通端口 http://x.x.x.x/zabbix
如何使用等,请参考以下链接文档查看,有时会挂,可以联系我~
http://kod.umount.cn:8088/?explorer&path=/document/
zabbix参考手册.docx
各设备开启SNMP方法.docx
发表吐槽
你肿么看?
既然没有吐槽,那就赶紧抢沙发吧!