Install Zabbix 3.4 server on CentOS 7

Categories: Linux

Let’s install the dependencies first:
yum install mariadb-server mariadb-embedded mariadb-devel httpd php php-gd php-bcmath php-ctype php-xml php-xmlreader php-xmlwriter php-session php-mbstring php-ldap php-gettext php-mysqli pcre pcre-devel libevent libevent-devel libssh2 libcurl libcurl-devel net-snmp-devel net-snmp-agent net-snmp-libs libxml2 libxml2-devel

Edit /etc/php.ini file and change this variables to:
max_execution_time = 600
max_input_time = 600
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = Europe/Rome

Enable Apache at boot and restart it:
systemctl enable httpd
systemctl restart httpd

Enable Mariadb and start it:
systemctl enable mariadb
systemctl start mariadb

And configure it with:

Install Zabbix with:
rpm -i
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

You can find the right command in the download page of Zabbix:

Now access to the sql console:
mysql -u root -p

And create the database:
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '';
flush privileges;

Populate the database:
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

Edit the /etc/zabbix/zabbix_server.conf file and set the datadase password:

Edit the /etc/httpd/conf.d/zabbix.conf file and set the timezone:
php_value date.timezone Europe/Rome

Let’s disable SELinux (/etc/selinux/config):

Now the firewall and enable zabbix server and agent:
systemctl disable firewalld
systemctl stop firewalld
systemctl enable zabbix-server zabbix-agent
systemctl restart zabbix-server zabbix-agent

Create the zabbix directory in the apache directory and copy the file from the zabbix installation:
mkdir /var/www/html/zabbix
cp -a /usr/share/zabbix/ /var/www/html/
chmod -R 777 /var/www/html/zabbix

Open the web interface and install your Zabbix server:

Default username and password are: Admin / zabbix


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.