'cacti설치'에 해당되는 글 1건

  1. 2012.05.29 cacti 설치
Cacti2012. 5. 29. 11:29

출처 : http://www.mimul.com/pebble/default/2012/03/06/1331043853317.html

 

1. 관련 라이브러리 설치

wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
tar xvfz glib-2.12.13.tar.gz
cd glib-2.12.13
./configure --prefix=/usr/local CFLAGS="-O3 -fPIC"
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
tar xvfz libxml2-2.6.32.tar.gz
cd libxml2-2.6.32
./configure -prefix=/usr/local/libxml2
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.bz2
tar xvfz freetype-2.3.5.tar.bz2
cd freetype-2.3.5
./configure --prefix=/usr/local CFLAGS="-O3 -fPIC"
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
tar xvfz  fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure --prefix=/usr/local CFLAGS="-O3 -fPIC" \
  --with-freetype-config=$INSTALL_DIR/bin/freetype-config
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
tar xvfz pixman-0.10.0.tar.gz 
cd pixman-0.10.0
./configure --prefix=/usr/local CFLAGS="-O3 -fPIC"
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
tar xvfz cairo-1.6.4.tar.gz
cd cairo-1.6.4
./configure --prefix=/usr/local \
   --enable-xlib=no \
   --enable-xlib-render=no \
   --enable-win32=no \
   CFLAGS="-O3 -fPIC"
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.17.5.tar.gz
tar xvfz pango-1.17.5.tar.gz
cd pango-1.17.5
./configure --prefix=/usr/local CFLAGS="-O3 -fPIC" --without-x
make;make install

wget http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz
tar xvfz libart_lgpl-2.3.17.tar.gz
cd libart_lgpl-2.3.17
./configure --prefix=/usr/local --disable-shared 
make && make install

wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
tar xvfz rrdtool.tar.gz
cd rrdtool-1.4.7/
./configure --prefix=/usr/local/rrdtool --disable-python \
 --disable-tcl --enable-shared 
 make && make install

wget http://downloads.sourceforge.net/beecrypt/beecrypt-4.1.2.tar.gz
tar xvfz beecrypt-4.1.2.tar.gz
cd beecrypt-4.1.2
./configure  --prefix=/usr/local/beecrypt
make;make install

wget http://sourceforge.net/projects/net-snmp/files/net-snmp/
5.7.1/net-snmp-5.7.1.tar.gz
tar xvfz net-snmp-5.7.1.tar.gz
cd net-snmp-5.7.1
./configure
SNMP Version 1 입력.
System Contact Information에 이메일 입력하고 나머진 엔터. 나중에 설정 가능함.
cp ~/net-snmp-5.7.1/EXAMPLE.conf /etc/snmp/snmpd.conf
vi /etc/snmp/snmpd.conf
rocommunity public
rocommunity public 127.0.0.1
includeAllDisks
disk쪽 파티션 추가.
proc 데몬 추가.

/etc/init.d/snmpd 정보 수정
 - OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf"

2. Cacti 설치(php 설치되어 있어야 함)

wget http://www.cacti.net/downloads/cacti-0.8.7i.tar.gz
tar xvfz cacti-0.8.7i.tar.gz
cd cacti-0.8.7i
Web DocumentRoot로 카피함


- mysql권한 지정

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiadmin';
mysql> create database cacti;
> mysql -uroot -p cacti < cacti.sql


- mysql 데이터 베이스 정보 수정

vi include/config.php
 -> 데이터 베이스 정보 수정
vi /$HTTP_HOME/conf/httpd.conf
<Directory /www/cacti/>
       AllowOverride None
       Order allow,deny
       Allow from all
</Directory>
Alias /cacti/ /www/cacti/


- 웹 호출
. http://localhost/cacti/ 호출
. New Install NEXT
. 기반 라이브러리들 패스 지정한 다음 NEXT
. Cacti 로그인(admin/admin 디폴트)

- Configuration>Setting
. SNMP Utility Version, RRDTool Utility Version 버전 맞는 거 선택.

- Management>Devices>localhost(127.0.0.1) 이동 후
. Downed Device Detection : None
. SNMP Version : Version 1
. SNMP Community : public
. Add Data Query : SNMP - Get Mounted Partitions, SNMP - Get Processor Information, SNMP - Interface Statistics 추가.

- Management>New Graphs에서 해당 항목의 graph template을 체크하고 Create 클릭

- "php /home/k2/www/cacti/poller.php --force" 실행

3. 모니터링 화면


Cacti 설치했으니, 이젠 Hadoop 모니터링 기능 추가해야겠습니다. ㅋㅋ

 
Posted by 배움나눔