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

  1. jose garcia’s avatar

    thanks, man.

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


    1. brendon’s avatar

      LOL …. allergic to source code. Heh

    2. Ethan Ducre’s avatar

      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.


      1. Justin Foley’s avatar

        You must vim /etc/sysconfig/selinux
        Change enforcing to disabled
        Restart machine.

      2. Zafer’s avatar

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


      3. Jay W’s avatar

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


      4. fara’s avatar

        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 ..


        1. Justin Foley’s avatar

          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.

        2. Robson’s avatar

          Thanks man.

          Perfect implementation with centos 6.2 .

          Barreto, Robson


        3. soumitra kar’s avatar

          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.


        4. pablo’s avatar

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



          1. brendon’s avatar

            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.

          2. randy’s avatar

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

          3. donnerdiebel’s avatar

            What a timesaver! Thanks for sharing this ๐Ÿ˜‰

            Take care and all the best,


          4. Jason’s avatar

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


          5. alex’s avatar

            thanks for your effort , the best script ๐Ÿ˜€


          6. alios’s avatar

            you sir are a gentleman !

            thank you very much


          7. Daniel’s avatar

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


          8. ppwicho’s avatar

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


          9. Faisal Naeem’s avatar

            Thanks a lot for this …….


          10. Rick’s avatar

            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 ?


          11. peterf’s avatar

            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.


          12. melpheos’s avatar

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


          13. fabrice’s avatar

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


          14. Daniel’s avatar

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

            Hint: Instructions to Disable SELinux


          15. TheAngryPeguin’s avatar

            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.


          16. windigo’s avatar

            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…


          17. sqlkid’s avatar

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


          18. Steve K’s avatar

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


          19. NF’s avatar

            THNX A LOT Man


          20. amit’s avatar


            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…….


          21. she’s avatar

            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 ๐Ÿ˜€


          22. she’s avatar

            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/]


          23. Ben’s avatar

            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.


          24. vjbangis’s avatar

            Cool!!!!! Installed in CentOS-6.4 minimal ๐Ÿ™‚

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

            Voilร !!!

            Thank you for sharing ๐Ÿ™‚


          25. Rick’s avatar


            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


          26. nadeem mujahid’s avatar


            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


          27. Alex’s avatar

            Thank U man!


          28. haroon’s avatar

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




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