[HOWTO] RHEL4/Cacti-start to finish install instructions
Moderators: Developers, Moderators
[HOWTO] RHEL4/Cacti-start to finish install instructions
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...
- Attachments
-
- Cacti Install.pdf
- (35.75 KiB) Downloaded 7785 times
-
- RedHat Enterprise 4 Install.pdf
- (12.49 KiB) Downloaded 4403 times
Last edited by bpowers7 on Wed Apr 26, 2006 10:01 am, edited 1 time in total.
- BP7
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Nice to see these, but I have to ask a favor...
Can you save these as a PDF or a Open Document?
Thanks,
Can you save these as a PDF or a Open Document?
Thanks,
[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]
[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]
Thanks A bunCh
To Bpowers7,
I salute you on achieving RHEL4 installation. but why do you need all package to be installed? hehehe. anyway many thanks bro!
I salute you on achieving RHEL4 installation. but why do you need all package to be installed? hehehe. anyway many thanks bro!
KeyBoarD Is MightieR ThaN ThE sWorD, iF onLy ConNecTed tO tHe InTernET..
Re: RedHat ES4/Cacti - start to finish install instructions
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...
KeyBoarD Is MightieR ThaN ThE sWorD, iF onLy ConNecTed tO tHe InTernET..
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.
If your unfamiliar with crontab setups, I suggest you google for 'crontab' and read-up on what that controls.
Hope this helps.
- BP7
Cronjob
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?
KeyBoarD Is MightieR ThaN ThE sWorD, iF onLy ConNecTed tO tHe InTernET..
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.
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.
- BP7
Yet another dead end...
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
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
KeyBoarD Is MightieR ThaN ThE sWorD, iF onLy ConNecTed tO tHe InTernET..
Installation
now i have got it running. Thanks man
KeyBoarD Is MightieR ThaN ThE sWorD, iF onLy ConNecTed tO tHe InTernET..
Same error
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
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
-
- Posts: 1
- Joined: Sun Jun 03, 2007 5:34 am
- Location: Pakistan
- Contact:
Cacti Installation error
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
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
-
- Cacti User
- Posts: 58
- Joined: Fri May 11, 2007 1:11 pm
- Location: NY
database error
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...
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...
Who is online
Users browsing this forum: No registered users and 1 guest