0% found this document useful (0 votes)
264 views4 pages

Installing Zabbix

The document provides instructions for installing and configuring Zabbix 3.4 on an Ubuntu 18.04 server with a MySQL database. It describes downloading required packages, installing Zabbix server, frontend, and agent packages, creating the initial Zabbix database and granting privileges, importing the database schema, configuring the Zabbix server to connect to the database, starting the required processes, and accessing the web-based frontend. Basic SNMP monitoring of a network switch is also configured as an example.

Uploaded by

Innocent Okidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
264 views4 pages

Installing Zabbix

The document provides instructions for installing and configuring Zabbix 3.4 on an Ubuntu 18.04 server with a MySQL database. It describes downloading required packages, installing Zabbix server, frontend, and agent packages, creating the initial Zabbix database and granting privileges, importing the database schema, configuring the Zabbix server to connect to the database, starting the required processes, and accessing the web-based frontend. Basic SNMP monitoring of a network switch is also configured as an example.

Uploaded by

Innocent Okidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

https://www.zabbix.

com
=======================
Version: Zabbix 3.4
Distro: Ubuntu 18.04 (Bionic)
Database: MySQL

a. Install Repository with MySQL database

1) wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-
release/zabbix-release_3.4-1+bionic_all.deb
2) dpkg -i zabbix-release_3.4-1+bionic_all.deb
3) apt update

b. Install Zabbix server, frontend, agent


1) apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent

NB: if MySQL is already installed or not starting (/etc/mysql/FROZEN)then execute:


remove any old sgl installations:
sudo apt-get remove --purge mysql-server*

update and install:


sudo apt update

sudo apt install mysql-server


or <sudo apt-get install mysql-server>
or <sudo apt install mysql-server-5.7>

sudo mysql_secure_installation

check status:
sudo service mysql status

c. Create initial database (needs sudo priviledges)


1) mysql -u root -p
password (enter you Password as password)
2) mysql> create database zabbix character set utf8 collate utf8_bin;
3) mysql> grant all privileges on zabbix.* to zabbix@localhost identified by
'password';
4) mysql> quit;

import initial schema and data using command below:


You will be prompted to enter your newly created password (wait till prompt
returns)

5) zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p


zabbix

d. Configure the database for Zabbix server


Edit file /etc/zabbix/zabbix_server.conf

DBPassword=password

e. Configure PHP for Zabbix frontend


Edit file /etc/zabbix/apache.conf, uncomment and set the right timezone for you.

php_value date.timezone Europe/Riga


f. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot:
(requires priviledges)

1) systemctl restart zabbix-server zabbix-agent apache2


2) systemctl enable zabbix-server zabbix-agent apache2

Now your Zabbix server is up and running!

Configure Zabbix frontend


==========================
Connect to your newly installed Zabbix frontend:
http://server_ip_or_name/zabbix:

For local install, server_ip_or_name:127.0.0.1

Follow steps described in Zabbix documentation:


(https://www.zabbix.com/documentation/3.4/manual/installation/install#installing_fr
ontend)

Step 1
In your browser, open Zabbix URL: http://<server_ip_or_name>/zabbix
You should see the first screen of the frontend installation wizard.

Step 2
Make sure that all software prerequisites are met.
Optional pre-requisites may also be present in the list. A failed optional
prerequisite is displayed in orange and has a Warning status. With a failed
optional pre-requisite, the setup may continue.

Step 3
Enter details for connecting to the database. Zabbix database must already be
created. (the Password is the one that was configured earlier: "password")

Step 5
Review a summary of settings.

Step 6
Download the configuration file and place it under conf/ in the webserver HTML
documents subdirectory where you copied Zabbix PHP files to.

NB:
Providing the webserver user has write access to conf/ directory the configuration
file would be saved automatically and it would be possible to proceed to the next
step right away.

Step 7
Finish the installation.

Step 8
Zabbix frontend is ready! The default user name is Admin, password zabbix.

Basic config and test:


----------------------
On linux machine:

install snmpwalk utility.

1) sudo apt-get install snmp

snmpwalk -v2c -c < community-string > < managemnt ip address of switch >

On switch:
config)# snmp-server community < community-string >
config)# snmp-server location < eg. room_4 >
config)# snmp-server contact < eg. iokidi >

also remember to config ip add on management vlan interface.

On Zabbix web page:

click configutation tab --> Hosts --> Create Host


Host tab: enter Host name, ip address of SNMP host interface (i.e the switch)
Macros tab:
macro : {$SNMP_COMMUNITY}
value : <community-string> i.e as entered in switch.

Templates tab:
link new template: select Templates SNP Device, then hit Add button, then
update.

Now wait for about 1 hour until template properties are fully updated.

==============================================================================
NOTE:
==============================================================================
Before uninstalling mysql you may need to backup:

If possible, install automysqlbackup:


sudo apt-get install automysqlbackup

Then run automysqlbackup from the command-line, and make also a backup of /etc
directory :
sudo /usr/sbin/automysqlbackup
sudo rsync -av /etc/ $HOME/etc-backup/

Check that automysqlbackup created the backups successfully :


sudo ls -la /var/lib/automysqlbackup/daily/

uninstall
===================================================
1)

sudo systemctl stop zabbix-server

sudo apt remove --auto-remove zabbix-server-mysql zabbix-frontend-php zabbix-agent

sudo apt-get purge --auto-remove zabbix-server-mysql zabbix-frontend-php zabbix-


agent

You might also like