I recently installed ClearOS 5.1sp1 as a replacement to a gateway I had been managing. I put zabbix 1.8.1 on it. Here's how! And just a shout-out: this is my first time using 1.8, and it looks like there's been a lot of positive change since 1.6! Hooray for active development! 1) Install ClearOS, and do some basic config. Add users, create PDC. I'll have another page on this later. 2) SSH into the ClearOS box as root. Or logon locally (use ctrl+f2 to get a terminal). Clear uses LDAP for users, and they tend not to have shell access. As such, clear promotes using root by default for shell access. If you've been around *nix for a while, you'll know that this is never recommended. But because Clear does so many other things so well, I'm willing to overlook this lapse of security. You can enable shell access for clear users, though. See this post. 3) Download zabbix.
4) yum groupinstall "Development Tools" This will put a compiler and some libraries on your ClearOS, making it possible to compile source packages. 5) RTFM to find out how to install this beast. If you just run ./configure, you'll be missing components (such as the zabbix server)! I've done this for you, and you should be able to skip this step if you follow along. But if you have any trouble, this is the first place you should come back to.
7) Now we're ready to install Zabbix. The commands below will walk you through the process. They build upon each other, and they need the previous steps above to have been completed successfully. The commands below will install zabbix server and a local agentd. They'll also set the agent and server to start automatically on boot. I only guessed at numbering them S71 and S72, and assume you won't have a conflict. Please note that the commands below are meant to be followed, and not simply cut/paste. "mysql -p" will ask you for a password, and you'll need to enter it properly!
8) Make a couple corrections to /etc/init.d/zabbix_agentd_ctl and /etc/init.d/zabbix_server_ctl. Near the top of both files, they have a line that reads: BASEDIR=/opt/zabbix . This line needs to be: BASEDIR=/usr/local And in each, just a couple lines later you'll see $BASEDIR/bin/zabbix_ and it needs to be: $BASEDIR/sbin/zabbix_ 9) Now we'll configure the agent and server. Zabbix provided heavily commented files in /usr/src/zabbix-1.8.1/misc/conf which are a great reference.
10) I'm guessing this is a bug on zabbix's part, but rather than care I'll just try to work around it. Despite our config before compile, zabbix is still looking in /usr/lib for the jabber library. Let's just ln -s /usr/local/lib/libiksemel.so.3 /usr/lib/libiksemel.so.3 11)Zabbix will not run as root. We must add the user through the clearOS admin portal. If you simply useradd zabbix from the console, I've found that clear has the potential to come behind you and delete the user. Nice of them to keep the system clean and guarantee the integrity of the web config, but also something that can create unanticipated consequences.
12) Let's add in the webserver and php modules from ClearOS GUI if you don't already have them. Go to Clear Center -> Software Modules. Ensure you have "web server module" and "php module." Browse to Server -> Web Server and click "to auto" and "start." If your ClearOS is a gateway (not stand-alone), and you want to allow external access to zabbix, you'll need to add the "HTTP" service to your "incoming" firewall rules. Now you can copy in the front-end.
you could browse to your zabbix install now by going to http://[IP|domainName of your ClearOS]/ but it wouldn't be worth it because we still need to resolve some things that would fail during zabbix's init checks. Let's start by resolving a couple more dependencies:
Then let's edit /etc/php.ini
And then restart the web server from the ClearOS admin portal. Now you should be good to walk through the zabbix initialization. Pay attention during the process; all the hard stuff is done, but you still need to complete your configuration by answering the questions it asks! 13) Login and enable LDAP. To enable LDAP, you'll need to add a user to zabbix, which will define their access rights to zabbix. LDAP is only used for authentication purposes. You just need to match up a few settings between Zabbix and ClearOS; all the information you need can be found under the Directory -> Domain and LDAP section. 14) GoogleTalk alerts. Zabbix jabber integration does not look capable of communicating across google talk servers. I found a relevant perl example that enables sending of messages from a gmail account (CANNOT originate from google apps account), and allows sending to any google account (gmail or apps). The final limitation is that you must first login as the gmail user from which the jabbers will originate, and add people to whom you want to be able to send chats. This process will prompt the recipient with an option allowing you to chat with them. Here's the site: http://www.pervasive-network.org/SPIP/Google-Talk-with-perl-bis Have Fun! Zabbix is a fantastic utility. It does take quite a bit of effort to configure a system properly, but once configured, it provides a efficient system for monitoring many details of PCs/Servers/devices that would otherwise likely be overlooked! |
ClearOS >