Zabbix/Installatie: verschil tussen versies
Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
Regel 11: | Regel 11: | ||
mysql_secure_installation | mysql_secure_installation | ||
</pre> | </pre> | ||
'''Secure MySQL''' | '''Secure MySQL''' | ||
Regel 26: | Regel 27: | ||
<code>Remove test database and access to it? [Y/n] Y</code> | <code>Remove test database and access to it? [Y/n] Y</code> | ||
'''Maak database en vul deze''' | '''Maak database en vul deze''' | ||
<pre>mysql -u root -p | <pre>mysql -u root -p | ||
mysql> create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; quit; | mysql> create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; quit; | ||
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix | zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix | ||
</pre> | </pre> | ||
'''Bewerk Server Config''' | '''Bewerk Server Config''' | ||
<pre> | <pre> | ||
Regel 37: | Regel 42: | ||
</pre> | </pre> | ||
<code>DBPassword=zabbix</code> | <code>DBPassword=zabbix</code> | ||
'''Webserver instellen''' | '''Webserver instellen''' | ||
<pre>nano /etc/httpd/conf.d/zabbix.conf</pre> | <pre>nano /etc/httpd/conf.d/zabbix.conf</pre> | ||
Regel 42: | Regel 49: | ||
<pre>systemctl restart zabbix-server zabbix-agent httpd | <pre>systemctl restart zabbix-server zabbix-agent httpd | ||
systemctl enable zabbix-server zabbix-agent httpd</pre> | systemctl enable zabbix-server zabbix-agent httpd</pre> | ||
'''Firewall uitschakelen''' | '''Firewall uitschakelen''' | ||
<pre> | <pre> | ||
Regel 47: | Regel 56: | ||
systemctl stop firewalld | systemctl stop firewalld | ||
</pre> | </pre> | ||
'''SELinux''' | '''SELinux''' | ||
<code>setsebool -P httpd_can_connect_zabbix on</code> | <code>setsebool -P httpd_can_connect_zabbix on</code> |
Versie van 22 okt 2019 16:14
Voorbereiding
Installeer CentOS en Finetune CentOS
Installatie
Start
rpm -i https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server httpd nmap net-snmp net-snmp-utils OpenIPMI ipmitool fping systemctl start mariadb systemctl enable mariadb mysql_secure_installation
Secure MySQL
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Maak database en vul deze
mysql -u root -p mysql> create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; quit; zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix
Bewerk Server Config
nano /etc/zabbix/zabbix_server.conf
DBPassword=zabbix
Webserver instellen
nano /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Europe/Amsterdam
systemctl restart zabbix-server zabbix-agent httpd systemctl enable zabbix-server zabbix-agent httpd
Firewall uitschakelen
systemctl disable firewalld systemctl stop firewalld
SELinux
setsebool -P httpd_can_connect_zabbix on
If the database is accessible over network (including 'localhost' in case of PostgreSQL), you need to allow Zabbix frontend to connect to the database too:
setsebool -P httpd_can_network_connect_db on
SELinux uitschakelen
nano /etc/selinux/config SELINUX=disabled reboot
Open je browser en ga naar http://server_ip_or_name/zabbix en volg de stappen op je scherm.
Gefeliciteerd je hebt nu zabbix geinstalleerd. en je kan inloggen met Admin/zabbix (Admin met een hoofdletter A)