Thomas Mathiesen’s Blog

Zabbix 2.0.0 on CentOS 6.2
May 30, 2012, 4:47 pm
Filed under: Linux

I was installing zabbix ( from source on a CentOS 6.2 system, and I came across a few things that I’d like to share..


# groupadd zabbix
# useradd -g zabbix zabbix

Create your database

# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-ssh2 --with-openipmi

Copied misc/init.d/redhat/8.0/zabbix_agentd and zabbix_server to /etc/init.d/
change progdir="/usr/local/zabbix/bin/" to progdir="/usr/local/sbin/" in both files.

Set correct permissions on these two files:
#chmod 755 /etc/init.d/zabbix* 

Added these to chkconfig and to start automatically
#chkconfig --add zabbix_server
#chkconfig --add zabbix_agentd
#chkconfig zabbix_server on
#chkconfig zabbix_agentd on

Set /etc/php.ini:
date.timezone = Europe/Amsterdam
post_max_size = 16M
max_execution_time = 300
max_input_time = 300

# semanage port -a -t http_port_t -p tcp 10051

# ln -s /bin/traceroute /usr/bin/traceroute

Edit /etc/sudoers and comment out
Defaults    requiretty

# Fix the "Detect operating system" error
sudo: sorry, you must have a tty to run sudo
Add the follwing line (bottom):
zabbix ALL = (root) NOPASSWD: /usr/bin/nmap


This post is quite technical, but I hope it helps if you’re encountering the same problems as I did.


2 Comments so far
Leave a comment

Thanks, I was getting the “Detect Operating System” error.

Comment by Nathan Lewis

Very useful – thanks!
Had the same issues with traceroute and nmap on Centos 5. Funny how there doesn’t seem to be a zabbix_server.conf option for the location of traceroute like there is for fping

Comment by Dan Makovec

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: