[HOWTO] Cacti Install Howto on a FreeBSD

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
shanali
Posts: 20
Joined: Thu Feb 20, 2003 11:45 am

[HOWTO] Cacti Install Howto on a FreeBSD

Post by shanali »

hi,

Thought it would be great to share with the rest of the you one of the most hasslefree way of installing cacti.

The system is FreeBSD/amd64 running on Xeons (~3Ghz) but applicable to any FreeBSD distro because of FreeBSD's excellent Ports architecture.

Dependencies requiring for Cacti's operation are not even an issue to talk about :) and thats where FreeBSD based install rocks while delivering the latest build of Cacti whenever you would update FreeBSD ports system.

take care and thanks to cacti.
Attachments
Installing Cacti on FreeBSD.zip
(72.27 KiB) Downloaded 13906 times
georgew
Posts: 21
Joined: Sun May 22, 2005 11:25 am

Post by georgew »

You forgot the php.ini file...

Freebsd doesn't have one by default, and so your poller script
will run out of memory, and fail to display graphs.

Whomever is maintaining the freebsd php port is causing a lot
of headaches by leaving this important file out.
shanali
Posts: 20
Joined: Thu Feb 20, 2003 11:45 am

Post by shanali »

hmm... interesting comment because i never touch php.ini (infact freebsd doesn't have one as you rightly mentioned)...

so far my poller script hasn't ran out of memory... (6mths of uptime)... but i believe if you happen to hit this problem then perhaps i'll keep an eye on it.

thanks!
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Poller will run out of memory on larger installations when you use over 8 megs of ram.

Also depends on the type of metrics the poller is pulling, snmp, scripts, php script server, etc.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
shanali
Posts: 20
Joined: Thu Feb 20, 2003 11:45 am

Re: Cacti Install Howto on a FreeBSD

Post by shanali »

shanali wrote:hi,

Thought it would be great to share with the rest of the you one of the most hasslefree way of installing cacti.

The system is FreeBSD/amd64 running on Xeons (~3Ghz) but applicable to any FreeBSD distro because of FreeBSD's excellent Ports architecture.

Dependencies requiring for Cacti's operation are not even an issue to talk about :) and thats where FreeBSD based install rocks while delivering the latest build of Cacti whenever you would update FreeBSD ports system.

take care and thanks to cacti.
A cacti user has gotten my attention on the subject. So here is the snippet on cacti+apache. You can put it either within httpd.conf or you can call it through one of the many include files from within httpd.conf.

Alias /cacti/ "/usr/local/share/cacti/"
<Location /cacti>
AddHandler php-script php
DirectoryIndex index.php
AllowOverride None
Order allow,deny
Allow from all
</Location>
TnTBass
Posts: 2
Joined: Fri Nov 03, 2006 12:32 pm

httpd.conf

Post by TnTBass »

Any chance I could get an example of someone's httpd.conf? I'm trying to install cacti on a FreeBSD 6.1 machine from scratch. I started with a mini install and built from there, but I'm finding the docs hard to follow as they seem to assume mysql and apache are already running, and you know what to do to configure it. I'm still fairly new to Apache and MySQL so I'm kind of struggling. Any help would be nice!
shanali
Posts: 20
Joined: Thu Feb 20, 2003 11:45 am

Re: httpd.conf

Post by shanali »

TnTBass wrote:Any chance I could get an example of someone's httpd.conf? I'm trying to install cacti on a FreeBSD 6.1 machine from scratch. I started with a mini install and built from there, but I'm finding the docs hard to follow as they seem to assume mysql and apache are already running, and you know what to do to configure it. I'm still fairly new to Apache and MySQL so I'm kind of struggling. Any help would be nice!
just add

Include etc/apache/Includes/*.conf

as a last line in the standard httpd.conf and cut paste all the above contents in cacti.conf

restart apache and thats it :)
finchwizard
Posts: 5
Joined: Mon Sep 29, 2003 8:23 pm
Contact:

Post by finchwizard »

I just installed Cacti on my FreeBSD 6.1 server, I've installed it a few times on Linux servers fine but have this problem with the memory.

cat: /proc/meminfo: No such file or directory
cat: /proc/meminfo: No such file or directory

When running the poller.php

I just grabbed the zip, so it wasn't compiled from Ports or anything.

Is there a way to get that going with BSD?

I also changed the graphing thing to ucd/net memory usage, but doesn't seem to help either.
mpb
Posts: 20
Joined: Mon Nov 06, 2006 5:46 am

Cacti Install Howto on a FreeBSD

Post by mpb »

I also run FreeBSD and use ports - however:

its best to read through the install/readme of cacti beforehand so you know what to expect.

php support in apache does not happen by default as seen in the previous post. neither is mysql server intsalled by default, and of course is a requirement.

so IMHO its best to have mysql, apache, php as known working on your box, and then installing cacti on top of these - and it will avoid some pain. Just installing cacti and hoping and expecting that all dependencies will fall into place and work automagically is perhaps abit too much to expect.
finchwizard
Posts: 5
Joined: Mon Sep 29, 2003 8:23 pm
Contact:

Post by finchwizard »

Yep, PHP, MySQL and Apache were all installed fine, along with php5-extensions and enabled in php.ini etc.

I tried SNMP again, and managed to find how to configure it up properly with the snmpconf utility.

All working now =)
TnTBass
Posts: 2
Joined: Fri Nov 03, 2006 12:32 pm

Post by TnTBass »

just add

Include etc/apache/Includes/*.conf

as a last line in the standard httpd.conf and cut paste all the above contents in cacti.conf

restart apache and thats it
That worked great, my apache now starts up, thanks!
its best to read through the install/readme of cacti beforehand so you know what to expect.
Good idea... installing from ports does not do everything for you... as I have found out... :cry:
php support in apache does not happen by default as seen in the previous post.
Good point... I have now gotten apache to run and load http://cacti01/cacti/ but sadly, it does not seem to parse PHP yet... only prompts me to download the php file. I do have this in my httpd.conf and I've restarted apache, but it doesn't seem to make a difference.

Code: Select all

<IfModule mod_php5.c>
        DirectoryIndex index.php index.html
</IfModule>
<IfModule mod_php5.c>
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps
</IfModule>
I'm doing some good googling to find the solution to that, but in the meantime, if anyone would be willing to advise on how that is done, I'm sure other people would find that useful also... :)
spaam
Posts: 4
Joined: Wed Jun 14, 2006 4:06 pm

Post by spaam »

finchwizard wrote:Yep, PHP, MySQL and Apache were all installed fine, along with php5-extensions and enabled in php.ini etc.

I tried SNMP again, and managed to find how to configure it up properly with the snmpconf utility.

All working now =)
Can you post your snmpd.conf file? i cant get cacti working on my freebsd computer
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

the snmpd.conf configuration is covered in the HowTo in my signature.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
hayzar23
Posts: 1
Joined: Tue Nov 13, 2007 10:00 pm

Post by hayzar23 »

shanali,

At what part of your install are you supposed to install apache or another http sever? This is a WEB application, maybe that would be worthy of being mentioned at some point in your instructions.
User avatar
zgamer
Cacti User
Posts: 86
Joined: Sat Sep 23, 2006 7:50 pm
Location: WI, USA

Post by zgamer »

Just as a general comment, FreeBSD 6 works great with Cacti. Currently running it in a VMWare appliance with the MacTrak, Weathermap, and Monitor plug-ins monitoring over 300 devices.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests