Install Net-SNMP

Install Net-SNMP

1.

If you plan to use any hosts with SNMP v2c support, you must download and install the Net-SNMP libraries. Net-SNMP provides installers to install their product. However, caution must be taken not to use long file names as Cacti does not support them in this version. We suggest you install Net-SNMP in a directory such as c:net-snmp.

Configure Cactid

1.

Modify the cactid.conf file in c:cactid to include the following statements.

DB_Host IP_Address or Hostname (not localhost)
DB_Database cacti
DB_User cactiuser
DB_Password cactipw


All other pre 0.8.6 settings are obsolete. Cactid may not complain if you leave them in, but they are not longer required. Cactid now comes with a binary distribution. Therefore, a basic installation of Cygwin is not longer required, but suggested to help maintain dll version conflicts.
2.

If you have Cygwin installed, remove the DLL files and the SH.EXE file from the c:cactid directory.

Configure Cacti

1.

Edit <web root>/cacti/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 = "cactipw";


2. Log into the user account you'll be using for the scheduled task and verify starting a Cacti polling cycle works. Do this by running the following from the command prompt:

php c:<web root>cactipoller.php

After this has ran once, you should have cacti.log in /cacti/log/ (and possibly rrd files if you've already added some data queries in /cacti/rrd/).
3.

You are going to need to schedule a task so poller.php can run every 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to begin.
1.

Select Start --> Settings --> Control Panel and double click on Scheduled Tasks.
2.

Double click on Add Scheduled Task.
3.

Click Next and Browse on the following screen. Find c:php and select php.exe. If using PHP 5, use php-win.exe instead. Choose Daily on and click Next.
4.

Click Next again without changing the time or date settings.
5.

When entering a username and password make sure the user has modify access to the following directories:

c:<web root>cactirra
c:<web root>cactilog

Make sure the user has read, and execute access to the following directories:

c:php
c:phpsapi

6.

Click Next and Finish to close the wizard.
7.

Right click on the task you just created, and select Properties.
8.

Select the Schedule tab.
9.

Make sure Daily is selected and click the Advanced button.
10.

Check the Repeat checkbox, set the repetition for every 5 minutes, set the duration for 24 hours, and check the If the task is still running, stop it at this time checkbox.
11.

Click Ok
12.

In the Run textbox enter the following text making sure to use the appropriate paths.

c:phpphp.exe c:<web root>cactipoller.php

The start in box should say c:<web root>cacti.
4.

Point your web browser to:

http://your-server/cacti/

Log in the with a username of admin and password of admin. You will be required to change this password immediately.

Once logged in, you must go to Settings->Paths and verify/update your paths to point to the correct locations. Recommended examples are posted below. If you plan on using Cactid, then it is very important that your all your paths and scripts use forward slashes.

PHP Binary Path:

If using PHP 4, you should change this to:

c:/php/php.exe

If using PHP 5, you should change this to:

c:/php/php-win.exe

RRDTool Binary Path:

c:/rrdtool/rrdtool.exe

RRDTool Default Font Path:

%windir%/fonts/arial.ttf

RRDTool Version:

Select the appropriate version


SNMPGET, SNMPWALK Paths:

c:/net-snmp/bin/snmpget.exe
c:/net-snmp/bin/snmpwalk.exe

Cacti Logfile Path:

c:/mycacti/website/cacti/log/cacti.log

Cactid Path:

c:/cactid/cactid.exe

Apply Patches

1. There are two methods of applying patches to Cacti:
1. If you have Cygwin installed, then the patch instructions which use wget and patch, will work.
2. The other method requires you to visit http://www.cacti.net/downloads/patches/<cacti version>/pre-patched/ and manually download and replace the patched files.
2. You might need to reapply file/folder security on the files patched. Double check they are correct.

Tweaking

There are several things you can do to speed up your Cacti web server. It's suggested that you only apply these after you have a fully functional Cacti installation.

1. Switch the polling agent in Cacti from cmd.php to Cactid.exe. Go to Settings | Poller | Type.
2. Install the Zend Optimizer for PHP.
3. Set up the query cache in MySQL. Read about how to properly configure the settings. You will need to stop the MySQL service when you edit c:mysqlmy.ini and put in the following:

#The memory allocated to store results from old queries.
query_cache_size=3M
#Don't cache results that are bigger than this.
query_cache_limit=1M
#Query cache type to use.
query_cache_type=1

4. Install FastCGI, which can offer x4 to x8 improvement (for IIS users at least).
5. An extensive list of other optimizations for PHP and MySQL can be found over at phplens.com.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值