zabbix proxy安裝

zabbix 3.0
os=centos 7

ref:
> https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages/proxy_installation

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum install mariadb mariadb-server -y
systemctl enable mariadb
systemctl restart mariadb

yum install zabbix-proxy-mysql -y

create database zabbix_proxy character set utf8 collate utf8_bin;
grant all privileges on zabbix_proxy.* to zabbix@localhost identified by '<password>';

cd /usr/share/doc/zabbix-proxy-mysql-3.0.7/
zcat schema.sql.gz  | mysql -u zabbix -p -D zabbix_proxy

vi /etc/zabbix/zabbix_proxy.conf
Server=
Hostname=
DBPassword=

setsebool -P zabbix_can_network 1

systemctl restart zabbix-proxy

yum install policycoreutils-python -y
audit2why < /var/log/audit/audit.log
cd /etc/selinux/targeted/modules/
audit2allow -m local -l -i /var/log/audit/audit.log > local.te
checkmodule -M -m -o local.mod local.te
semodule_package -o local.pp -m local.mod
semodule -i local.pp

systemctl restart zabbix-proxy

firewall-cmd --remove-service dhcpv6-client --permanent
firewall-cmd  --add-port=10050/tcp --permanent
firewall-cmd  --add-port=10051/tcp --permanent
firewall-cmd --reload

##
fw rich rule
> firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="server_ip" port port="10050" protocol="tcp" accept";firewall-cmd --reload

留言

熱門文章