Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[HOWTO] RHEL4/Cacti-start to finish install instructions
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
bpowers7



Joined: 04 Apr 2006
Posts: 7

PostPosted: Tue Apr 25, 2006 12:24 pm    Post subject: [HOWTO] RHEL4/Cacti-start to finish install instructions Reply with quote


After wrestling with - not only the Linux, but Cacti installs - I decided to make this my first post to give back to the community.
You will find attached, 2 separate documents detailing the steps necessary for the Redhat and Cacti installations.
As this was my personal install, you may or may not agree with the path/subdirectory decisions - however keep in mind this was posted more as a template to follow rather than a 'Best Practices' document.

Hope this clears up some frustration for current/future Cacti installers...

4/26/2006 - Removed .doc files and reposted as .pdf files as requested...



RedHat Enterprise 4 Install.pdf
 Description:

Download
 Filename:  RedHat Enterprise 4 Install.pdf
 Filesize:  12.49 KB
 Downloaded:  2604 Time(s)


Cacti Install.pdf
 Description:

Download
 Filename:  Cacti Install.pdf
 Filesize:  35.75 KB
 Downloaded:  4050 Time(s)



Last edited by bpowers7 on Wed Apr 26, 2006 10:01 am; edited 1 time in total
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5469
Location: Wisconsin, USA

PostPosted: Tue Apr 25, 2006 4:24 pm    Post subject: Reply with quote

Nice to see these, but I have to ask a favor...

Can you save these as a PDF or a Open Document?

Thanks,
Back to top
bpowers7



Joined: 04 Apr 2006
Posts: 7

PostPosted: Wed Apr 26, 2006 10:02 am    Post subject: Reposted files Reply with quote

Reposted as .PDF's as requested.
Back to top
krap_rz



Joined: 18 May 2006
Posts: 26
Location: Cyberjaya, Malaysia

PostPosted: Thu May 18, 2006 5:26 am    Post subject: Thanks A bunCh Reply with quote

To Bpowers7,

I salute you on achieving RHEL4 installation. but why do you need all package to be installed? hehehe. anyway many thanks bro!
Back to top
krap_rz



Joined: 18 May 2006
Posts: 26
Location: Cyberjaya, Malaysia

PostPosted: Thu May 18, 2006 11:48 am    Post subject: Re: RedHat ES4/Cacti - start to finish install instructions Reply with quote

bpowers7 wrote:

After wrestling with - not only the Linux, but Cacti installs - I decided to make this my first post to give back to the community.
You will find attached, 2 separate documents detailing the steps necessary for the Redhat and Cacti installations.
As this was my personal install, you may or may not agree with the path/subdirectory decisions - however keep in mind this was posted more as a template to follow rather than a 'Best Practices' document.

Hope this clears up some frustration for current/future Cacti installers...

4/26/2006 - Removed .doc files and reposted as .pdf files as requested...



Thanks for the note. Can you explain more at the 2nd page of your install cacti on RHEL. "You may need to edit the crontab for 'cactiuser' rather than for root for this to start working". I do not understand this line. can you help me on this.

i have followed your instruction and yet when i point my browser to http://myserveradds/cacti it showed the page cannot be displayed. Did i mest up somewhere. Apreciate on anybodys opinion...


Back to top
bpowers7



Joined: 04 Apr 2006
Posts: 7

PostPosted: Thu May 18, 2006 1:09 pm    Post subject: Reply with quote

What I meant by editing "cactiuser's crontab" is that in my example, cactiuser is the user account which has the permissions setup to 'run' cacti. Since the polling for the RRDTOOL is done through linux crontab schedules - I made the adjustment to "cactiuser's" crontab rather than root's. The original instructions from Cacti indicate that you should setup the crontab file for the 'root' user, but I have had issues getting this to run successfully so I simply made the crontab adjustment to the user account which is actualy going to run the command.

If your unfamiliar with crontab setups, I suggest you google for 'crontab' and read-up on what that controls.

Hope this helps.
Back to top
krap_rz



Joined: 18 May 2006
Posts: 26
Location: Cyberjaya, Malaysia

PostPosted: Fri May 19, 2006 5:51 am    Post subject: Cronjob Reply with quote

bpowers7 wrote:
What I meant by editing "cactiuser's crontab" is that in my example, cactiuser is the user account which has the permissions setup to 'run' cacti. Since the polling for the RRDTOOL is done through linux crontab schedules - I made the adjustment to "cactiuser's" crontab rather than root's. The original instructions from Cacti indicate that you should setup the crontab file for the 'root' user, but I have had issues getting this to run successfully so I simply made the crontab adjustment to the user account which is actualy going to run the command.

If your unfamiliar with crontab setups, I suggest you google for 'crontab' and read-up on what that controls.

Hope this helps.



Thanks for replying.

i am very new to RHEL and cacti, hope that you would understand.
Now here's my crontab settings:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=cactiuser
HOME=/home/cactiuser

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1


i have change MAILTO and HOME from root. ok or not ok? From my understading is that I should write this line as cactiuser not from root, is it?


Back to top
bpowers7



Joined: 04 Apr 2006
Posts: 7

PostPosted: Fri May 19, 2006 11:49 am    Post subject: Reply with quote

I'm not a pro on RHEL or Cacti either

They key to my statement about the crontab, is that you should edit cactiuser's crontab, NOT root's.

If you are at the shell prompt and type:
crontab -e (while logged in as root), you will see root's crontab.
I would delete the
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
line from here and resave root's crontab. Then type:
su - cactiuser
which will log you into the shell as 'cactiuser'. Then you should type:
crontab -e (which will open cactiuser's crontab for editing)
and add the following line there:
*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1
NOTICE THAT WE HAVE REMOVED 'CACTIUSER' FROM THE COMMAND SINCE CACTIUSER IS THE USER WHO'S CRONTAB WILL RUN THE 'PHP' COMMAND
After a successful save, you will now have the cactiuser's crontab setup to run the job on it's schedule and not rely on root's crontab to fire it off.

Hope this helps.
Back to top
krap_rz



Joined: 18 May 2006
Posts: 26
Location: Cyberjaya, Malaysia

PostPosted: Mon May 29, 2006 10:32 am    Post subject: Yet another dead end... Reply with quote

Thanks Bpowers7, now here another problem. i think i have done all the task you have told and here is another problem to be solved

Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:


mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.



I think i have read other thread regarding this problem but it all end up at the same page.Error... Question: should i be looking the permission of the database? How?....


Regards
Krap_rz
Back to top
krap_rz



Joined: 18 May 2006
Posts: 26
Location: Cyberjaya, Malaysia

PostPosted: Tue Jun 06, 2006 10:23 pm    Post subject: Installation Reply with quote

now i have got it running. Thanks man

Back to top
PernC



Joined: 28 Jun 2006
Posts: 7

PostPosted: Wed Jun 28, 2006 6:51 pm    Post subject: Same error Reply with quote

How did you fix your problem with:
Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:

mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.

I'm getting the same error. I have checked DB permissions and they appear to be correct for the cacti user
Back to top
PernC



Joined: 28 Jun 2006
Posts: 7

PostPosted: Mon Jul 03, 2006 10:06 am    Post subject: Reply with quote

Got it working, had the wrong DB name in my configuration
Back to top
ijeevan



Joined: 14 Sep 2006
Posts: 2

PostPosted: Thu Sep 14, 2006 6:08 am    Post subject: Reply with quote

I am having the same problem. Could you please be specific in what you changed in configuration? Pernc
Back to top
mjunaidzafar



Joined: 03 Jun 2007
Posts: 1
Location: Pakistan

PostPosted: Sun Jun 03, 2007 6:23 am    Post subject: Cacti Installation error Reply with quote

I am installaling Cacti on windows 2000 and facing following eror.

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:


mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.


Can anybody help me out to get rid of this issue because i am stuck here since last two weeks
Back to top
peppermint
Cacti User


Joined: 11 May 2007
Posts: 58
Location: NY

PostPosted: Fri Jun 22, 2007 10:57 am    Post subject: database error Reply with quote

I had the same problem when the FQN (fully qulify name) of the host has been changed, the short name has been remaining the same.

As it was a production server, I did following procedure to resue:
(Environment: Redhat4.0, cacti 0.8.6j, mysql4.1)

1. Backed up the database files underneath /var/lib/mysql/cacti

2. Run commands to recreate the database:

- mysqladmin -u root drop cacti
- mysqladmin -u root create cacti
- mysql cacti < /var/www/html/cacti/cacti.sql
- mysql -u root mysql
> GRANT ALL ON cacti.* TO cacti@"hostname" IDENTIFIED BY 'somepassword'; (hostname has to match the one defined in config.php file)
>flush privileges;
>exit;

3. Log onto http://<hostname>/cact, make sure the error is gone.

4. Stop mysql

5. Restore the database by simply copying the original cacti database files over.

6. Start mysql

7. Log onto http://<hostname>/cact again, make sure no errors occur.

I checked the user table of mysql, it cotains the correct hostname (short hostname) with the correct cacti user, permission looked ok to me. Not sure why changing the FQN could cause this problem...

Does not sound make sense, but I was able to get everything back (except missing few mins of the data by operating above procedures). And not sure if it'll work on a windows platform...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group