Install CentOS 7
yum -y update
yum -y install epel-release
Install things you will need (my ISO is based on 1511 which did not have firewalld
install by default).
yum -y install wget nano mariadb mariadb-server firewalld setroubleshoot setools
Turn SELinux off for the install. This is specifically not permanent.
setenforce 0
Change SELinux to allow Zabbix to connect to the network
setsebool -P httpd_can_connect_zabbix on
setsebool -P zabbix_can_network on
Start and enable the firewall. Allow HTTP/S and Zabbix ports.
systemctl enable firewalld
systemctl start firewalld
firewall-cmd --zone=public --add-port=http/tcp --permanent
firewall-cmd --zone=public --add-port=https/tcp --permanent
firewall-cmd --zone=public --add-port=10050/tcp --permanent
firewall-cmd --zone=public --add-port=10051/tcp --permanent
firewall-cmd --reload
Start the database and then run the initial configuration
systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation
This will start a wizard to enable typical security measure for the database. The capitalized letter is the default, and is the choice you want to make, so you can simply hit enter through all of these except for setting the new password, obviously.
Enter current password for root (enter for none):
Set root password? [Y/n]
New password: databaserootpassword
Re-enter new password: databaserootpassword
Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]
Sign in to the database and create the ownCloud instance and user.
You will be prompted to enter your database root password.
mysql -uroot -p
Now you will run 4 SQL commands, please note the ;
at the end of each. It is a required part of the SQL syntax . These are simplified defaults, I would generally recommend you set them to something a little less obvious just to help with security.
create database zabbixdb;
create user 'zabbixuser'@'localhost' identified by 'zabbixuserpassword';
grant all on zabbixdb.* to 'zabbixuser'@'localhost';
flush privileges;
quit
Install the Zabbix repository
# Zabbix 3.0
#rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
# Zabbix 3.2
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
Install Zabbix Server
yum install zabbix-server-mysql zabbix-web-mysql
From here you can now pick up with the main Zabbix instructions from this point.
I'll retype those later or something.
After your system is up and running, reboot. You should hopefully have a problem with SELinux blocking a couple of things.
[root@zabbix ~]# sealert -a /var/log/audit/audit.log | grep zabbix
SELinux is preventing /usr/sbin/zabbix_server_mysql from using the setrlimit access on a process.
<snip lots of text>
SELinux is preventing /usr/sbin/zabbix_agentd from using the setrlimit access on a process.
Now that these errors are in the audit log, we can set up SELinux to allow it.
If anyone knows SELinux well enough to create the policies needed without waiting for a fail, just let me know. I will be happy to update these instructions.
ausearch -c 'zabbix_server' --raw | audit2allow -M my-zabbixserver
semodule -i my-zabbixserver.pp
ausearch -c 'zabbix_agentd' --raw | audit2allow -M my-zabbixagentd
semodule -i my-zabbixagentd.pp