Professional Documents
Culture Documents
How To Install Zabbix 3.0 Beta On CentOS 6 - Zabbix Weblog
How To Install Zabbix 3.0 Beta On CentOS 6 - Zabbix Weblog
How To Install Zabbix 3.0 Beta On CentOS 6 - Zabbix Weblog
Zabbix Weblog
The Future of Monitoring
The long awaited Zabbix 3.0 beta 1 is here. Now we are eager to see what it brings us therefore there is no better
way to find that out than installing it and trying on our systems.
In this tutorial we will be installing it on a blank CentOS 6.7 operating system. Check out our previous post How
to Install CentOS 6 for Zabbix if you’d like to start with a short tutorial how to install CentOS itself.
But now let’s get started with the actual installation of Zabbix 3.0 beta 1. First we will prepare database, then web
server and once that is done we will install Zabbix server, agent and web interface.
Prepare database
Before we even start with Zabbix we need to install a database for it. And here we will use the latest version of
MySQL.
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 1/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
CentOS by default is supplied with a very old version of MySQL – 5.1. We can check that by running:
Expected output:
Although a basic installation of Zabbix can run on MySQL 5.1, it is highly recommended to use a more up-to-date
version, which is 5.6 currently. Therefore we have to remove the old version first.
Please be aware of what you are doing. Never do this on a production system where existing MySQL instances
might be running!
Then we need to install the MySQL repository configuration package. We pick the right version for our CentOS 6
system from here: http://dev.mysql.com/downloads/repo/yum/
Retrieving http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
Preparing... ########################################### [100%]
1:mysql-community-release########################################### [100%]
If everything is correct then one of the outputs should install mysql-community-server along with 10 other
dependencies. Double check that you are going to install MySQL version 5.6.x.
Installing:
mysql-community-server x86_64 5.6.26-2.el6 mysql56-community 53 M
Read all questions you might be asked during the install but most likely you need to answer “yes” by pressing “y”
key.
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 2/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
Before starting up the database we have to edit the MySQL configuration file but to open a file we need some text
editor. Here you can use whichever you want, but in the tutorial we will be using vim, so here is how to install it.
Open the MySQL configuration file with “vim” file editor. If you are new to vim then here is a quick tutorial on
that.
vim /etc/my.cnf
This file consists of multiple sections. At this point we will not do much tuning and only add one setting under the
[mysqld] section, which is important prior to creation of any database.
[mysqld]
innodb_file_per_table
Starting mysqld: [ OK ]
It is highly recommended to secure your database and specify a password for the “root” account, remove
anonymous logins etc. It is done by following all instructions after the MySQL secure installation.
mysql_secure_installation
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 3/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
Log in to your MySQL instance with the password set in the previous step.
mysql -u root -p
Create a new database for Zabbix. It is very important to also specify the character set and collation otherwise the
database will be case insensitive.
exit
Zabbix 3.0 requires PHP to be at least version 5.4 or higher. Our CentOS 6.7 repositories come with PHP 5.3.3
therefore we need to install a newer one.
To do this we need a repository that contains all our required packages. Webtatic could be a good choice therefore
we will install it.
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 4/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
yum install httpd php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap
vim /etc/php.ini
post_max_size=16M
max_execution_time=300
max_input_time=300
date.timezone=Europe/Riga
always_populate_raw_post_data=-1
Currently we will not be able to connect to our webserver because of internal firewall rules therefore we need to enable port
80 on iptables.
Now we can open our local web browser and enter the IP address of your Zabbix server. The Apache landing page
should appear.
If you have forgotten the IP address of your Zabbix server then have a look at the IP configuration.
ip a
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 5/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
Before installing Zabbix we need to ensure we have a user group and user account for it because Zabbix is not
meant to be run under the “root” account.
groupadd zabbix
useradd -g zabbix zabbix
mkdir /home/zabbix/downloads
cd /home/zabbix/downloads
Go to the Zabbix website http://www.zabbix.com/download.php and download the source archives for the latest
Zabbix 3.0.0beta1.
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 6/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
wget "http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Development/3.0.0beta1/zabbix-3.0
cd /home/zabbix/downloads/zabbix-3.0.0beta1/database/mysql
Import the database schema. Provide the password you set when creating the Zabbix user for database.
!! Don’t import the next two files in case you are preparing a database for Zabbix proxy.
Do the same for images and data as well. Note that it is important in what order you import the schema files
therefore always start with schema then images and then data.
When the database is prepared, we will have to compile Zabbix from sources. During this process some additional
packages are required therefore we will install them first. It is not a big problem if we don’t but then we will end
up with errors during the install.
cd ../..
./configure --help
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 7/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* <http://www.zabbix.com> *
make install
Before starting Zabbix server we need to modify its configuration file in order to connect to the database.
vim /usr/local/etc/zabbix_server.conf
Replace the values with the actual ones you used during the database setup.
DBName=zabbix
DBUser=zabbix
DBPassword=your_password
mkdir /var/www/html/zabbix
cd /home/zabbix/downloads/zabbix-3.0.0beta1/frontends/php/
cp -a . /var/www/html/zabbix/
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 8/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
By default CenoOS comes with the SELinux option enabled. While it can be sometimes in your way and difficult to
manage, it is recommended to leave it on.
Let’s create a rule to allow our web server to access the frontend files.
While we are still at SELinux, let’s allow also Apache and Zabbix to connect to network.
setsebool -P httpd_can_network_connect=1
setsebool -P zabbix_can_network=1
chmod +x /var/www/html/zabbix/conf/
cp /home/zabbix/downloads/zabbix-3.0.0beta1/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_s
cp /home/zabbix/downloads/zabbix-3.0.0beta1/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_a
Enable Zabbix server, Zabbix agent, Apache and MySQL services on boot.
chkconfig httpd on
chkconfig mysqld on
chkconfig zabbix_server on
chkconfig zabbix_agentd on
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 9/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
Use the same address you have for your server now and add /zabbix to the URL.
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 10/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 11/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
The “Name” field can be left blank or you can enter a name that will appear on each page.
Review the last settings in the next page and if all is good your Zabbix should be able to automatically create
configuration files.
Username: Admin
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 12/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
Password: zabbix
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 13/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
Congratulations! You have installed the new Zabbix 3.0. Have fun! Don’t forget to check our documentation for
3.0. And stay tuned for next tutorials and articles where we will cover the main features of Zabbix 3.0 and do lots
of useful configuration.
This entry was posted in How To, Technical. Bookmark the permalink.
fabiocremo says:
January 26, 2016 at 16:00
Ingus says:
January 26, 2016 at 23:58
There are no limitations regarding the components used for Zabbix. Percona MySQL could be a great alternative as
well as MariaDB. Same applies to PHP versions and web servers used.
The main idea here is to give people insight on how Zabbix can be installed in very short time without the need to
figure out which components should be used. Everyone can choose whichever they think fits better to the installation
and I believe in some future tutorials we might have a look how you can use those other components as well.
But to add more value here maybe you can tell a little why would you consider to use Percona MySQL over other
versions? Any pros and cons or known issues would be good to keep in mind.
Log in to Reply
leapswitch says:
January 27, 2016 at 14:17
Ingus says:
January 27, 2016 at 17:49
PHP 7.0 should work but have not tested it yet. You can try and give an update if that works fine for you.
Log in to Reply
jan.garaj says:
January 27, 2016 at 23:23
Ingus says:
January 27, 2016 at 23:30
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 14/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
leapswitch says:
January 29, 2016 at 21:21
We tried 3.0 beta on PHP v7 and we haven’t noticed any issues. The new interface loads really fast on
PHP 7. I have not installed it on an older PHP yet , so I can’t say whether the speed is due to PHP 7 or
the new interface code.
Log in to Reply
jan.garaj says:
January 28, 2016 at 00:30
For those who use Docker is here zabbix/zabbix-3.0:dev Docker image – basically it’s a nightly svn trunk build.
Log in to Reply
GuedriAhmed says:
March 18, 2016 at 11:50
Ingus says:
March 19, 2016 at 21:33
That was an issue in the Beta version. It is fixed in the stable release so please use the latest 3.0.1 instead.
http://www.zabbix.com/download.php
Log in to Reply
lachlan says:
April 11, 2016 at 06:33
Be great to see a post covering a comprehensive, example driven, deployment config. How to create templates, triggers,
events, items, etc. IE, what to do next, after installation.
Log in to Reply
Ingus says:
April 11, 2016 at 18:47
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 15/16
3/26/2018 How to Install Zabbix 3.0 Beta on CentOS 6 | Zabbix Weblog
rufus1228 says:
June 16, 2016 at 13:57
Thanks.For posting article its really help me and i have installed successfully.Can any one help me how to configure agent
monitoring through remote location.am searching different sites but am not getting proper solution.please share any link or
steps what i need to fallow .
Log in to Reply
Zabbix Weblog
http://blog.zabbix.com/how-to-install-zabbix-3-0-beta-on-centos-6/4656/ 16/16