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

This entry was posted in UNIX and tagged . Bookmark the permalink.

22
Leave a Reply

avatar
22 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
15 Comment authors
kamalStevebrendonuKreaseRoger Recent comment authors
  Subscribe  
Notify of
Rob Dyke
Guest

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

Rob Dyke
Guest

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/setup.inc.php patching file include/page_header.php Load http://localhost/zabbix/ username: admin password: zabbix

michel
Guest
michel

Will try it to see if it runs the correct set up 🙂

Gene
Guest
Gene

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?

Gene
Guest
Gene

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?

nikot
Guest
nikot

Does it work with the 1.6.4 zabbix version ?

Thanks !

Nikot

Mackhy
Guest

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

ghosti
Guest

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

Mikrodots
Guest

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,

Mikrodots

Mikrodots
Guest

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

zabb
Guest
zabb

it work with Zabbix 1.6.5 but

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

great script! thx.

Valeriy[RUSSIA]
Guest

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 🙂

VegasIT
Guest
VegasIT

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

Roger
Guest
Roger

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

uKrease
Guest

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.

trackback

[…] Original Posting and Script […]

Steve
Guest

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

kamal
Guest
kamal

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

# date() [function.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 ….

trackback

[…] Original Posting and Script […]