cacti 설치 문서 1

18688 단어
설치 패키지 목록
 MySQL-client-community-5.1.31-0.rhel5.x86_64.rpm
MySQL-devel-community-5.1.31-0.rhel5.x86_64.rpm
MySQL-server-community-5.1.31-0.rhel5.x86_64.rpm
MySQL-shared-community-5.1.31-0.rhel5.x86_64.rpm
php-5.2.9.tar.gz
httpd-2.2.4.tar.gz
rrdtool-1.2.23.tar.gz
net-snmp-5.2.2.tar.gz
cacti-0.8.6d.tar.gz
cacti-plugin-0.8.7d-PA-v2.4.zip
settings-0.5.tar.gz
thold-0.3.9.tar.gz
monitor-0.8.2.tar.gz
ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi
cacti_thold-039_settings-05_add_fetion_msn.path
freetype-2.3.5.tar.gz( )
libart_lgpl-2.3.17.tar.gz( )
libpng-1.2.18.tar.gz( )
library_linux.tar.gz( )
libraryrh4x32.tar.gz( )
navicat8lite_mysql_cs.exe( )
openssl-devel-0.9.8b-10.el5.i386.rpm
page_load_time.tar.gz
sendMsg.zip( )
syslog-0.5.2.tar.gz( )
zlib-1.2.3.tar.gz
discovery-0.8.5.tar.gz( )
procmail-3.22-17.1.el5.centos.x86_64.rpm
sendmail-8.13.8-2.el5.x86_64.rpm
sendmail-devel-8.13.8-2.el5.x86_64.rpm

소프트웨어 설치 순서
 a)	Mysql
b) Httpd
c) openssl
d) Php
e) Net-snmp
f) Rrdtool
g) cacti
h) cacti-plugin-0.8.7d-PA-v2.4.zip
i) settings
j) thold
k) monitor
l) sendmail
m) cacti_ thold-039_settings-05_add_fetion_msn.path
n) page_load_time

패키지 경로
apache+PHP+Mysql 실행 환경 설치
Mysql-5.1.31 설치
        :http://down.gzv8.com/As5_5131rpm_x64/
 mysql   ,  rpm   
1. MySQL-shared-community-5.1.31-0.rhel5.x86_64.rpm
2. MySQL-devel-community-5.1.31-0.rhel5.x86_64.rpm
3. MySQL-server-community-5.1.31-0.rhel5.x86_64.rpm
4. MySQL-client-community-5.1.31-0.rhel5.x86_64.rpm

a) mysql
MySQL, , mysql 。
        # //          mysql
rpm –qa | grep mysql
// mysql
# rpm –e mysql-*
// /etc/my.cnf(MySQL ), , 。
// /etc/
#cd /etc/
// my.cnf
#rm –rf my.cnf
       OWL       mysql-5.0.45-7.el5,      。
     b)	  mysql
: share, deved,server,client
          //  rpm  
# rpm –irh XXXX.rpm
     c)	  mysql
        //    
# useradd mysql
//
# groupadd mysql
// mysql
# bin/safe_mysqld --user=mysql &

         //           MySQl
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
// my.cnf MySQL
# vi /etc/my.cnf
//
[mysqld]
set-variable=max_connections=1000
set-variable=max_user_connections=500
set-variable=wait_timeout=200
//max_connections 1000
//max_user_connections 500
//wait_timeout 200 (IDLE) , 。
// , MySQL
// MySQL
# mysqladmin -uroot -p variables
Password:
//
| max_connections | 1000
| max_user_connections | 500
| wait_timeout | 200
     d)     Navicat,mysql        ,  。
:http://download.navicat.com/download/navicat8lite_mysql_cs.exe
windows 。
Navicat :http://www.navicat.com/manual/online_manual/mysql_manual/win_manual/index.html

httpd-2.2.4 설치
        :http://apache.mirror.phpchina.com/httpd/httpd-2.2.4.tar.gz

a)
    //   
#tar –xzvf httpd-2.2.4.tar.gz
//
# cd httpd-2.2.4
//
# ./configure --prefix=/usr/local/apache --enable-so
//
# make
# make install
 b)	  
    //    
#vi /usr/local/apache/conf/httpd.conf
// Apache , ServerName www.yourdomain.com ( ServerName ip)
( )
# vi /etc/rc.d/rc.local
// rc.local /usr/local/apache/bin/apachectl –k start, Apache 。
 c)	  /    
    //  
#/usr/local/apache/bin/apachectl –k start
//
#/usr/local/apache/bin/apachectl –k stop

PHP 설치 - 5.2.9
        :http://cn.php.net/distributions/php-5.2.9.tar.gz

a)
OWL openssl-devel-0.9.8b-10.el5.i386.rpm, 。
png,gd,freetype,zlib,mysql,openssl , , 。
    //  
# tar –xzvf php-5.2.9.tar.gz
//
# cd php-5.2.9
//
#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-png-dir --with-gd --with-freetype-dir --with-zlib -with-mysql --with-openssl --with-gettext -enable-sockets
 b)	  
    //  php.ini  
# cp php.ini-recommended /usr/local/php/lib/php.ini
//
# ln –s /usr/local/php/bin/* /usr/local/bin/
//
# vi /usr/local/apache/conf/httpd.conf
// AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
// AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
// DirectoryIndex , index.php
// DirectoryIndex index.php index.html index.html.var
 c)	  
    //    
# vi /usr/local/apache/htdocs/test.php

//php ( < [
[?php
Phpinfo();
 ?]
wq
 
// apache
# /usr/local/apache/bin/apachectl –k stop
#/usr/local/apache/bin/apachectl –k start
          :http://www.yourdomain.com/test.php    .

net-snmp
   :   net-snmp-5.2.2.tar.gz      ,   ./configure     --enable-mfd-rewrites      in/out  64 bits,
1000Mbps ( Linux , SNMP Agent , ,
SNMP Server Cacti 64 bits )。 cacti snmpwalk -v 2c -c public 202.39.85.2 ifHCInoctets 。
./configure --enable-mfd-rewrites --with-mib-modules="ucd-snmp/diskio mibII/mta_sendmail"
   windows        count 64bit   ,             in/out traffic 64bits
Cacti SNMPGET , Cacti ( SNMP-Agent) Net-SNMP。

유닉스 환경에서 넷-snmp 설치
        :http://down1.chinaunix.net/distfiles/net-snmp-5.2.2.tar.gz

a) net-snmp-5.2.2.tar.gz
    //  
# tar zxvf net-snmp-5.2.2.tar.gz
#cd net-snmp-5.2.2
//
#./configure --prefix=/usr/local/net-snmp --enable-developer
// net-snmp /usr/local/net-snmp
// , SNMP , 2 ; SystemContact, ; SystemLocation.
//
#make
#make install
 b)	  
    //  
# ln –s /usr/local/net-snmp/bin/* /usr/local/bin/
#cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
// snmpd.conf( COMMUNITY、 snmp 、 )。
# /usr/local/net-snmp/sbin/snmpd // SNMP
# vi /etc/rc.d/rc.local
// rc.local /usr/local/net-snmp/sbin/snmpd, SNMP 。
 c)	  
snmpwalk -v 2c -c public 192.168.1.1 MIB ( 192.168.1.1 2c SNMP,
community public)。 MIB , SNMP SNMP。

unix 서버의 SNMP-Agent 구성
 a)               $prefixdir/share/snmp   ,      :
    # sec.name  source          community
com2sec USAVT default owncacti
group USAVTROGroup v1 USAVT
group USAVTROGroup v2c USAVT
group USAVTROGroup usm USAVT
view all included .1
access USAVTROGroup "" any noauth exact all none none
syslocation United States
syscontact Onewave
          community、    、    、     、    (  )、      。
 b)         snmp    。
shell>snmpd

Windows 서버의 SNMP-Agent 설치 및 구성
        :http://ncu.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.3.3.zip
       ActivePerl    ,         ,    perl –v    
http://sourceforge.net/project/showfiles.php?group_id=12694 for windows net-snmp
exe
           registeragent.bat    
etc\snmp , snmpd.conf, :\usr\etc\snmp\snmpd.conf
-> net-snmp
SNMP Service : -> SNMP

snmpwalk MIB

RRDTools 1.2 설치
 RRDTool 1.2              Lib ( cgilib,zlib ),     http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/


RRDTools 및 Lib 설치
        :http://ftp.idilis.ro/mirrors/rrdtool/rrdtool-1.2.23.tar.gz
        lib  :
freetype-2.1.9.tar.gz
libart_lgpl-2.3.17.tar.gz
libpng-1.2.8-config.tar.gz
zlib-1.2.2.tar.gz

  //    
#./configure –prefix=/usr/local/rrdtool
make
make install

RRDTools 사전 설치 준비
       ,rrdtool1.2       ,        ,       。       Linux,     、         。
, rrdtool-1.2 src/rrd_graph.c :
setlocale(LC_TIME,""); setlocale(LC_ALL,"en_US.ISO-8859-1");
rrdtool locale en_US. ISO-8859-1, 。
RRD :
, rrd_graph.c. ( , , ),
     51: {60, 24*3600, TMT_MINUTE,30, TMT_HOUR,2, TMT_HOUR,4, 0,"%d (%H:%M)"},
53: {180, 24*3600, TMT_HOUR,1, TMT_HOUR,6, TMT_HOUR,12, 0,"%d (%H:%M)"},
55: {600, 0, TMT_HOUR,6, TMT_DAY,1, TMT_DAY,1, 24*3600," %a(%d )"},
56: {1200, 0, TMT_HOUR,6, TMT_DAY,1, TMT_DAY,1, 24*3600,"%d "},
57: {1800, 0, TMT_HOUR,12, TMT_DAY,1, TMT_DAY,2, 24*3600," %a(%d )"},
58: {2400, 0, TMT_HOUR,12, TMT_DAY,1, TMT_DAY,2, 24*3600," %a(%d )"},
59: {3600, 0, TMT_DAY,1, TMT_WEEK,1, TMT_WEEK,1, 7*24*3600,"%V "},
60: {3*3600, 0, TMT_WEEK,1, TMT_MONTH,1, TMT_WEEK,2, 7*24*3600,"%V "},
3065: //setlocale(LC_TIME,"");
3066: #ifdef HAVE_MBSTOWCS
3067: setlocale(LC_ALL,"zh_CN");

컴파일 설치
  ./configure --disable-rrdcgi --disable-tcl --prefix=/usr/local/rrdtool
make
make install

좋은 웹페이지 즐겨찾기