HowTo: Install Zenoss Core on Gentoo Linux
Synopsis
This How To will be a guide to installing Zenoss Core on Gentoo Linux. Zenoss is an enterprise-grade open-source IT Monitoring and Alerting suite. This guide should work on any Linux distribution, but it has only been tested on Gentoo Linux.
What You Will Need
- Server running Gentoo Linux
- MySQL 5.0.x
- Python 2.3.5 or 2.4
- Swig 1.3+
- Net-SNMP
System Setup
Create a new user account that the ZenOSS daemons can run under:
wind ~ # useradd -m zenoss
wind ~ # passwd zenoss
New UNIX password:
Retype new UNIX password:
passwd: password updated successfully
wind ~ #
Next we need to setup some environment variables for the zenoss user. Place the following lines into ~zenoss/.bashrc:
export ZENHOME=/usr/local/zenoss
export PYTHONPATH=$ZENHOME/lib/python
export PATH=$ZENHOME/bin:$PATH
Create the installation directory:
wind ~ # mkdir /usr/local/zenoss
wind ~ # chown zenoss /usr/local/zenoss
Install ZenOSS
Login to the system using your new ‘zenoss’ user account, alternativly, you can use ’su’:
wind ~ # su - zenoss
Make sure your environment variables are set correctly:
zenoss@wind ~ $ echo $ZENHOME
/usr/local/zenoss
Next we need to download ZenOSS, I prefer using wget for this:
zenoss@wind ~ $ wget http://voxel.dl.sourceforge.net/sourceforge/zenoss/zenoss-2.2.0-0.tar.gz
–2008-06-15 01:03:36– http://voxel.dl.sourceforge.net/sourceforge/zenoss/zenoss-2.2.0-0.tar.gz
Resolving voxel.dl.sourceforge.net… 208.122.32.195
Connecting to voxel.dl.sourceforge.net|208.122.32.195|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 51834372 (49M) [application/x-gzip]
Saving to: `zenoss-2.2.0-0.tar.gz’100%[========================================================================================================>] 51,834,372 1.11M/s in 45s
2008-06-15 01:04:21 (1.10 MB/s) - `zenoss-2.2.0-0.tar.gz’ saved [51834372/51834372]
Next we need to extract the tarball:
zenoss@wind ~ $ tar -zxf zenoss-2.2.0-0.tar.gz
Now we just need to start the ZenOSS install script:
zenoss@wind ~ $ cd zenoss-2.2.0
zenoss@wind ~/zenoss-2.2.0 $ ./install.sh
At this point, the install script will ask you a series of questions, the information you enter may vary from mine:
This installer actually builds Zenoss.
For a simpler installation try the VMPlayer Appliance image,
or use RPMs for Redhat based systems.Building…
Password for the Zenoss “admin” user [zenoss]:
Enter the password again:
MySQL server hostname [localhost]: localhost
MySQL server root username [root]: root
MySQL server root password []:
MySQL event database name [events]: events
MySQL username for Zenoss events database [zenoss]: zenoss
MySQL password for zenoss [zenoss]:
MySQL server port [3306]: 3306
After that its a little bit of a waiting game while you wait for the installation script to compile all of the dependencies that ZenOSS distributes with itself. This would be a good time to go grab a coffee!
The last thing we need to do is set the file ownership and setuid bit for the zensocket command - this is because zensocket requires root privileges to open raw sockets. To do this, switch back to the root user and do these commands:
wind ~ # chown root:zenoss /usr/local/zenoss/bin/zensocket
wind ~ # chmod 04750 /usr/local/zenoss/bin/zensocket
And thats it! You should now be able to access http://<ip>:8080 in your web browser of choice (Firefox appears to be the best supported by Zenoss).
Optional
To get Zenoss to start at boot:
wind ~ # cp /usr/local/zenoss/bin/zenoss /etc/init.d
You will then need to edit /etc/init.d/zenoss:
wind ~ # nano /etc/init.d/zenoss
Add the following line to the script after the comment block:
export ZENHOME=/usr/local/zenoss
And finally, add zenoss to your default runlevel (this will be different if you are non-Gentoo):
wind ~ # rc-update add zenoss default
* zenoss added to runlevel default
You should now be ready to begin adding devices into Zenoss and configuring alerting rules.
Happy Monitoring!


June 15th, 2008 at 3:11 am
It would be pretty cool to update the ebuild on http://bugs.gentoo.org/show_bug.cgi?id=157800.
June 15th, 2008 at 9:12 am
Donnie,
I totally agree about the ebuild… the thought has crossed my mind. I’ve never created any ebuilds myself, just done a couple of small version bumps of some. I’ll have to take a look at that Zenoss ebuild and see if I can update it.
June 16th, 2008 at 10:49 pm
At first glance, this doesn’t look very different from the source install directions posted at Zenoss:
http://www.zenoss.com/community/docs/install-guides/install-from-source/
If there are changes required to make everything work on Gentoo, please let me know and we can either incorporate them into our instructions or start up a new install guide for Gentoo. If you do happen to work on the ebuild, please let me know and I’ll try to help find Gentoo users to help test.
Thanks,
Matt Ray
Zenoss Community Manager
mray@zenoss.com
June 17th, 2008 at 7:20 am
Hi Matt (nice name!)
You are right, the guide is not much different at all from the Zenoss source install guide - infact thats basically what I followed when I created this. I just wanted to include any of the Gentoo-specifics. I actually could of sworn I had seen a Gentoo install guide on the zenoss.com site a couple months ago, but when I went back to look for it I couldn’t find it again.
At any rate, I am going to see what I can do about making an ebuild and I’ll certainly let you know when I do.
The real reason I made this guide though is that I do have some more Zenoss things I intend on posting… I’m also working on a ZenPack for monitoring Asterisk, and I wanted to be able to link back to this guide just to be able to be a little bit of a one-stop shop for people that happen to discover Zenoss by way of that future posting. Asterisk has a fairly large community, but information on its SNMP capabilities is somewhat scarce, so I’m hoping to help build a little bit of a bridge there and show how the 2 pieces of software can work together.
Thanks for stopping by!
–
Matt
June 17th, 2008 at 6:06 pm
I thought we had some Gentoo docs somewhere too, but I couldn’t find them either
Glad to hear you have some more Zenoss posts ahead of you, love to read them.
As far as Asterisk goes, I may have someone else working on a ZenPack for it, email me and I’ll get you more information about it.
Thanks,
Matt Ray
Zenoss Community Manager
mray@zenoss.com
June 18th, 2009 at 1:36 pm
Your site and posts are very interesting ! Thanks for providing such a great resource. With so many junk sites out there it’s refreshing to find one with valuable, useful information ! I’ll be back to read regularly !
Thanks,
Jeanine