Installing Zabbix 2.0.x on CentOS The Easy Way!

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

Original Posting and Script

This is an updated script to install Zabbix 2.0.x on CentOS/Red Hat 6. I have tested it on CentOS 6.2. The script was made for Zabbix 2.0.1, but if you modify the ZBX_VER variable in the script, it should work on any version in the 2.0 series. I have also made updates to the script based in feedback from the old versions.

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 2.0.x on CentOS 6
  • 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

Zabbix v2.0.x install script

This entry was posted in General. Bookmark the permalink.

40 Responses to Installing Zabbix 2.0.x on CentOS The Easy Way!

  1. jose garcia says:

    thanks, man.

    had to test this software and i am allergic to source code. works fine in 6.3.

  2. Ethan Ducre says:

    I deleted the tidbits in the script about checking for SELinux since I couldn’t seem to disable SELinux. After doing so, the script worked like a charm for me. Thank you for this Brendon.

  3. Zafer says:

    Thanks man
    I was able to run it on centos 6.3 with minimal installation
    you saved my hours!!

  4. Jay W says:

    You friggin’ rock! This script saved me hours of screwing with the source build manually!

  5. fara says:

    please teach me step-by step to run these script. am i download the zabbix first and where path i should starting the script …

    im sorry .. i really zero about linux

    i have installed centos 6.2 now, …

    please help

    thx ..

    • Justin Foley says:

      Fara. Install MySQL – that’s all you have to do before running the script.

      yum install mysql-server mysql -y
      (wait for it to finish)

      sh ./
      (wait for it to finish)

      That’s why this script is amazing.

  6. Robson says:

    Thanks man.

    Perfect implementation with centos 6.2 .

    Barreto, Robson

  7. soumitra kar says:

    You have done a great job. For some time now I thought of doing the same that is to automate the installation process. And when finally I started doing it, thought of checking if someone has already done it or not. Found your blog and tried it. Worked nicely. If someone comes to me asking for installing Zabbix 2.0, will sure tell your name. And I am going to use it needless to say. Once again, great job.

  8. pablo says:

    does it run on centos 5.5? y need zabbix 2.0 installed on it


    • brendon says:

      Not sure about centos 5.5. You might want to use an old script if this doesn’t work. The old 1.8 zabbix install script was for 5.5 i think.

    • randy says:

      i used the script to install onto a vanilla centos 5.7 64bit & it worked perfectly

  9. donnerdiebel says:

    What a timesaver! Thanks for sharing this 😉

    Take care and all the best,

  10. Jason says:

    Thanks it worked great on CentOS 6.3 minimal. I’m glad people take the time to make scripts and share them to others.

  11. alex says:

    thanks for your effort , the best script 😀

  12. alios says:

    you sir are a gentleman !

    thank you very much

  13. Daniel says:

    Awesome script. Saved me heaps of time and stuffing around. Thanks!

  14. ppwicho says:

    This script its lengen….. wait for it…… DARY !!!!!!! Thanks , works awesome!!!!

  15. Faisal Naeem says:

    Thanks a lot for this …….

  16. Rick says:

    When trying to run the script on a minimal installed Centos 6.3 box I get the following error

    Type “go” to continue: go
    Lets do this…
    fail: Disable SELinux and then retry

    but as you can see it is already disabled

    [root@opzabbix01 /]# getenforce

    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    # enforcing – SELinux security policy is enforced.
    # permissive – SELinux prints warnings instead of enforcing.
    # disabled – No SELinux policy is loaded.
    # SELINUXTYPE= can take one of these two values:
    # targeted – Targeted processes are protected,
    # mls – Multi Level Security protection.

    is there anyway around this ?

  17. peterf says:

    Very much appreciated. Thank you for giving back to the open source community. Your work has saved countless hours of potential frustration – -for everyone that has used or will be using this script to install Zabbix. Thanks again.

  18. melpheos says:

    Installed in 5 minutes…
    Awesome script 🙂
    Had to edit the selinux part as well despite being disabled and not running tho

  19. fabrice says:

    Thanks, very good work ! on centos 6.2. your script is gold !

  20. Daniel says:

    Had to disable SELinux, but other than that it went rather smooth. Seems to have done the trick.

    Hint: Instructions to Disable SELinux

  21. TheAngryPeguin says:

    Just tried it on a fresh 6.3 installation, and while the script completed sucessfully after all requirements were met, I was met with an interface that was so generic and un-stylized, that it was impossible to proceed with configuration. It seems that numerous assets (e.g. CSS, images, etc.) for the web GUI are not accessible. Interestingly enough, some stuff is displayed, such as the Zabbix server icon/image, and its graph, although there’s no apparent data being polled.

  22. windigo says:

    Thanks a lot for the script. Worked fine on CentOS 6.4 i686, french-canadian minimal install virtual machine. Modified ZBX_VER for 2.0.5 version

    Your script saved me a lot of time & possibly grief…

  23. sqlkid says:

    Worked great! Thanks, Brendon!
    * CentOS 6.4 Minimal
    * MySQL 5.6.11
    * Zabbix 2.0.6

  24. Steve K says:

    Nice very well done. Thanks this made things a breeze.

  25. NF says:

    THNX A LOT Man

  26. amit says:


    Who are you ? Superman…? U r simply awesome..Great…!! i was striving hard to install and ur script did it in snap..

    U r simply amazin person…….

  27. she says:

    awesome.. however when i run the installation process (GUI) get the following error
    PHP option post_max_size 8M 16M Fail
    PHP option upload_max_filesize 2M 2M OK
    PHP option max_execution_time 30 300 Fail
    PHP option max_input_time 60 300 Fail
    PHP time zone unknown Fail

    I already corrected this in my php.ini and looks like its not updating.. hmmmmm.. thanks again though 😀

  28. she says:

    thanks i forgot to restart the httpd however on the front end i got this error now
    mysql_free_result() expects parameter 1 to be resource, boolean given [include/]

  29. Ben says:

    Thanks! I had thought I successfully installed this from source on my CentOS 6.4 machine but kept getting a 403 response. Rather than bashing my head against the keyboard trying to find my issue I just ran your script and it worked fine. Had to comment the lines checking for SELinux.

  30. vjbangis says:

    Cool!!!!! Installed in CentOS-6.4 minimal 🙂

    > downlod the script.
    > edit the version
    > chmod +x the script
    > install mysql-server
    > run the script


    Thank you for sharing 🙂

  31. Rick says:


    Thanks for all your work thus far.

    ANy chance you will be adjusting this script to work with zabbix 2.1.0 ?

    Thanks in advance

  32. Hi

    Thanks i just install zabbix 2.0.8 on centos 64 ver 6.4 with in 10 min on vmware vcloud

    1. install centos with minimum installation

    2. install mysql with “yum install mysql-server”

    3. change the password for mysql “mysqladmin -u root password ‘newpassword’

    note:new password is the one which is in the script DBPASS=’newpassword’

    3. on root directory created by nano

    4. copy the script and past it all the way to last line

    5. change the variable ZBX_VER=’2.0.8′ and save the file

    6. chmod 777

    7. run “./”

    8.with in around 10 min it is don !

    Thanks for the script i really greatfull to you

  33. Alex says:

    Thank U man!

  34. haroon says:

    ur script did a great job… ALLAH bless u..


Leave a Reply

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