0% found this document useful (0 votes)
14 views

Installing Zabbix 2.2 From Source Code On CentOS 7

This document provides steps to install Zabbix 2.2 from source code on CentOS 7. It details installing required packages, creating a database and user, compiling and configuring Zabbix, and starting the services. The installation process is completed by browsing to the Zabbix frontend.

Uploaded by

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

Installing Zabbix 2.2 From Source Code On CentOS 7

This document provides steps to install Zabbix 2.2 from source code on CentOS 7. It details installing required packages, creating a database and user, compiling and configuring Zabbix, and starting the services. The installation process is completed by browsing to the Zabbix frontend.

Uploaded by

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

Installing Zabbix 2.2 from source code on CentOS 7.

Set the hostname


#/etc/hostename

Disable SELINUX
#vi /etc/selinux/config

Install below packages initially.


#yum group install "Development Tools"
#yum install httpd php
#yum install php-bcmath.x86_64 php-mbstring.x86_64 php-gd.x86_64
# yum install mysql mariadb-server
# yum install libxml2-devel net-snmp net-snmp-devel curl-devel

1. Download the source archive


http://www.zabbix.com/download.php

Once downloaded, extract the sources, by running,


#tar -zxvf zabbix-2.4.0.tar.gz

2. Create user account.


#groupadd zabbix
#useradd -g zabbix zabbix

3. Create Zabbix database.


For MySQL;

#systemctl start mariadb


# mysql_secure_installation
Enter current password for root (enter for none): (Press enter in your keyboard)
OK, successfully used password, moving on...

Set root password? [Y/n] y


New password:
Re-enter new password:
Password updated successfully!

Remove anonymous users? [Y/n] y


... Success!

Disallow root login remotely? [Y/n] y


... Success!

Remove test database and access to it? [Y/n] y


- Dropping test database...

Reload privilege tables now? [Y/n] y


... Success!

Thanks for using MariaDB!


4. ensure mariadb running.
# mysql -u root –p
MariaDB [(none)]> create database zabbix;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'secretpassword';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit

5. Create all schema.


# mysql -u root -p zabbix < database/mysql/schema.sql
# mysql -u root -p zabbix < database/mysql/images.sql
# mysql -u root -p zabbix < database/mysql/data.sql

6. Configuring the source.


#./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2
# make
# make install

7. Configure the webserver


# sed -i 's/^max_execution_time.*/max_execution_time=600/' /etc/php.ini
# sed -i 's/^max_input_time.*/max_input_time=600/' /etc/php.ini
# sed -i 's/^memory_limit.*/memory_limit=256M/' /etc/php.ini
# sed -i 's/^post_max_size.*/post_max_size=32M/' /etc/php.ini
# sed -i 's/^upload_max_filesize.*/upload_max_filesize=16M/' /etc/php.ini
# sed -i "s/^\;date.timezone.*/date.timezone=\'Asia/Calcutta'/" /etc/php.ini

Or
# vim /etc/php.ini and change the parameters.
max_execution_time 600
max_input_time=600
memory_limit=256M
post_max_size=32M
upload_max_filesize=16M
date.timezone=’Asia/Culcutta’

#vim /etc/httpd/conf.d/zabbix.conf
#
# Zabbix monitoring system php web frontend
#

Alias /zabbix /usr/share/zabbix

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>

<Directory "/usr/share/zabbix/conf">
Require all denied
</Directory>

<Directory "/usr/share/zabbix/include">
Require all denied
</Directory>

Security considerations
# iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

Start and initialize Zabbix


# systemctl start zabbix-agent
# systemctl start zabbix-server
# systemctl start httpd

Start all service on boot


# systemctl enable zabbix-agent
# systemctl enable zabbix-server
# systemctl senable httpd

After starting the services, browse to the following URL: http://<ip or hostname>/zabbix (for example:
http://192.168.202.101/zabbix). If all goes well, you should see something like this
Click next and check if everything is marked with OK:

In the next step, enter the details about the MariaDB user which we created (named zabbix and password
secretpass):
Continue to step and finish the installation:

After clicking finish, you should see the login screen to your new Zabbix installation:
The default username is admin and the default password for that user is zabbix.

Reference weblinks
http://jensd.be/?p=393
https://www.zabbix.com/documentation/2.2/manual/installation/install
https://www.zabbix.com/documentation/2.2/manual/appendix/install/db_scripts

https://www.zabbix.com/documentation/2.4/manual/installation/install

You might also like