Chinaunix首页 | 论坛 | 博客
  • 博客访问: 356408
  • 博文数量: 163
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 356
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-01 14:18
文章分类

全部博文(163)

文章存档

2020年(4)

2019年(5)

2018年(4)

2017年(15)

2016年(11)

2015年(10)

2014年(4)

2013年(8)

2012年(13)

2011年(23)

2010年(2)

2009年(16)

2008年(20)

2007年(13)

2006年(12)

2005年(3)

分类:

2008-09-27 17:34:11

Cacti 0.8.6j Manual

The Cacti Manual

Ian Berry

Tony Roman

Larry Adams

J.P. Pasnak, CD

Jimmy Conner

Reinhard Scheck

© 2007 The Cacti Group

1. Installation

This section covers some general installation instructions. Detailed OS specific installation instructions are available for and

1. Requirements

Cacti requires that the following software is installed on your system.

  • RRDTool 1.0.49 or 1.2.x or greater

  • MySQL 3.23 or greater, 4.0.20d or greater highly recommended for advanced features

  • PHP 4.1 or greater, 4.3.6 or greater highly recommended for advanced features

Packages for RPM-based Operating Systems

  • httpd

  • php

  • php-mysql

  • php-snmp

  • mysql

  • mysql-server

  • net-snmp

Ports for FreeBSD

  • www/apache2

  • net/rrdtool

    Cacti requires that the following software is installed on your system.

    • RRDTool 1.0.49 or 1.2.x or greater

    • MySQL 3.23 or greater, 4.0.20d or greater highly recommended for advanced features

    • PHP 4.1 or greater, 4.3.6 or greater highly recommended for advanced features

    Packages for RPM-based Operating Systems

    • httpd

    • php

    • php-mysql

    • php-snmp

    • mysql

    • mysql-server

    • net-snmp

    Ports for FreeBSD

    • www/apache2

    • net/rrdtool

    • net/net-snmp

    • www/php4-cgi

    • lang/php4 (With MySQL and SNMP Support)

    • databases/mysql323-server

    • net/net-snmp

    • www/php4-cgi

    • lang/php4 (With MySQL and SNMP Support)

    • databases/mysql323-server

2. Installing Under Unix

  1. Extract the distribution tarball.

    shell> tar xzvf cacti-version.tar.gz
    
  2. Create the MySQL database:

    shell> mysqladmin --user=root create cacti
    
  3. Import the default cacti database:

    shell> mysql cacti < cacti.sql
    
    
  4. Optional: Create a MySQL username and password for Cacti.

    shell> mysql --user=root mysql
    mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
    
    mysql> flush privileges;
    
  5. Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

    $database_default = "cacti";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "cacti";
    
  6. Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.

    shell> chown -R cactiuser rra/ log/
    
    

    (Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)

  7. Add a line to your /etc/crontab file similar to:

    */5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
    

    Replace cactiuser with the valid user specified in the previous step.

    Replace /var/www/html/cacti/ with your full Cacti path.

  8. Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.

    shell> chown -R cactiuser rra/ log/
    
    

    (Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)

  9. Edit your PHP Config File at /etc/php.ini to allocate sufficient memory for Cacti:

    memory_limit=128m
  10. Point your web browser to:

    Log in the with a username/password of admin. You will be required to change this password immediately. Make sure to fill in all of the path variables carefully and correctly on the following screen.

3. Installing Under Windows

Software Compoents Required

  1. (Optional) Apache> - This software is optional if running Windows Internet Information Server.

  2. Cacti> - Install from the zip distribution and intstall in the web root or your choice. Many choose to install into a "Cacti" sub folder.

  3. Cactid - Install from the zip distribution into the c:\cacti directory. Make sure your cactid.conf.dist is located in that directory as well.

  4. RRDTool - Install from the Cacti website. Install it into the c:\cacti directory.

  5. PHP 4.3.6+ or 5.x - Install into the c:\php folder. If you choose to install into c:\Program Files\php, you will have to use 8.3 filenames to reference it's binaries in Cacti.

  6. MySQL 4.x or MySQL 5.x - Install into the default location. This is typically c:\Program Files\MySQL\MySQL Server X.XX.

  7. (Optional) Cygwin - Download and execute setup.exe from the Cygwin website. Keep the setup.exe file for later use.

  8. (Optional) Net-SNMP - Install to the c:\net-snmp directory. If you choose to use c:\Program Files\net-snmp you will have tu use 8.3 filenames to reference it's binaries in Cacti.

Configure PHP

  1. If using PHP 4, move the files in c:\php\dlls to c:\php

  2. Add the following directory to the existing Windows System PATH environment variable: c:\php. The Windows path can be accessed via the Control Panel at: System | Advanced | Environment Variables | System Variables.

  3. Add the following directory to a new Windows System environment variable called PHPRC: c:\php.

  4. Add a new Windows System environment variable called MIBDIRS. If using PHP 4, set it to c:\php\mibs. If using PHP 5, set it to c:\php\extras\mibs

  5. If using PHP 4.3.5 or less, create the following directory c:\tmp.

  6. Rename the file c:\php\php.ini.dist to php.ini, and make the following changes to it:

    If using PHP 4 add/uncomment the following lines.

    extension_dir = c:\php\extensions
    extension=php_snmp.dll
    extension=php_sockets.dll
    cgi.force_redirect = 0
    

    If using PHP 5 uncomment the following lines.

    extension_dir = c:\php\ext
    extension=php_mysql.dll
    extension=php_snmp.dll
    extension=php_sockets.dll
    cgi.force_redirect = 0
    

    You must configure PHP to have sufficient memory to return database rows. In order to accomplish that, you must set the memory_limit variable.

    memory_limit=128m

    If using PHP 4.3.5 or less include the following line. If using 4.3.6 or greater, you should remove this line if present.

    session.save_path=c:\tmp
    
  7. In earlier installation guides to PHP, they recommended moving certain DLL's to the c:\winnt\system32 directory. If so, you will have to remove those files. Please review the PHP installation documentation for instructions on removing those files.

  8. If you want to allow template importing, uncomment the following line:

    file_uploads = On
    
  9. Give the user who will be running the scheduled task, modify rights to the .index file in the location pointed to by the MIBDIRS Windows System environment variable.

Configure the Webserver (Apache)

  1. Make sure you have stopped any IIS web servers before you proceed with Apache installation, or make sure Apache is configured on an alternate port.

  2. If you are using Apache 1.3.x, installation of PHP 5 is not recommended. If using PHP 4, add the following lines to your httpd.conf file. You can edit that file by selecting Start | All Programs | Apache HTTP Server X.XX | Configure Server | Edit the httpd.conf file pick from the Taskbar.

    If using Apache 1.3.x and PHP 4, then add the following lines:

    LoadModule php4_module c:\php\sapi\php4apache.dll
    AddModule mod_php4.c
    AddType application/x-httpd-php .php
    DirectoryIndex index.html index.htm index.php
    

    If using Apache 2.x and PHP 4, then add the following lines:

    LoadModule php4_module c:\php\sapi\php4apache2.dll
    AddType application/x-httpd-php .php
    DirectoryIndex index.html index.htm index.php
    

    If using Apache 2.x and PHP 5, then add the following lines.

    LoadModule php5_module c:\php\php5apache2.dll
    AddType application/x-httpd-php .php
    DirectoryIndex index.html index.htm index.php
    

Configure the Webserver (IIS)

  1. Sta

阅读(1352) | 评论(0) | 转发(0) |
0

上一篇:CACTI备份

下一篇:CACTI howto

给主人留下些什么吧!~~