Zabbix - Server Installation With MySQL Database
Zabbix - Server Installation With MySQL Database
It is a good practice to have the innodb_file_per_table option enabled on MySQL. Check this setting
before proceeding.
Installing packages
Here is an example for Zabbix server and web frontend installation with MySQL database:
Create Zabbix database and user on MySQL by the following commands, where <root_password>
shall be replaced with the actual root password (e.g., shell> mysql -uroot -p12345) and
<password> with new password for zabbix user on the database (including apostrophes:
…identified by '67890';):
Now import initial schema and data. Make sure to insert correct version for 3.2.*. You will be
prompted to enter your newly created password.
In order to check the version you have in your package, use the following command:
# rpm -q zabbix-server-mysql
Edit server host, name, user and password in zabbix_server.conf as follows, where DBPassword is the
password you've set creating initial database:
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
It's time to start Zabbix server process and make it start at system boot:
Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP
settings are already configured. But it's necessary to uncomment the “date.timezone” setting and set
the right timezone for you.
SELinux configuration
Having SELinux status enabled in enforcing mode, you need to execute the following command to
enable successful connection of Zabbix frontend to the server:
# setsebool -P httpd_can_connect_zabbix on
As frontend and SELinux configuration is done, you need to restart Apache web server:
Installing frontend
Now you are ready to proceed with frontend installation steps which will allow you to access your
newly installed Zabbix.
Zabbix official repository provides fping, iksemel, libssh2 packages for RHEL as well. These packages
are located in the non-supported directory.
Debian / Ubuntu
Installing packages
Here is an example for Zabbix server and web frontend installation with MySQL database:
Create Zabbix database and user on MySQL by the following commands, where <root_password>
shall be replaced with the actual root password (e.g., shell> mysql -uroot -p12345) and
<password> with new password for zabbix user on the database (including apostrophes:
…identified by '67890';):
Then import initial schema and data. You will be prompted to enter your newly created password.
Edit server host, name, user and password in zabbix_server.conf as follows, where DBPassword is the
password you've set creating initial database::
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
Now you may start Zabbix server process and make it start at system boot
Apache configuration file for Zabbix frontend is located in /etc/zabbix/apache.conf. Some PHP settings
are already configured. But it's necessary to uncomment the “date.timezone” setting and set the right
timezone for you.
If you have SELinux status enabled in enforcing mode see corresponding block for RHEL / CentOS
above.
Installing frontend
Now you are ready to proceed with frontend installation steps which will allow you to access your
newly installed Zabbix.
From:
https://www.zabbix.com/documentation/3.2/ - Zabbix Documentation 3.2
Permanent link:
https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages/server_installation_with_mysql