| View previous topic :: View next topic |
| Author |
Message |
Prompty Apprentice


Joined: 08 Feb 2004 Posts: 292
|
Posted: Sat Jan 08, 2005 11:47 am Post subject: [How-to]: Installing cacti on a gentoo box (fresh install) |
|
|
Formerly known as Unreliable guide to gentoo and cacti (install)
Ok, I'm writing this because I had a few problems before managing to finally get this running and had no luck finding a solution on the internet.
The use-flags I needed
| Code: |
gd dba mysql php svg apache2 zlib session
|
AND I think
I added session because there were problems with session support . ( now some of those flags you don't want to use on your system.)
OK now do a
(preferably on a screen or some remote console)
--------Note------
you might need to re-emerge your php and mod_php for cacti to work
-------End-Note----
add a group cacti and user cactiuser ( cactiuser is suppoused to be in
cacacti group ) something like
| Code: |
group-add cacti
useradd -g cacti cactiuser
|
Wait for the installation process to finish..
All that you need is in ( my case - fresh apache install )
| Code: |
cd /var/www/localhost/htdocs/cacti/
|
| Code: |
mysql --user=root cactidb < cacti.sql
chown -R cactiuser rra/ log/
|
in
/var/www/localhost/htdocs/cacti/include/
you might want to do this with your mysql
Run these commands as root
| Code: |
mysql
mysql> set password for root@localhost=password('rootpw');
mysql> create database cactidb;
mysql> grant all on cactidb.* to root;
mysql> grant all on cactidb.* to root@localhost;
mysql> grant all on cactidb.* to cactiuser;
mysql> grant all on cactidb.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password('mycactipw');
mysql> exit
|
| Code: |
cp config-sample.php config.php
vi config.php
|
the interesting part of config.php looks like this
| Code: |
$database_type = "mysql";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "mycactipw";
|
Now in /etc/conf.d/apache2 i added
| Code: |
APACHE2_OPTS="-D PHP5"
|
Now start your apache
/etc/init.d/apache2 start
it should bring up mysql
now as user cactiuser
add this to your crontab
| Code: |
*/5 * * * * /usr/bin/php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1
|
you might want to try running this from you cactiuser shell.
REMEBER (i had some problems with that too ;] ) each cacti reinstall ruins permissions to directories , do a
| Code: |
chown -R cactiuser.cacti rra/ log/
|
every once in a while
If you're wondering why you're getting a directory listing in your host_name_or_ip/cacti: remeber to to add index.php to your DirectoryIndex in
| Code: | | vi /etc/apache2/httpd.conf |
My case it looks like that
| Quote: | | DirectoryIndex index.html index.html.var index.php |
If you're having problems with graphs not showing still (reported on hardened gentoo):
-some people reported problems with php safe_mode ( I don't know what or where that is for the time being but ) you should turn it off _________________ <input stupid message here>
Last edited by Prompty on Wed Jan 25, 2006 12:39 pm; edited 8 times in total |
|
| Back to top |
|
 |
HRH_H_Crab Tux's lil' helper

Joined: 30 Jul 2003 Posts: 115 Location: Sarf East Lahndahn
|
Posted: Mon Feb 28, 2005 1:24 pm Post subject: |
|
|
nice guide, big up yourself!
followed this and now my cacti is working lovely. |
|
| Back to top |
|
 |
veal n00b

Joined: 08 May 2003 Posts: 47
|
Posted: Fri Mar 18, 2005 7:32 pm Post subject: |
|
|
[e] never mind, i should've read the official documentation where the default password is written
i followed the guide that's printed after a successfull emerge (but looks similar to this one) and everything went smooth except after working through the website-config it prompts for a user/login
"Please enter your Cacti user name and password below:"
but i never created a Cacti user and i tried several combos (of the mysql user etc.) but none of them worked.
any idea? |
|
| Back to top |
|
 |
Prompty Apprentice


Joined: 08 Feb 2004 Posts: 292
|
Posted: Sat Mar 19, 2005 2:46 pm Post subject: |
|
|
if i remeber correctly it's "admin/admin" _________________ <input stupid message here> |
|
| Back to top |
|
 |
JustJoe Tux's lil' helper

Joined: 30 Jul 2005 Posts: 80
|
Posted: Fri Aug 05, 2005 6:35 pm Post subject: |
|
|
Hi, i tried to install cacti, but it comes with this error:
| Code: | | dev-php/mod_php must be compiled with USE=mysql |
Prolly n00b-ish, but how to fix this ?
edit:
i put this in /etc/portage/package.use : | Code: | | dev-php/mod_php mysql |
but it doesn't seem to be right.
*Solved: I did not emerge dev-php/mod_php, only php.... |
|
| Back to top |
|
 |
ruben- Apprentice

Joined: 09 Nov 2004 Posts: 197
|
Posted: Sun Sep 11, 2005 5:25 pm Post subject: |
|
|
Add this to the gentoo-wiki.. It looks good, but not working for me tho
I don't get graphs, only unreadable images. |
|
| Back to top |
|
 |
Suicidal l33t


Joined: 30 Jul 2003 Posts: 913 Location: /dev/null
|
Posted: Mon Sep 12, 2005 2:41 am Post subject: |
|
|
| Thanks for the session use flag that fixed the problem I was having with php5; one question though shouldnt cli be added to the use flags if using php5? I tried it without it earlier today and there was no /usr/bin/php binary which would be needed to run the cron job. |
|
| Back to top |
|
 |
overcast n00b


Joined: 15 Dec 2003 Posts: 43
|
Posted: Wed Oct 19, 2005 7:48 pm Post subject: |
|
|
What is the reason for creating a separate user for something like this? Why not run as root? Just good security practice and a healthy dose of paranoia or are there specific issues someone can site with running this as root?
Just curious. |
|
| Back to top |
|
 |
raven.sorrow n00b

Joined: 10 Oct 2005 Posts: 20
|
Posted: Wed Nov 30, 2005 5:03 pm Post subject: |
|
|
| this guide is great .... but Cacti uses SNMP (Simple Network Managment Protocol) There are very poor HOWTO's on how to set snmp up on a Gentoo Box. Can anyone shead any light on this subject? |
|
| Back to top |
|
 |
wan-geek n00b


Joined: 03 Apr 2003 Posts: 66 Location: knee-deep in the ether
|
Posted: Tue Jan 10, 2006 5:14 am Post subject: snmp setup |
|
|
You are correct that Cacti uses snmp. It does -not- require snmp to be a running daemon on the local system however.
The function of snmp in Cacti is as a polling mechanism to remote systems. You don't need to setup anything for snmp on the Cacti system to be able to use Cacti.
When you emerge net-snmp, you will end up with a number of utilities that are a part of the package. These can be used to query (and set) snmp values on remote systems. If you have a system running an snmp daemon, you should be able to walk it's MIB tree via the command snmpwalk.
To brush up on snmp itself and it's use, I would check online. There are numbers of great resources that explain the protocol in detail...it's usage and pitfalls. To setup the snmp daemon to run on a system...I would refer to the man page for snmpd and snmpd.conf. (hint: there's a wizard that you can run to build the configs for you...but the man page tells you that already:wink: )
In short, if you are trying to setup a machine to run cacti on...and act as a snmp _poller_ to remote systems, you don't need to do anything more with snmp than emerge it.
Cheers,
-Chris |
|
| Back to top |
|
 |
wan-geek n00b


Joined: 03 Apr 2003 Posts: 66 Location: knee-deep in the ether
|
Posted: Tue Jan 10, 2006 5:19 am Post subject: user separation |
|
|
In regards to overcast's question, ...regarding running as root...
Best practice states that the root user should be used as little as possible and only when specifically necessary. Since Cacti has -0- need to run as root...it is most commonly setup to run as a separate user.
If you want to run it as root, nobody is stopping ya. Just remember that you chose to run it as root if/when anything goes awry and takes down the system.
Cheers,
-Chris |
|
| Back to top |
|
 |
|