Installing
-
3. Installing Zabbix
To install Zabbix for Ubuntu
Server with MySQL DB:Copysudo apt install zabbix-server-mysql
For the PostgreSQL version:
Copysudo apt install zabbix-server-pgsql
Then install the Agent:
Copysudo apt install zabbix-agent
For the Frontend PHP:
Copysudo apt install zabbix-frontend-php
Choose between the Apache Web Server:
Copysudo apt install zabbix-apache-conf
Or NGINX:
Copysudo apt install zabbix-nginx-conf
-
4. Making DB
Creating Zabbix MySQL Database
Copymysql -uroot -p[root_password]
Login with your [root_password].
Then create the database:Copycreate database zabbix character set utf8 collate utf8_bin;
Grant the privileges to the ‘zabbix’ user:
Copygrant all privileges on zabbix.* to zabbix@localhost identified by '[zabix_password]';
Set a custom [zabix_password] for the zabbix user.
Finally, to quit:Copyquit;
For the PostgreSQL database, follow this guide
-
5. Editing Configuration
Edit Zabbix Server Configuration File
Copysudo nano /etc/zabbix/zabbix_server.conf
Set the password you chose earlier:
CopyDBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=[zabix_password]
Simply set the [zabix_password] in the above!
Ctrl+x to save & exit from nano ;) -
6. Importing Data
Import Zabbix Data into Database
For MySQL:Copyzcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
For PostgreSQL:
Copyzcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | sudo -u zabbix psql zabbix
-
7. Editing Frontend Config
Edit the Zabbix PHP Frontend Configuration File
Uncomment the “date.timezone” setting:Copysudo nano /etc/zabbix/apache.conf
Uncomment this line like:
Copyphp_value date.timezone Europe/Paris
Set the right time zone for you…
Contents