CactiHowTo

Differences between revisions 30 and 31
Revision 30 as of 2006-05-16 23:26:13
Size: 6946
Editor: 137
Comment:
Revision 31 as of 2006-05-17 20:47:39
Size: 6968
Editor: 137
Comment:
Deletions are marked like this. Additions are marked like this.
Line 151: Line 151:
CategoryDocumentation CategoryCleanup CategoryDocumentation CategoryCleanup CategoryDocumentation

Installing Cacti on Ubuntu 6.06 LTS (Dapper Drake)

1. Enable the extra software repositories

  • Go to: System > Administration > Software Properties

  • Click on all the empty checkboxes to enable the additional software repositories

2. Install MySQL server

  • Go to: System > Administration > Synaptic Package Manager

  • Click on "Search" and type "mysql-server" in the pop-up window
  • Click on the checkbox next to "mysql-server" and choose to "Mark for installation"
  • Click "Mark" on the pop-up screen asking if you want to install the dependancies
  • Click "Apply" and then click "Apply" again on the pop-up screen to confirm this action.

3. Install Cacti

  • Go to: System > Administration > Synaptic Package Manager

  • Click on "Search" and type "cacti" in the pop-up window
  • Click on the checkbox next to "cacti" and choose to "Mark for installation"
  • Click "Mark" on the pop-up screen asking if you want to install the dependancies
  • Click "Apply" and then click "Apply" again on the pop-up screen to confirm this action.
  • Click "Forward" on the warning titled "Configuring libphp-adodb"
  • Leave the question "Password of your database's administrative user:" blank and hit "Forward".
  • Leave the question "MySQL application password for Cacti" blank and hit "Forward".
    • Note: The system will create a random password for you, so you don't need to enter one
  • On the "Webserver type" question, select "Apache2" and then click "Forward"

4. Setup Cacti

  • Visit the website of your Cacti server, should be similar to "http://localhost/cacti/"

  • This should automatically initiate the "Cacti Installation Guide" in your web-browser
  • Click "Next", "Next", and "Finish" to complete this guide
  • Login to Cacti with the default username and password of "admin" and "admin"
  • You will be forced to change the "admin" password to something new
  • Cacti is now successfully installed!

5. Recommended: Create a root password for the MySQL server.

  • Go to: Applications > Accessories > Terminal

    • Note: Choose a password and place it between the quotation marks below

sudo mysqladmin -u root password "YourPasswordGoesHere"

6. Caveats

  • You do not get a successful Cacti install if you use the command-line method (sudo apt-get install)
  • If you have already created a MySQL root password before installing Cacti, the Cacti install will fail.
  • If this procedure doesn't work for you, try the previous procedure which is documented below.

Previous Documentation on Installing Cacti

Installing Cacti for Ubuntu - Part 1

1. Open up a terminal window, easiest to log in as root

2. Install Apache2 (If not already installed):

apt-get install apache2

3. Install MySQL components (If not already installed): {{{apt-get install php5-mysql apt-get install mysql-server}}}

4. During the mail server installation, select the following options if you're not sure what else to use: {{{Internet Site localhost.localdomain (for the purposes of this install of cacti, i just left this as default)}}}

5. Install Cacti:

apt-get install cacti

6. During the cacti installation, select the following options if you're not sure what else to use:

MySQL server host name: localhost
Database name for cacti: cacti
Cacti database username: cacti
Cacti user password: cacti_password
Webserver type: Apache2

7. Install the MySQL database: (ignore the mysql instructions to change your password; proceed to step 8.)

mysql_install_db

8. Create a MySQL database called "cacti":

mysqladmin --user=root create cacti

9. Type mysql to enter into MySQL management.

10. At the mysql> prompt, type:

GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY "cacti_password";

NOTE: make "cacti_password" whatever you set the cacti password to during the installation of cacti.

11. Type:

exit

12. Back at the shell type:

zcat /usr/share/doc/cacti/cacti.sql.gz |mysql -u cacti -p cacti

13. You will be prompted for a password here, use the same password again you set during the installation of cacti.

Installing Cacti for Ubuntu - Part 2

1. Open a web browser on the machine with cacti installed

2. Type ["http://localhost/cacti"] into the address bar. Note, you can also use the IP address or DNS address of the PC instead of using "localhost".</li>

3. Click Next

4. Make sure New Install is selected and click Next

5. If all steps in Part 1 were followed correctly, all options on this page should show as <font color="green">[FOUND]</font>

6. Make sure NET-SNMP 5.x and RRDTool 1.2.x are selected and click Next

7. At this point, you should be prompted to login. You can use the username Admin and any password you previously set for this account, if any. The fault password should be admin. Upon logging in you'll most likely be forced to change your password for security purposes.

8. You should now be logged into cacti, if you need further assistance from here, it most likely won't be ubuntu specific so you should be able to refer to the generic guides on [http://www.cacti.net/] .

Installing Cacti for Ubuntu - Part 3: Errors FAQ (Work In Progress)

Q1. When I go to localhost/cacti, I keep getting the follow error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'cacti@localhost' (Using password: YES) in /usr/share/adodb/drivers/adodb-mysql.inc.php on line 338

A. If you get this error, you've set the wrong password for cacti in mysql. To fix it, follow steps 9 & 10 in Part 1 of this guide.

A2. You can also get this message if you run the GRANT ALL command without the quotes around the password or without the semi-colon at the end.

Q2. The default password won't work when I try to log in through the web interface, how can I log in?

A. Go back to command line and type mysql. At the mysql> prompt, type:

update user_auth set password = md5('admin') where username = 'admin';

Q3. I get a "red X" and my graphs will not display properly.

A. I have found that this is because the mysql module sometimes does not get properly registered with PHP. Run the command "php -m" and if you do not see mysql listed then this is your problem. Run the command "dpkg-reconfigure php5-mysql" to correct the problem and then run the command "php -m" again to see if it is now listed. Run the command "apache2ctl restart" to restart the Apache server.

CategoryDocumentation CategoryCleanup CategoryDocumentation

CactiHowTo (last edited 2008-08-06 16:19:00 by localhost)