|
|
| Author |
Message |
chris.y2k.r1
Joined: 07 Mar 2006 Posts: 30
|
Posted: Thu Apr 06, 2006 9:27 am Post subject: [HOWTO] Install Cacti on Fedora using yum |
|
|
I had the worst time figuring out how to install Cacti without using the custom compilations that are specified in Lee Carter's Linux Install instructions. While Lee's instructions are quite thorough and do work if followed to the letter,like many other's have found, if you use the custom install commands, nothing else you install using Fedora's "yum install" command is compatible with the cacti installation. This makes installing something like SSL, Sendmail or Postfix in conjunction with cacti a cumbersome task to say the least. As a result of these complications, I set out to find a simple way to install Cacti so that it conforms to the standard Fedora libraries and configuration file requirements. This facilitates simple and easy integration of other services (also using "yum install [software]) with Cacti as well as simplifying the notoriously convoluted custom installation of Cacti itself. The benefits of this process are two fold. As previously stated, it simplifies the installation of cacti as well as conforming to standards that enable all types of software to easily integrate and communicate with cacti utilizing the beloved "yum install ..." method.
Next you will find these installation ins ructions. Please feel free to provide any feedback in the case I may have omitted a step, etc. I am human and I am writing this documentation post a successful install as opposed to during. So, please feel free to spout out any constructive criticism you may have as well as any additional pointers that may help smooth out the process.
Enjoy!!
Chris
P.S. - MODS Perhaps this should be stickied? I take no offense if you disagree...?
The following instructions assume you are running a Fedora installation where the install "everything" option was selected. This will install everything needed to run Cacti except Cacti itself and net-snmp. If you have NOT installed "everything" then make sure to use yum to install PHP, MYSQL, HTTP (If you want HTTPS access then do this: "yum install httpd mod_ssl openssl" as root now), SNMP and RRD TOOL. If you did install "everything" during the Fedora installation then all of these (including SSL) will already be installed.
1.) As root:
yum install net-snmp
yum install cacti
2.) Modify Cacti.conf to allow some users to log in. It's installed and defaulted to 'deny all' (gedit /etc/httpd/conf.d/cacti.conf)
3.) Change php.config to reflect the true location of the binary, 'php'. Standard FC4 location is /usr/bin/php. Add the MYSQL database name, localhost, user name, password values to this file as well. (See www.cacti.net/downloads/docs/contrib/Cacti-Linux-How-To.pdf for detailed cacti/MYSQL configuration procedures)
4.) Create the MYSQL cacti database in accordance with the cacti installation instructions at www.cacti.net/downloads/docs/contrib/Cacti-Linux-How-To.pdf make sure to create a user for the cacti database (I used database name: cactidb, server name: localhost, user name: cacti, password cactipw) and grant access (R/W/E) to this user as well as to root.
5.) yum install net-snmp
6.) Make sure the user created for MYSQL (in my case 'cacti') has permissions to write to /usr/share/cacti/rra and /usr/share/cacti/log
7.) Using an Internet browser open: localhost/cacti and follow the instructions. If you followed these instructions exactly, the program paths displayed by the initial page will be correct.
*Be aware that there are two (2) cacti directories on a Fedora Core 4 installation using the yum install method. One exists in /var/www/html/cacti and the other in /usr/share/cacti. /usr/share/cacti is the directory in which configuration changes should be made. The previously mentioned directory houses the php and html pages that make up the cacti user/administrative interface.
This method makes adding Thold notifications very simple. Just see the thread on installing THold in this forum and use "yum install postfix" to get email notifications for downed or overloaded devices. Much simpler to integrate other services with this type of (yum) install.
Feel free to question/comment: chris_y2k_r1@yahoo.com |
|
| Back to top |
|
 |
rony Developer/Forum Admin
Joined: 17 Nov 2003 Posts: 5469 Location: Wisconsin, USA
|
Posted: Thu Apr 06, 2006 9:57 am Post subject: |
|
|
| Moved to Information/HowTo's |
|
| Back to top |
|
 |
chris.y2k.r1
Joined: 07 Mar 2006 Posts: 30
|
Posted: Thu Apr 06, 2006 10:00 am Post subject: |
|
|
| rony wrote: | | Moved to Information/HowTo's |
Damn you guys are on top of it! Moved it to the right place in less then 10 minutes - strong work bro, strong work!

Last edited by chris.y2k.r1 on Thu Apr 06, 2006 10:05 am; edited 1 time in total |
|
| Back to top |
|
 |
chris.y2k.r1
Joined: 07 Mar 2006 Posts: 30
|
Posted: Thu Apr 06, 2006 10:02 am Post subject: |
|
|
Everyone - If you use this documentation and find something omitted / misspelled command(s) / something incorrect, please let us know!!
P.S. - If it works well for you, let us know that too
Thanks!!
Chris |
|
| Back to top |
|
 |
praddie
Joined: 20 May 2006 Posts: 1
|
Posted: Sat May 20, 2006 4:11 am Post subject: |
|
|
| Thanks Chris got Cacti working by following the instructions given by u. thanks again. |
|
| Back to top |
|
 |
chris.y2k.r1
Joined: 07 Mar 2006 Posts: 30
|
Posted: Wed Jun 07, 2006 10:27 am Post subject: |
|
|
| praddie wrote: | | Thanks Chris got Cacti working by following the instructions given by u. thanks again. |
Excellent - My pleasure! |
|
| Back to top |
|
 |
new-to-linux
Joined: 29 Jun 2006 Posts: 9
|
Posted: Thu Jun 29, 2006 2:13 pm Post subject: Please Help |
|
|
Thanks Chris for the giude. I have followed most of it but am now a bit lost. I am new to linux so please forgive me if I sound liike I am dumb.
I have yum rrd tool and cacti and and at the stage where you mention I need to modify the php.config file I can not find this file so I presume this is the config.php file ??
Also you mention I need to create the cacti database but when I reference the pdf it talks about the cacti.sql file should I down load the source to get this file to create my database??.
My installation does not seem to have the two directories you mentioned I have usr/share/cacti but do not have the var/www/html/cacti one
Thanks for any help you can give |
|
| Back to top |
|
 |
markz
Joined: 29 Jun 2006 Posts: 2
|
Posted: Thu Jun 29, 2006 10:36 pm Post subject: |
|
|
I must admit I was completely lost on the install too, Fedora core 5. I did not have rrdtool installed and when I downloaded it and tried make it said there were problems with freetype, libpng and libart_lgpl even though I had these installed.
So I used | Code: | | yum install rrdtool | and that worked fine.
Then I tried to follow the instructions at
I started with http://www.cacti.net/downloads/docs/html/install_unix.html
(and the instructions that come with the download)
All fine until the Step 7
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
how was /var/www/html/cacti created? How did the http server know about it?
Answer it didn't. I had unzipped my download to /opt and tried copying a few things around and setting up directories and chaning the http conf. No joy.
So then used -- no problems.
But now could not connect to database.
After rummaging around found include/db.php
OK so now I can connect to database and get a web page.
But what do I log on as? admin/admin of course -- I suppose that is also written down somewhere but I hadn't seen it.
Looks a great product but it would be good if people could find a reliable install guide without too much hassle, as once again I wasted a lot of time as I thought the link from the home page for a Linux install was the way to go.
So I suppose the easiest way to install is to use yum, but then you must also download from the cacti tar from the site to get the sql file to populate the tables in the database?
Regards
Mark |
|
| Back to top |
|
 |
markz
Joined: 29 Jun 2006 Posts: 2
|
Posted: Fri Jun 30, 2006 12:34 am Post subject: |
|
|
Well if you do yum installs the cacti.sql will of course be available from the rpm install, so no need for the download of the tar.
The only problem being, that you may not have installed mysql by an rpm. It seems to want to look for /var/lib/mysql/mysql.sock. Is the location of mysql.sock configurable? Otherwise a symbolic link. |
|
| Back to top |
|
 |
new-to-linux
Joined: 29 Jun 2006 Posts: 9
|
Posted: Mon Jul 03, 2006 4:51 pm Post subject: Thanks Mark |
|
|
In the end I uninstalled the cacti version I installed via yum.
Downloaded the rpm version from the cacti site and yum that, finished off the install following the documentation that came with the cacti rpm. Now all is good an I am up and running.
The version I received via yum was a alpha version so not sure if that was the problem, The version I got off the cacti site was for a I386 machine and this work for me.
I was doing this on a fedora core 4 install with most options installed and before installing cacti i yum rrdtool and net-snmp. |
|
| Back to top |
|
 |
natter
Joined: 26 Jul 2007 Posts: 3
|
Posted: Thu Jul 26, 2007 3:05 pm Post subject: |
|
|
I come from the apt-get world. How do I get rrdtool and cacti into the yum repository? Thanks, Eric
[root@monitor yum.repos.d]# yum install rrdtool
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@monitor yum.repos.d]# yum install cacti
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Sun Jul 29, 2007 7:35 am Post subject: |
|
|
I'm runnding FC6 and got it using | Code: | [extras]
name=Fedora Extras - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/$basearch/
gpgcheck=0
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras |
Reinhard |
|
| Back to top |
|
 |
natter
Joined: 26 Jul 2007 Posts: 3
|
Posted: Sun Jul 29, 2007 11:43 pm Post subject: |
|
|
Sweet, got it.
Added this to my /etc/yum.repos.d/CentOS-Base.repo file:
[extras2]
name=Fedora Extras - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/$basearch/
gpgcheck=0
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras
Then ran a 'yum update'
Then 'yum install cacti'
All done. Thanks for the help Gandalf! |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Mon Jul 30, 2007 1:52 pm Post subject: |
|
|
| natter wrote: | ...
Then 'yum install cacti'
... | Oops. While I'm using yum for almost everything, I do NOT use it for installing cacti.
First, because patches are published too late.
Second, because I HATE accidentally upgrading my cacti (mainly due to installation postprocessing issues that yum will not cope with).
Third, yum install will bring you some /etc/cron.d/cacti crontab; if you add cacti to /etc/crontab, you will run into trouble, then.
Surely, your mileage may vary
Reinhard |
|
| Back to top |
|
 |
natter
Joined: 26 Jul 2007 Posts: 3
|
Posted: Tue Jul 31, 2007 11:28 pm Post subject: |
|
|
So, after I did my install, should I not have un-commented the /etc/cron.d/cacti job?
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1 |
|
| Back to top |
|
 |
|