Zabbix 3.0.9 on Centos 7.1 – Part 1

After you have setup a clean minimal Centos 7.3 server (x64), we begin install nano, wget, ntp time, net-tools: (some scripts use ruby and/or ruby snmp, therefore i’ll install these as a ‘prerequisite’ , also gem install snmp should be installed from the user you will launching your script, so sudo gem install snmp it, if you use root to launch scripts from your zabbix server)

and updating centos:

Next we add the zabbix repository to yum.

Next we can begin adding prerequisites of zabbix:

Then we can continue install zabbix:

start the database mariadb/mysql server and enable the mariadb service to start at system startup:

And we configure mysql/mariadb

You will get the following questions (set a root password for mysql/mariadb, you can use a different password other then user root):
Set root password? [Y/n] y
(Choose the root password when you want to make/edit databases, etc)
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Next, we create our Zabbix Server database! Enter the mysql/mariadb shell:

(enter the database root password)

Now we have an empty mysql/mariadb database without any tables/schema/data in it.
To install the tables we can make use of zabbix mysql scripts. After each command you will have to fill in your root sql password.

Next we have to edit the zabbix configuration file, with the details you entered above.

Find the following Parameters in the file  (you can use CTRL+W to find something in nano editor) and set the mysql root password.
The cachesize and startpingers is to avoid warnings from the zabbix server itself.

DBPassword=YourDBPassword
CacheSize=32M
StartPingers=5

Now you can configure the web page: (these prerequisites can be found on the zabbix website)
(Don’t forget to change the time zone of your country)

Next we edit the default Apache Config (/etc/httpd/conf.d/zabbix.conf)

We make sure all services are started en running when we next reboot the system: (some services can fail cause of selinux, view bottem of the pages)

And Last, if you are beginning to learn linux, i can imagine you have had various troubles learning things like config files, nano or vi, etc. Therefore, if you want something that works quick, fast and dirty:

disable = turn it off at next reboot.
stop = turn it off now.

Edit the following file and set the enforcement to disable so it won’t come backup the next time we reboot.

if you are concerned with selinux and firewalls (port 10050/10051 is for zabbix, port 80 for the web interface and port 162 is for snmp traps):

WARNING: There is some discussion concering selinux and zabbix in centos 7.3 (google and learn)

And as last, you can login in the web interface with:

Admin
zabbix

 

For people who want https:

… to be continued

Leave a Reply

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