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
Leave a Reply

avatar
35 Comment threads
5 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
36 Comment authors
haroonAlexnadeem mujahidvjbangisJustin Foley Recent comment authors
  Subscribe  
Notify of
jose garcia
Guest
jose garcia

thanks, man.

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

Ethan Ducre
Guest

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.

Justin Foley
Guest

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

Zafer
Guest
Zafer

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

Jay W
Guest
Jay W

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

fara
Guest
fara

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
Guest

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

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

sh ./install_zabbix.sh
(wait for it to finish)

Done!
That’s why this script is amazing.

Robson
Guest
Robson

Thanks man.

Perfect implementation with centos 6.2 .

Regards.
Barreto, Robson

soumitra kar
Guest
soumitra kar

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.

pablo
Guest

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

cheers!

randy
Guest
randy

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

donnerdiebel
Guest
donnerdiebel

What a timesaver! Thanks for sharing this 😉

Take care and all the best,
Björn

Jason
Guest
Jason

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

alex
Guest
alex

thanks for your effort , the best script 😀

alios
Guest
alios

you sir are a gentleman !

thank you very much

Daniel
Guest

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

ppwicho
Guest
ppwicho

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

Faisal Naeem
Guest
Faisal Naeem

Awesome!!!!!
Thanks a lot for this …….

Rick
Guest
Rick

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 Permissive # 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. SELINUX=disabled # SELINUXTYPE= can take one of these two values:… Read more »

peterf
Guest
peterf

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.

melpheos
Guest
melpheos

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

fabrice
Guest
fabrice

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

Daniel
Guest

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

Hint: Instructions to Disable SELinux

TheAngryPeguin
Guest
TheAngryPeguin

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.

Renato Batista
Guest

Thanks a lot.

windigo
Guest
windigo

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…

sqlkid
Guest
sqlkid

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

Steve K
Guest
Steve K

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

NF
Guest
NF

THNX A LOT Man

amit
Guest
amit

HEy!!!!

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

she
Guest
she

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 😀

she
Guest
she

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/db.inc.php:573]

Ben
Guest
Ben

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.

vjbangis
Guest
vjbangis

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 🙂

Rick
Guest
Rick

Brendan,

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

nadeem mujahid
Guest

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 install.sh by nano install.sh 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 install.sh 7. run “./install.sh” 8.with in around 10 min it is don… Read more »

Alex
Guest
Alex

Thank U man!

haroon
Guest
haroon

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

takecare