Installing Zabbix The Easy Way

Update: This has been updated for 1.8.x. Follow this link.

I was following the Zabbix forums and people are constantly having problems installing Zabbix.

To make things easier, I wrote a magic install script for CentOS/Red Hat 5. I have tested it on CentOS 5.2.

Basically, the script tries to do a few things and assumes some things:

  • Only run this for NEW installations, you will lose data if you run on an existing installation
  • Run at your own risk
  • Installs Zabbix 1.6.1 on CentOS 5.2
  • Do not corrupt an existing system
  • Be able to run the script over and over in the event that it errors
  • Be somewhat flexible
  • The database server, web server, and zabbix server all run on one box

One final note, I did peruse a few other CentOS install guides, all of which will probably work, but all of them follow many bad practices. The magic script does a far better job and requires less effort, go figure.

Click here to download it


  1. Rob Dyke’s avatar

    Thanks for your script – I’m going to play with it on my centos machines.


  2. Rob Dyke’s avatar

    Everything running fine – thank you very much.

    pass: make install
    ERROR 1008 (HY000) at line 1: Can’t drop database ‘zabbix’; database doesn’t exist
    patching file zabbix_server.conf
    patching file zabbix_agentd.conf
    patching file zabbix_server
    patching file zabbix_agentd
    Stopping zabbix_server: [FAILED]
    Starting zabbix_server: [ OK ]
    Stopping zabbix_agentd: [FAILED]
    Starting zabbix_agentd: [ OK ]
    Stopping httpd: [FAILED]
    Starting httpd: [ OK ]
    patching file include/
    patching file include/page_header.php
    Load http://localhost/zabbix/
    username: admin
    password: zabbix


  3. michel’s avatar

    Will try it to see if it runs the correct set up :)


  4. Gene’s avatar

    Excellent script man. Saves so much time. Just had to make sure I went into /etc/sysconfig/network and add a couple of things and it worked a charm. Do you plan on making one for 1.6.2?


  5. brendon’s avatar

    Edit the variable at the top of the script to be 1.6.2 instead of 1.6.1:

    It should work!


  6. Gene’s avatar

    Your script worked to monitor agents installed within my network but when I tried getting it to monitor other agents on external networks it couldn’t for some reason :( Any idea why that is?


  7. nikot’s avatar

    Does it work with the 1.6.4 zabbix version ?

    Thanks !



  8. Mackhy’s avatar

    great work this really works mariculus, is there a way for one to edit it for UBUNTU ? i like simple things like this


  9. ghosti’s avatar

    your script do working into a plesk server with centos 5.2????


  10. brendon’s avatar

    In response to some questions…
    For ubuntu, you can follow these steps as an outline, I don’t have the EXACT steps documented, but it’ll be like these:

    I don’t know about Plesk.

    It should work with Zabbix 1.6.4 if you edit the ZBX_VER variable in the script.


  11. Mikrodots’s avatar

    Great script, thanks it still saves me a lot of time.

    I did need to run the following to resolve some dependencies on Centos 5.2:

    yum install gcc-c++ libstdc++-devel make mysql-devel curl-devel openssl-devel krb5-devel libgssapi-devel e2fsprogs-libs libidn-devel zlib-devel net-snmp-devel glibc-devel

    It fixed this error:
    checking for main in -lcurl… no
    configure: error: Not found libcurl library
    fail: Configure

    I’m going to try to use the script to install the latest Zabbix release.

    Thanks again,



  12. Mikrodots’s avatar

    I see all the dependencies in the command above are all in the script except:
    gcc-c++ libstdc++-devel make e2fsprogs-libs glibc-devel

    I’m guessing one of these three caused my error before.

    libstdc++-devel e2fsprogs-libs glibc-devel


  13. zabb’s avatar

    it work with Zabbix 1.6.5 but

    if [ ! “‘rpm -qa|grep fping ……. useless, because yum -y fping install the fping

    great script! thx.


  14. Valeriy[RUSSIA]’s avatar

    Attention! If You will use this script, on CentOS 5.3 MINIMAL(!), first excute this command:
    yum install patch make mysql-server
    And all will be installed sucessfully :)


  15. VegasIT’s avatar

    Worked great with the most recent version 1.6.6, on an install of CentOS 5.3… minimal installation using a remote MySQL server/db

    THANK YOU!!! Great time saver


  16. Roger’s avatar

    The script works nicely on the newest 1.6.6 version. Just edit the variable called ZBX_VER to read ZBX_VER=’1.6.6′ .

    Thanks for the script.


  17. uKrease’s avatar

    I appreciate the work you have done on this, is there any chance of a script for the new 1.8 version ?

    The package location for the wget command is outdated as well, so I had to just download the file manually and edit the wget part out.


  18. brendon’s avatar

    Yes. I’ll make a note in my todo list to do this for 1.8.


  19. Steve’s avatar

    Great Script! Saves me so much time, it runs the correct set up. Everything running fine – thank you very much.


  20. kamal’s avatar

    i am using centos 5.6.when i run this scrip i get below msg.

    # date() []: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Calcutta’ for ‘IST/5.0/no DST’ instead[/usr/local/share/zabbix/include/page_header.php:149]

    please help me ….



Your email address will not be published. Required fields are marked *