Install Cacti For RedHat Linux 5.6

本文档详细介绍了如何从头开始安装并配置Cacti网络监控系统,包括创建MySQL数据库、导入默认设置、设置权限及定时任务等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Install and Configure Cacti

 

  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:

    vim cacti.sql
    replace TYPE=MyISAM with ENGINE=MyISAM
    :%s/TYPE=MyISAM/ENGINE=MyISAM/g     [全局替换]
    shell> mysql -u root -ppassword
    mysql>use cacti;
    mysql>source /cacti_real_path/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 database type, name, host, user and password for your Cacti configuration.

    $database_type = "mysql";
    $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. Point your web browser to:

    http://your-server/cacti/

    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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值