cacti & apache
Hello.
I am trying to get the cacti web interface working. In it's manual from the cacti website, they assume that http://localhost/cacti works, in my case, they assumed wrong. So, i verified that apache is working. I had to install php for cacti to be installed. So my question is: how do i create a new site and how can i tell which is the file that cacti uses with this web browser tool? I don't know how to set up a new site in apache. I went to the apache.org site, but they explain modules and starting scripts, but not the most simple elemental step as to configure a new site and get it to show in the browser. |
well assuming you're running apache as provided by fedora, it was been broken down to enable the use of dropin configuration files. you should have a directory, /etc/httpd/conf.d and in there the cacti install process would have palced a config file specifically for apache to use to provide the necessary configurations. is it there? have you restarted of hup's apache to read the file?
|
Well, here's the workaround i did. I copied the cacti directory to where apache reads by default, and that fixed that part. But a new issue arised. You know that you have to create a mysql user. So, i performed these steps:
shell> mysql --user=root mysql mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; mysql> flush privileges; Exactly as they are there so i wouldn't have any problems. But i get this error message: Code:
Error U r a life saver man. Thanks a lot. |
Hi James,
The 3rd point in Installation Guide for Unix/Linux says you have to execute Code:
mysql -u cactiuser -p cacti < cacti.sql |
Yep i did!!! I can tell cause all the tables in mysql are there. I didn't put them in manually.
So here's the thing: i deleted the database with 'drop database cacti', created the database again with 'create database cacti', and then performed that commmand right there again. Guess what? Same problem. I don't know what's wrong. Jejeje. Also, please check the commands i used to create the user. Probably the error could be there. But so far i think i did that part right. Since i can connect to the mysql prompt and i can perform everything on the database. Could it be that i need to create a system user too? It doesn't seem so cause in order to connect to the database you just need the user to exist on the database, not on the system. Correct me if i'm wrong. LOL. Thanks for the help dude. |
I just discovered the most interesting thing. After i type 'grant all on cacti.* to cacti@localhost identified by 'cactiusr';' command, i get a Query OK, 0 rows affected (0.00 sec). So, this kinda made me think if the user was created. So i researched about 'show grants;' and i only get the root grants, but the cactiuser grants are not there, there is only one record!!!!!!! This means that for some reason, the grant statement is not throwing an error, but it is not creating the user either.
What's going on??? Here's the result of the show grants command: Code:
-> ; |
sorry for the late reply.
I dont think there is any problem with the grants (but i dont know much abt mysql). See if the permissions for the cacti database are set right. If you execute the follow code you should get similar output Code:
# ls -l /var/db/mysql | grep cacti if its not then execute Code:
#chown -R mysql:mysql /var/db/mysql/cacti/ Hope this works :) |
Am i suppossed to get the cacti user privileges when i perform the show grants command? Similar to what i get with root?
I will try that when i get back to work, thanks a lot man. |
Flush Privileges
You need to execute a "flush privileges" command as the mysql root user after running any grant commands. Have you done that?
|
Quote:
|
Hi,
I saw that you had mentioned the "flush privileges" in your post. Oops. 1. Make sure you have installed the package php-mysql as well. 2. Make sure you didn't start mysql with --skip-grant-tables (for example if you forgot the root password earlier) 3. In your grant statement I don't see the single quotes around 'cactiuser'@'localhost'. If you forgot those please check your permissions by querying the mysql tables with something like this: mysql -u root -p > use mysql; > select user, host from user; > select user, db from from db; lslade |
Ok, i will try that when i get back to work. I am currently recovering from a motorcycle accident so i'll be away from work at least a week. Thanks for understanding. Believe me when i say that i will be doing those things ASA i get back.
LQ rules. Sorry for the inconvenience. |
Ok, i have tried those steps.
I got one question though: how do i start or ckeck if mysql has been started with the option you specified there? Here's the output of the commands from within mysql. mysql> select user, host from user; +-----------+-------------------+ | user | host | +-----------+-------------------+ | | localhost | | cacti | localhost | | cactiuser | localhost | | root | localhost | | cactiuser | penguin2 | | | penguin2.intranet | | root | penguin2.intranet | +-----------+-------------------+ 7 rows in set (0.00 sec) and mysql> select user, db from db; +-----------+---------+ | user | db | +-----------+---------+ | | test | | | test\_% | | cacti | cacti | | cactiuser | cacti | | cactiuser | cacti | +-----------+---------+ 5 rows in set (0.00 sec) This looks right, right? :scratch: |
Hey there. I just upgraded mysql to a 5.0 something version. I was following the instructions to give the root password after the installation, but mysqladmin is nowhere to be found. What's going on?
:scratch: |
I fixed the mysqladmin thing by installing the client package, but i ran into another problem.
I am trying to perform the following command: mysqladmin --user=root create cacti And i get the following error: error: 'Access denied for user 'root'@'localhost' (using password: NO)' I remember doing something to fix this, but i can't remember what. Mysql has just made it so hard for me to get this root user to do things. At first, after installing the rpm, it told me to type 'mysqladmin -u root -p password 'password'' to set the initial password for the mysql root user. But after doing this, the command didn't work. So, i am doing what mysql tells me to do, and then turns back at me laughing as if it just made a prank on me. Now i tried this to kinda figure out how messed up the password is: mysqladmin version -p This displayed the following lines: mysqladmin Ver 8.41 Distrib 5.0.37, for pc-linux-gnu on i686 Copyright (C) 2000-2006 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 5.0.37-standard Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 2 min 39 sec Threads: 1 Questions: 1 Slow queries: 0 Opens: 11 Flush tables: 1 Open tables: 6 Queries per second avg: 0.006 I typed the password i've been using, and it did work, so why is the other mysqladmin command telling that the access is denied and that i am not using a password? After this, i decided mysql is just not a nice program, so i uninstalled mysql server and client packages, and installed them back again. Now, after installing the server and then the client, i typed 'mysqladmin -u root -p password 'newpassword'' to set the password, and then tried to create the cacti database again, and guess what, same error message:'error: 'Access denied for user 'root'@'localhost' (using password: NO)''. I am very confused here. Please help!!!!!! :cry: |
All times are GMT -5. The time now is 10:34 AM. |