vim zabbix.sh
#
rpm -ivh http://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
for i in `seq 1 5`
do
if [ `rpm -aq|grep -c zabbix` -eq 5 ];then
break
fi
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server
done
systemctl restart mariadb
mysql -e "create database zabbix;"
mysql -e "grant all on *.* to zabbix@
mysql -e "flush privileges;"
zcat /usr/share/doc/zabbix-server-mysql-4.2.8/create.sql.gz |mysql -uzabbix -p123 zabbix
sed -i
sed -i
sed -i
systemctl start zabbix-server
systemctl start zabbix-agent
systemctl start httpd
————————————————
版权声明:本文为CSDN博主「a13568hki」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/a13568hki/article/details/103067691
sh zabbix.sh