免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2447 | 回复: 8
打印 上一主题 下一主题

求助for windows的rrtool+cacti的设置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-09-22 09:30 |只看该作者 |倒序浏览
求助for windows的rrtool+cacti的设置步骤。

论坛徽章:
0
2 [报告]
发表于 2005-10-27 19:19 |只看该作者

求助for windows的rrtool+cacti的设置

(注,NET-SNMP部分没有详细介绍,查过一些网站也无结果,所以不算成功,请高手赐教)我一直都没在Windows下成功运行它, 查看端口却都是打开的(162/162)。

协自Cacti官方网站
Install PHP
1. Extract the PHP zip file to c:\ and rename the install directory (ie. 'php5.0.1') to 'php'.
2. If using PHP 4, move the files in c:\php\dlls to c:\php.
3. Add the following to your Windows PATH environement variable c:\php. The Windows path can be
accessed via the Control Panel at: 'System', 'Advanced', 'Environment'.
4. Add the following two environment variables to your system using the procedure above:
MIBDIRS=c:\php\mibs, and PHPRC=c:\php.
5. If using PHP 4.3.5 or less (not recommended), 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 the following lines.
extension_dir = c:\php\extensions
extension=php_snmp.dll
extension=php_sockets.dll
If using PHP 5 add the following lines.
extension_dir = c:\php\ext
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
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. If you have had previous versions of PHP installed, you had likely moved the PHP system files to in the
Windows directory structure. If so, you will have to remove those files. Please review your PHP
installation documentation for instructions on removing those files.
Configure the Webserver (Apache)
1. Make sure you have stopped any IIS web servers before you proceed with Apache installation.
2. Install the Apache web server. This is as simple as double clicking the .msi file and following the prompts.
Make sure to install it as a service and for the sake of the HOWTO, install it to c:\apache or c:\apache2.
3. 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 in the c:\apache\conf directory:
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
4. If you are using Apache 2.x, add the following lines to your httpd.conf file in the c:\apache2\conf
directory:
If using 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 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. Start the Microsoft Management Console, right click on Default Web Site (in most cases) and select
Properties.
2. Under the Home Directory tab, select Configuration and click Add. Browse to the path of php4isapi.dll
or php5isapi.dll, and type in .php as the extension.
3. Under the ISAPI Filters tab, click Add and browse to the php4isapi.dll or php5isapi.dll file. Name
the filter "php" and click OK.
4. Under the Documents tab, add index.php to the list.
5. Completely stop and start the IIS service using the following commands:
net stop iisadmin
net start w3svc
6. Give the IUSR_XXXX user read and execute permissions to the file c:\winnt\system32\cmd.exe.
Install RRDTool
1. Extract the RRDTool zip file to c:\rrdtool and copy c:\rrdtool\src\tool_release\rrdtool.exe to
c:\rrdtool.
Install MySQL
1. Extract the MySQL zip file to a temp directory and run setup.exe.
2. Install MySQL to the c:\mysql directory.
3. Start MySQL by running c:\mysql\bin\winmysqladmin.exe.
4. Set a password for the root user
shell>; cd mysql\bin
shell>; mysqladmin --user=root password somepassword
shell>; mysqladmin --user=root --password reload
5. Create the MySQL database:

[ 本帖最后由 windychan 于 2005-10-31 10:25 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2005-10-27 19:19 |只看该作者

求助for windows的rrtool+cacti的设置

shell>; mysqladmin --user=root --password create cacti
6. Import the default Cacti database:
shell>; mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
7. Optional: Create a MySQL username and password for Cacti.
shell>; mysql --user=root --password mysql
mysql>; GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql>; flush privileges;
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.
Install Cactid
1. Extract the Cactid zip file to c:\cactid and modify the cactid.conf file to include the following
statements.
DB_Host IP_Address or Hostname (not localhost)
DB_Database cacti
DB_User cactiuser
DB_Password cacti
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 full installation of Cygwin is
not longer required.
2. If you either have Cygwin installed, or plan on installing it, remove the 3 DLL files and the SH.EXE file
from the c:\cactid directory.
Install Cacti
1. Extract the Cacti distribution archive. These instructions will assume that the archive has been extracted to
C:\Apache\htdocs\cacti, although you can use a different path if you wish. Make sure you extract with
"Use folder names" enabled, so that the necessary sub-folders will be used.
2. 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";
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.
Note: The following instructions are based on Windows XP and Windows Server 2003. You should be
able to follow these instructions close enough for Windows 2000 as well.
a. Select Start -->; Settings -->; Control Panel and double click on Scheduled Tasks.
b. Double click on Add Scheduled Task.
c. 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.
d. Click Next again without changing the time or date settings.
e. When entering a username and password make sure the user has read and write access to the
following directories:
c:\apache2\htdocs\cacti\rra
c:\apache2\htdocs\cacti\log
Make sure the user has read, write, and execute access to the following directories:
c:\php
c:\php\sapi
f. Click Next and Finish to close the wizard.
g. Right click on the task you just created, and select Properties.
h. Select the Schedule tab.
i. Make sure Daily is selected and click the Advanced button.
j. Check the Repeat checkbox, set it for 5 minutes and set the duration for 24 hours.
k. Click Ok
l. In the Run textbox enter the following text making sure to use the appropriate paths.
c:\php\php.exe c:\mycacti\website\cacti\poller.php
The start in box should say c:\mycacti\website\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->aths and verify/update your paths to point to the correct
locations. Recommended examples are posted below.
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
SNMPGET, SNMPWALK Paths:
c:\net-snmp\bin\snmpget.exe
c:\net-snmp\bin\snmpget.exe
Cacti Logfile Path:
c:\mycacti\website\cacti\log\cacti.log
Cactid Path:
c:\cactid\cactid.exe

论坛徽章:
0
4 [报告]
发表于 2005-10-28 10:45 |只看该作者

求助for windows的rrtool+cacti的设置

为什么这样啊
C:\>;snmpget -v 1 -c public 192.168.148.70 .1.3.6.1.2.1.2.2.1.1
Cannot find module (IP-MIB): At line 1 in (none)
Cannot find module (IF-MIB): At line 1 in (none)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (UDP-MIB): At line 1 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 1 in (none)
Cannot find module (SNMPv2-MIB): At line 1 in (none)
Cannot find module (SNMPv2-SMI): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (UCD-SNMP-MIB): At line 1 in (none)
Cannot find module (UCD-DEMO-MIB): At line 1 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 1 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 1 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 1 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 1 in (none)
Cannot find module (SNMP-MPD-MIB): At line 1 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 1 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 1 in (none)
Cannot find module (SNMPv2-TM): At line 1 in (none)
为什么这样啊

论坛徽章:
0
5 [报告]
发表于 2005-10-28 11:52 |只看该作者

求助for windows的rrtool+cacti的设置

要做一个环境变量指向.mib文件

叫MIBDIRS=c:\usr\share\mibs

大概是这样吧。
可以用php -m测试一下。

论坛徽章:
0
6 [报告]
发表于 2005-10-29 12:54 |只看该作者

求助for windows的rrtool+cacti的设置

很少人在windows底下用这个吗?

论坛徽章:
0
7 [报告]
发表于 2005-10-31 10:22 |只看该作者
原帖由 78020281 于 2005-10-28 11:52 发表
要做一个环境变量指向.mib文件

叫MIBDIRS=c:usrsharemibs

大概是这样吧。
可以用php -m测试一下。


--我确认这个已经设正了的.

论坛徽章:
0
8 [报告]
发表于 2005-11-01 13:52 |只看该作者
我也是的,我也一直没有在windows下成功的运行过它,端口161/162也有打开.net-snmp这程式的snmpconf不知怎么修改它.总之我是没有把数据表示出来!

论坛徽章:
0
9 [报告]
发表于 2005-12-31 13:18 |只看该作者
你们要哪里的数据?本机,还是其它服务器或是网络设备?是不是被控端没有配好?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP