免费注册 查看新帖 |

Chinaunix

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

Cacti安装手记 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-10 10:17 |只看该作者 |倒序浏览
参考了Joecen大虾的大作http://bbs.chinaunix.net/viewthr ... &extra=page%3D2,看到还有那么多弟兄在迷糊,索性把自己的过程写出来,希望能对大家有所帮助,呵呵,我是在centos4.2上做的,4.0一样。

1.
Mysql source code installation

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root  .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

cp ./support-files/mysql.server /etc/init.d/mysql (In mysql scurce code directory)
chmod +x /etc/init.d/mysql
cd /etc/rc3.d and rc5.d
ln -s ../init.d/mysql S86mysql
ln -s ../init.d/mysql K86mysql (Note: the number in filename doesn't conflict with other scripts)

2.
Apache installation

./configure --prefix=/www --enable-so
make && make install

cp /www/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d and rc5.d
ln -s ../init.d/httpd S87httpd
ln -s ../init.d/httpd K87httpd

or
chkconfig --add httpd
chkconfig --level 35 httpd on

3.
PHP Installation

./configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config-file-path=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd
make && make install
cp php.ini-dist /www/php/php.ini
vi /www/conf/httpd.conf
加入:
###############for php and cacti###################
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html index.html.var
#######################over########################

/etc/init.d/httpd restart

4.

Mysql setting

/usr/local/mysql/bin/mysql -u root -p
mysql> set password for root@localhost=password('cactipw');
mysql> Query OK, 0 rows affected (0.00 sec)
mysql> create database cacti;
mysql> grant all on cacti.* to root;
mysql> grant all on cacti.* to root@localhost;
mysql> grant all on cacti.* to cactiuser;
mysql> grant all on cacti.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password('cactipw');
mysql> flush privileges; (See cacti docs/INSTALL)
mysql> exit

5、rrdtool installation
download:
http://people.ee.ethz.ch/~oetike ... dtool-1.0.50.tar.gz
then
./configure
make && make install

6、net-snmp installation
Download the latest version and install it.

7、cacti installation

cp cacti-0.8.6g.tar.gz /www/htdocs
tar xzvf cacti-0.8.6g.tar.gz
mv cacti-0.8.6g cacti
cd cacti

/usr/local/mysql/bin/mysql –u root –psccmrtg cacti < cacti.sql

chown –R cactiuser rra/ log/
or
chown -R cactiuser /www/htdocs/cacti


vi /www/htdocs/cacti/include/config.php

$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipw”;

useradd cactiuser
passwd cactiuser
su - cactiuser
Crontab –u cactiuser –e

*/5 * * * * /www/php/bin/php /www/htdocs/cacti/poller.php > /dev/null 2>&1

/etc/init.d/crond restart

Logon to internet and perform below command in shell window:

wget http://www.cacti.net/downloads/p ... g_parse_error.patch
wget http://www.cacti.net/downloads/p ... operties_zoom.patch
wget http://www.cacti.net/downloads/p ... ver_snmp_auth.patch
wget http://www.cacti.net/downloads/p ... _file_loading.patch
patch -p1 -N < short_open_tag_parse_error.patch
patch -p1 -N < graph_properties_zoom.patch
patch -p1 -N < script_server_snmp_auth.patch
patch -p1 -N < mib_file_loading.patch


cactid installation
./configure --with-mysql=/usr/local/mysql/include
make && make install

modify cactid.conf and copy it to /usr/local/cactid/

ln -s  /tmp/mysql.sock /var/lib/mysql/mysql.sock
or
cd /var/lib
ln -s /tmp mysql

8. threshold installation.(Add email or syslog alert function)
thold-0.2.5.zip
cd thold-0.2.5
./install.sh /www/htdocs/cacti/ cactiuser cactipw

You'd better add /usr/local/mysql/bin to $PATH.

9. Cacti settings
http://IP/cacti

10. other plugins installation
Monitor, Report,...

If you want to migrate cacti to another host, just use mysqldump to export cacti configuration, use source command in mysql to inport config, then copy /log and /rra to new host.

[ 本帖最后由 carrison 于 2005-11-22 10:14 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2005-11-10 10:17 |只看该作者
下面是一些其它平台的参考,摘自www.cacti.net
Installing Cacti on Solaris HOWTO
=================================

Javier Vidal Postigo, zanaguara at yahoo dot es

V0.1, 2004-DEC-09

This document explains how to install all the required components by
Cacti on a Solaris host.


1. INTRODUCTION

1.1 Disclaimer

Use the information in this document at your own risk. I disavow any
potential liability for the contents of this document. Use of the
concepts, examples, and/or other content of this document is
entirely at your own risk.
                                                                              
All copyrights are owned by their owners, unless specifically noted
otherwise. Use of a term in this document should not be regarded as
affecting the validity of any trademark or service mark.
                                                                              
Naming of particular products or brands should not be seen as
endorsements.
                                                                              
You are strongly recommended to take a backup of your system before
major installation and backups at regular intervals.

1.2 Software Versions

In my case, I have been able to install Cacti on a Solaris host
using the software versions listed below. It does not mean you
should use those versions. Version numbers are provided as a
reference.

- Solaris 9 Update 7 for SPARC
- Solaris 9 Recommended Patch Cluster (2004-NOV-10)
- Sunfreeware.com packages:
    autoconf-2.59
    automake-1.9
    bash-3.0
    bison-1.875d
    flex-2.5.31
    gcc-3.4.2
    libiconv-1.8
    libtool-1.5
    make-3.80
    sed-4.1.1
- Perl 5.8.5
- RRDtool 1.0.49
- Apache 2.0.52
- MySQL 4.1.7
- libxml2 2.6.16
- zlib 1.2.1
- PHP 5.0.2
- NET-SNMP 5.1.2
- Cacti 0.8.6b


2. INSTALL SOLARIS

- Install Solaris following the instructions in http://docs.sun.com/
- Install the lastest recommended patch cluster from
  http://sunsolve.sun.com/

Notes:

- Install at least Solaris 8, because Solaris 7 end of support date
  is approaching (2005-AUG-15). Check:

  http://sunsolve.sun.com/search/document.do?assetkey=1-9-10012-1

- I suppose Cacti should work fine on Solaris x86 as well.

- I have installed the "Developer System Support" configuration
  (64-bit)


3. INSTALL SUNFREEWARE PACKAGES

Solaris does not provide a C compiler, so it is necessary to install
some development tools. I recommend to install at least the
following packages from http://www.sunfreeware.com/. Be sure to pick
the packages that have been compiled for your OS version and
architecture.

    autoconf-2.59
    automake-1.9
    bash-3.0
    bison-1.875d
    flex-2.5.31
    gcc-3.4.2
    libiconv-1.8
    libtool-1.5
    make-3.80
    sed-4.1.1


4. CACTI USER ACCOUNT

It is highly recommended to run any application with a non-root
user, so create a specific group and user for Cacti. For example:

  # mkdir /export/home
  # groupadd -g 100 cacti
  # useradd -u 100 -g cacti -s /usr/bin/bash
  > -d /export/home/cacti -m cacti
  # passwd cacti

From here, a command entered by root will have the "#" prompt, and
if the user is cacti, the shell prompt will be "$".

Before start compiling, it is extremely important to have both PATH
and LD_LIBRARY_PATH environment variables properly set. This is my
.bash_profile:

PATH=/opt/perl/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin
PATH=$PATH:/opt/php/bin:/opt/mysql/bin:/opt/rrdtool/bin
PATH=$PATH:/opt/net-snmp/bin

LD_LIBRARY_PATH=/opt/libxml2/lib:/usr/lib:/etc/lib:/opt/zlib/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/sparcv9

MANPATH=/usr/man:/usr/local/man:/opt/rrdtool/man:/opt/net-snmp/man

PS1="`/usr/ucb/whoami`@"`hostname`"$ "
PS2="`/usr/ucb/whoami`@"`hostname`"> "

export PATH LD_LIBRARY_PATH MANPATH
export PS1 PS2


5. INSTALL PERL (5.8.5)

Solaris provides a version of Perl (/usr/bin/perl), but I prefer to
install mine. In my case, I have compiled 5.8.5 from
http://perl.org/ and installed it on /opt/perl:

  $ rm -f config.sh Policy.sh
  $ sh Configure -Dprefix=/opt/perl -des
  $ make
  $ make test
  # make install


6. INSTALL RRDTOOL (1.0.49)

Download RRDtool from
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ and:

  $ sh configure --prefix=/opt/rrdtool
  $ make
  # make install

7. INSTALL APACHE (2.0.52)

Download Apache from http://www.apache.org/ and:

  $ configure --prefix=/opt/apache --enable-so
  $ make
  # make install

(Optional) I have edited my /opt/apache/conf/httpd.conf so:

  User cacti
  Group cacti

  ServerName 'hostname'

  ServerRoot /opt/cacti/cacti-0.8.6b

Notes:

- 'hostname' can be the real hostname.
- /opt/cacti/cacti-0.8.6b is the path where Cacti is going to be
  installed.


8. INSTALL MYSQL (4.1.7)

First of all, you need to create a group and a user for MySQL:

  # groupadd -g 101 mysql
  # useradd -u 101 -g mysql -s /usr/bin/bash -d
  > /export/home/mysql -m mysql
  # passwd mysql

Download MySQL from http://www.mysql.com/ and:

  $ ./configure --prefix=/opt/mysql
  $ make
  # make install
  # cp support-files/my-large.cnf /etc/my.cnf
  # cd /opt/mysql
  # bin/mysql_install_db --user=mysql
  # chown -R root  .
  # chown -R mysql var
  # chgrp -R mysql .

Start MySQL:

  # bin/mysqld_safe --user=mysql &

Set a password for the root user:

  $ mysqladmin -u root password 'new-password'
  $ mysqladmin -u root -h 'hostname' password 'new-password'

Note:

- If you 'make clean', be careful because there is a bug in MySQL.
  'make clean' does not remove the file sql/lex_hash.h and it
  should be removed by hand.


9. INSTALL LIBXML2 (2.6.16)

PHP 5 requires a recent version of libxml2. The version that comes
with Solaris 9 is too old. Download it from http://xmlsoft.org/ and:

  $ ./configure --prefix=/opt/libxml2
  $ make
  # make install


10. INSTALL ZLIB (1.2.1)

zlib is also required by PHP 5. Download it from
http://www.gzip.org/zlib/ and:

  $ ./configure --prefix=/opt/zlib
  $ make
  # make install


11. INSTALL PHP (5.0.2)

I have not been able to compile PHP 5 with SNMP support, it is in my
'to do' list. If you do not have PHP support activated Cacti will use
NET-SNMP instead.

Download PHP from http://www.php.net/ and:

  $ ./configure --with-apxs2=/opt/apache/bin/apxs
  > --with-mysql=/opt/mysql --prefix=/opt/php
  > --with-libxml-dir=/opt/libxml2 --with-zlib=/opt/zlib
  $ make
  # make install

You have to add several lines to your Apache configuration file
(/opt/apache/conf/httpd.conf):

  AddType application/x-httpd-php .php
  DirectoryIndex index.html index.html.var index.php

Be sure PHP installation have added:

  LoadModule php5_module        modules/libphp5.so

And add index.php to the DirectoryIndex directive:

  DirectoryIndex index.html index.php

Now restart Apache:

  # ./apachectl stop
  # ./apachectl start

In the Apache error_log file you should see a message saying
"PHP/5.0.2 configured".


12. INSTALL NET-SNMP (5.1.2)

Stop Solaris SNMP daemons:

  # cd /etc/rc3.d
  # ./S76snmpdx stop
  # ./S77dmi stop
  # mv S76snmpdx _S76snmpdx
  # mv S77dmi _S77dmi

Note:

- You could have more Solaris SNMP daemons running. Please check
  NET-SNMP documentation.

Download NET-SNMP from http://www.net-snmp.org/ and:

  $ ./configure --prefix=/opt/net-snmp
  > --with-default-snmp-version=3
  > --with-sys-contact=someone@domain.com
  > --with-sys-location=somelocation
  > --with-logfile=/opt/net-snmp/log/snmpd.log
  > --with-persistent-directory=/opt/net-snmp/var
  $ make
  $ make test
  # make install
  # cd /opt/net-snmp
  # mkdir var
  # mkdir log
  # ./snmpconf -g basic_setup

Answer to all question asked. Then start NET-SNMP:

  # /opt/net-snmp/sbin/snmpd -c /opt/net-snmp/bin/snmpd.conf

And check NET-SNMP agent is working fine:

  $ /opt/net-snmp/bin/snmpget -v 1 -c community
  > localhost sysUpTime.0


13. INSTALL CACTI (0.8.6b)

Once you have installed all the required components you can follow
chapter 2 of Cacti documentation (Installing Under Unix).

Note:

- If you try to execute 'php poller.php' directly in the crontab is
  not going to work because php can not find all the dynamic
  libraries needed. The simplest solution is to have in the crontab:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/cacti/poller_cron

being 'poller_cron' the following script:

  . /export/home/cacti/.bash_profile
  /opt/php/bin/php /opt/cacti/cacti-0.8.6b/poller.php

Note:

- Notice the space between the dot and the .bash_profile path.

Windows平台我也装过,比其它平台简单,大同小异,在此略过...

论坛徽章:
0
3 [报告]
发表于 2005-11-10 10:27 |只看该作者
瘟下的安装可参考下面,来自www.cacti.net ,呵呵

Installing Under Windows

Installations

   1. Download and install the following pieces of software:
          * (optional) Apache and install it to c:apache or c:apache2.  Make sure to install it as a service.
          * Cacti and extract it to the root of your web server directory.  Typically c:inetpubwwwroot or c:apache2.
          * Cactid and extract it to c:cactid.
          * RRDTool and extract it to c:rrdtool.
          * PHP 4.3.6+ or 5.x and extract it to c:php.
          * MySQL 4.0 or MySQL 4.1.  5.0 is not supported under Cacti 0.8.6g.  Install it to c:mysql.
          * (optional) Cygwin. Download setup.exe and keep it around until later used in the document.
          * (optional) Net-SNMP and install to c:net-snmp.

Configure PHP

   1.

      If using PHP 4, move the files in c:phpdlls to c:php.
   2.

      Add the following to your Windows 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 two new environment variables to your system using the procedure above: PHPRC=c:php.
         1. If using PHP 4, create this variable:  MIBDIRS=c:phpmibs
         2. If using PHP 5, create this variable:  MIBDIRS=c:phpextrasmibs
   4.

      If using PHP 4.3.5 or less (not recommended), create the following directory c:tmp.
   5.

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

      If using PHP 4 uncomment the following lines:

extension_dir = c:phpextensions
extension=php_snmp.dll
extension=php_sockets.dll
   

      If using PHP 5 uncomment the following lines:

extension_dir = c:phpext
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
   

   6.

      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.
   7. If you want to allow template importing, uncomment the following line:

file_uploads = On

   8. Give the user who will be running the scheduled task, modify rights to:

c:phpmibs.index

Configure the Webserver (Apache)

   1.

      Make sure you have stopped any IIS web servers before you proceed with Apache installation.
   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 in the c:apacheconf directory:

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

   3.

      If you are using Apache 2.x, add the following lines to your httpd.conf file in the c:apache2conf directory:

      If using PHP 4, then add the following lines:

LoadModule php4_module c:phpsapiphp4apache2.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:phpphp5apache2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.php
   

Configure the Webserver (IIS)

   1.

      Start the Internet Information Services (IIS) Manager, 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.
      IIS6: Enable All Verbs and Script Engine.
   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 top of the list.
   5. If using IIS6, go to Web Service Extensions and add a new Web Service Extension.  Name the extension "php", click Add and browse to the php4isapi.dll or php5isapi.dll file,  enable Set Extension status to Enable, and click OK.
   6. Under the Default Web Site, right click on Cacti and select Properties.
   7. Under the Directory tab, click the Write checkbox..
   8. Give the IUSR_XXXX and IIS_WPG users read & execute permissions to the file %windir%system32cmd.exe.  They will also need read permissions on <web root>/cacti/ and its subfolders.
   9. IIS6: Give the IIS_WPG user modify permissions to the folders /cacti/log and /cacti/rrd.
  10.

      Completely stop and start the IIS service using the following commands:

net stop iisadmin
net start w3svc
   

Install Cygwin (optional)

   1. Installing a single instance of Cygwin, and using it for all applications that require it is recommended so you do not have different versions of the Cygwin dlls laying around on your system, which can cause conflicts.
   2. Run setup.exe you previously downloaded.
   3. Once you reach the portion of setup entitled Select Packages, install the following:

Base (whole thing)
Libs
libart_lgpl
     libfreetype26
     libpng12
     zlib
Utils
patch
Web
wget

   4. Add c:cygwinbin to your system path.
   5. Move setup.exe to c:cygwin for future use.

Install RRDTool

   1. If you have Cygwin installed, remove the DLL files from the c:rrdtool directory.

Configure MySQL

   1.

      Start MySQL by running c:mysqlbinwinmysqladmin.exe.
   2.

      Set a password for the root user

shell> cd mysqlbin
shell> mysqladmin --user=root password somepassword
shell> mysqladmin --user=root --password reload
   

   3.

      Create the MySQL database:

shell> mysqladmin --user=root --password create cacti
   

   4.

      Import the default Cacti database:

shell> mysql --user=root --password cacti < c:apache2htdocscacticacti.sql
   

   5.

      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;

   6. If you're running MySQL 4.1 or newer with PHP 4.x, then you will need to apply the old password trick for user authentication to work with Cacti.

shell> SET PASSWORD FOR 'cacti'@'localhost' = OLD_PASSWORD('newpwd');
mysql> FLUSH PRIVILEGES;


      You will also need to modify your MySQL configuration file, typically my.ini in c:mysql.   Stop the MySQL service and add the following line:

--old-passwords

论坛徽章:
0
4 [报告]
发表于 2005-11-10 10:29 |只看该作者
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
5 [报告]
发表于 2005-11-23 09:22 |只看该作者
照我的做,肯定没问题,我都装了好几台机器了,呵呵

论坛徽章:
0
6 [报告]
发表于 2005-11-23 11:29 |只看该作者
回楼主,按照上面的做法,为什么安装完后,点Graphs==>tree mode,图片无法显示,这是为什么,还有就是在安装cacti的时候,进入cacti目录后,根本没有configure可执行文件,无法进行编译安装,我是通过在浏览器中输入http://IP/cacti后,通过页面的形式安装的,

论坛徽章:
0
7 [报告]
发表于 2005-11-23 14:29 |只看该作者
cacti解压即可,不需要编译安装。你可以以cactiuser的身份手工执行一下crontan中的任务,看看有什么错误,顺便检查一下/var/log/crond, 看看任务执行了没有。

论坛徽章:
0
8 [报告]
发表于 2005-11-23 15:00 |只看该作者
推荐你用fedora4 很容易了, 只要导入数据 修改一下snmpd的设置就好了,所有的软件都有rpm包的, 除了cacti
安装apache  yum install httpd
安装mysql  yum install mysql-server
安装rrd-tool yum install rrd-tool
安装net-snmp yum install net-snmp
安装mysql client yum install mysql
剩下就是导入cacti的数据表结构和数据, 建立cacti 用户 设置crontab -e 看cacti 说名, 一切就都搞定了, 用不着写这么一堆的东西!

论坛徽章:
0
9 [报告]
发表于 2005-11-23 15:15 |只看该作者
呵呵,如果是centos或RHEL4, Cacti的rpm包这也有,可以用apt-get安装。http://apt.sw.be/redhat/el4/en/i386/RPMS.dag/
不过俺一般编译安装,rpm的依赖关系太让人头疼了.

论坛徽章:
0
10 [报告]
发表于 2005-11-24 15:45 |只看该作者
所以推荐yum 这个东西所有的依赖他都给你解决了哈!
yum install php-snmp 它会自动把你的php也update了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP