STEP 1.

php-weathermap을 설치하기 위해서 우선 다운을 받는다.

[root@cacti download]# pwd
/download
[root@cacti download]# wget http://www.network-weathermap.com/files/php-weathermap-0.95b.zip
--14:24:50--  http://www.network-weathermap.com/files/php-weathermap-0.95b.zip
Resolving www.network-weathermap.com... 212.21.100.67
Connecting to
www.network-weathermap.com|212.21.100.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2788907 (2.7M) [application/zip]
Saving to: `php-weathermap-0.95b.zip'

100%[=========================================================================================================================================>] 2,788,907    114K/s   in 25s   

14:25:16 (108 KB/s) - `php-weathermap-0.95b.zip' saved [2788907/2788907]

[root@cacti download]#



다운받은 php-weathermap의 압축을 풀어주고, weathermap 디렉토리를 Cacti의 플러그인 디렉토리로 이동한다.

[root@cacti download]# unzip php-weathermap-0.95b.zip
Archive:  php-weathermap-0.95b.zip
  inflating: weathermap/CHANGES     
  inflating: weathermap/COPYING     
  inflating: weathermap/HTML_ImageMap.class.php 
  inflating: weathermap/README      
  inflating: weathermap/WeatherMap.functions.php 
  inflating: weathermap/WeatherMapLink.class.php 
  inflating: weathermap/WeatherMapNode.class.php 
  inflating: weathermap/Weathermap.class.php 
  inflating: weathermap/cacti-pick.php 
  inflating: weathermap/check-gdbug.php 
  inflating: weathermap/check.php   
   creating: weathermap/configs/
  inflating: weathermap/configs/simple.conf 
  inflating: weathermap/configs/index.php 
  inflating: weathermap/configs/.htaccess 
   creating: weathermap/docs/
   creating: weathermap/docs/example/
  inflating: weathermap/docs/example/Gradient_BK_800.png 
  inflating: weathermap/docs/example/Vera.ttf 
  inflating: weathermap/docs/example/VeraBI.ttf 
  inflating: weathermap/docs/example/VeraBd.ttf 
  inflating: weathermap/docs/example/VeraIt.ttf 
  inflating: weathermap/docs/example/VeraMoBI.ttf 
  inflating: weathermap/docs/example/VeraMoBd.ttf 
  inflating: weathermap/docs/example/VeraMoIt.ttf 
  inflating: weathermap/docs/example/VeraMono.ttf 
  inflating: weathermap/docs/example/VeraSe.ttf 
  inflating: weathermap/docs/example/VeraSeBd.ttf 
  inflating: weathermap/docs/example/background.png 
  inflating: weathermap/docs/example/example.conf 
  inflating: weathermap/docs/example/example.html 
  inflating: weathermap/docs/example/example.png 
  inflating: weathermap/docs/example/graph_image.png 
  inflating: weathermap/docs/example/graph_page.html 
 extracting: weathermap/docs/example/my_router.png 
  inflating: weathermap/docs/example/overlib.js 
  inflating: weathermap/docs/howto.pdf 
  inflating: weathermap/docs/howto.png 
   creating: weathermap/docs/images/
  inflating: weathermap/docs/images/cacti_mainscreen.png 
  inflating: weathermap/docs/images/cacti_maps_manage.png 
  inflating: weathermap/docs/images/cacti_step1.png 
 extracting: weathermap/docs/images/cacti_step2.png 
  inflating: weathermap/docs/images/cacti_user_manage.png 
  inflating: weathermap/docs/images/cacti_wmap_settings.png 
 extracting: weathermap/docs/images/font-sizes.png 
  inflating: weathermap/docs/images/howto-thumb.jpg 
  inflating: weathermap/docs/images/keystyle-classic.png 
 extracting: weathermap/docs/images/keystyle-horizontal.png 
  inflating: weathermap/docs/images/keystyle-vertical.png 
  inflating: weathermap/docs/images/weathermap-example.png 
  inflating: weathermap/docs/images/weathermap-mini.png 
  inflating: weathermap/docs/index.html 
   creating: weathermap/docs/pages/
  inflating: weathermap/docs/pages/advanced.html 
  inflating: weathermap/docs/pages/cacti-plugin.html 
  inflating: weathermap/docs/pages/changes.html 
  inflating: weathermap/docs/pages/cli-reference.html 
  inflating: weathermap/docs/pages/config-reference.html 
  inflating: weathermap/docs/pages/editor.html 
  inflating: weathermap/docs/pages/errorcodes.html 
  inflating: weathermap/docs/pages/faq.html 
  inflating: weathermap/docs/pages/install-cacti-editor.html 
  inflating: weathermap/docs/pages/install-cacti.html 
  inflating: weathermap/docs/pages/install-cli-editor.html 
  inflating: weathermap/docs/pages/install-cli.html 
  inflating: weathermap/docs/pages/main.html 
  inflating: weathermap/docs/pages/targets.html 
  inflating: weathermap/docs/pages/upgrading.html 
  inflating: weathermap/docs/pages/weathermap.css 
  inflating: weathermap/editor-config.php-dist 
   creating: weathermap/editor-resources/
  inflating: weathermap/editor-resources/jquery-latest.pack.js 
  inflating: weathermap/editor.css  
  inflating: weathermap/editor.inc.php 
  inflating: weathermap/editor.js   
  inflating: weathermap/editor.php  
   creating: weathermap/images/
 extracting: weathermap/images/Cloud-Filled.png 
 extracting: weathermap/images/Cloud-line.png 
 extracting: weathermap/images/Firewall.png 
 extracting: weathermap/images/HPMini.png 
 extracting: weathermap/images/Host.png 
 extracting: weathermap/images/PAD.png 
 extracting: weathermap/images/Router.png 
 extracting: weathermap/images/WorkgroupSwitch.png 
  inflating: weathermap/images/background1_950x625_197.jpg 
  inflating: weathermap/images/blueboard1024.png 
 extracting: weathermap/images/btn_recalc.png 
  inflating: weathermap/images/bw_gradient_1024.png 
 extracting: weathermap/images/filecabinet.png 
  inflating: weathermap/images/hollow32.png 
 extracting: weathermap/images/tab_weathermap_red.png 
 extracting: weathermap/images/tab_weathermap.png 
  inflating: weathermap/images/uk1024.png 
 extracting: weathermap/images/updown_0.png 
 extracting: weathermap/images/updown_1.png 
 extracting: weathermap/images/updown_2.png 
 extracting: weathermap/images/application.png 
 extracting: weathermap/images/page_white.png 
 extracting: weathermap/images/flag_blue.png 
 extracting: weathermap/images/wrench.png 
 extracting: weathermap/images/flag_purple.png 
 extracting: weathermap/images/application_side_list.png 
 extracting: weathermap/images/application_xp_terminal.png 
 extracting: weathermap/images/emoticon_unhappy.png 
 extracting: weathermap/images/world.png 
 extracting: weathermap/images/error.png 
 extracting: weathermap/images/flag_pink.png 
 extracting: weathermap/images/tick.png 
 extracting: weathermap/images/exclamation.png 
 extracting: weathermap/images/world_link.png 
 extracting: weathermap/images/emoticon_smile.png 
 extracting: weathermap/images/monitor.png 
 extracting: weathermap/images/flag_green.png 
 extracting: weathermap/images/comment.png 
 extracting: weathermap/images/flag_yellow.png 
 extracting: weathermap/images/cross.png 
 extracting: weathermap/images/flag_orange.png 
 extracting: weathermap/images/wrench_orange.png 
  inflating: weathermap/images/index.php 
  inflating: weathermap/images/blue-ball-64.png 
  inflating: weathermap/images/green-ball-64.png 
  inflating: weathermap/images/grey-ball-64.png 
  inflating: weathermap/images/red-ball-64.png 
  inflating: weathermap/images/yellow-ball-64.png 
  inflating: weathermap/index.php   
   creating: weathermap/lib/
   creating: weathermap/lib/datasources/
  inflating: weathermap/lib/datasources/README.txt 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_cactihost.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_cactithold.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_dbsample.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_external.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_mrtg.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_rrd.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_static.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_tabfile.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_snmp.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_fping.php 
  inflating: weathermap/lib/datasources/WeatherMapDataSource_skeleton.php.txt 
  inflating: weathermap/lib/poller-common.php 
   creating: weathermap/lib/post/
  inflating: weathermap/lib/post/WeatherMapPostProcessorTest.php 
   creating: weathermap/lib/pre/
  inflating: weathermap/lib/pre/WeatherMapPreProcessorTest.php 
  inflating: weathermap/lib/index.php 
  inflating: weathermap/lib/.htaccess 
  inflating: weathermap/logout.php  
  inflating: weathermap/net-data.txt 
   creating: weathermap/output/
 extracting: weathermap/output/dummy-file.delete-me 
  inflating: weathermap/output/index.php 
  inflating: weathermap/output/.htaccess 
  inflating: weathermap/overlib.js  
   creating: weathermap/random-bits/
  inflating: weathermap/random-bits/README 
  inflating: weathermap/random-bits/auto-overlib.pl 
  inflating: weathermap/random-bits/map-split.php 
  inflating: weathermap/random-bits/suite-1.conf 
  inflating: weathermap/random-bits/suite-2.conf 
  inflating: weathermap/random-bits/suite-1.png 
  inflating: weathermap/random-bits/suite-2.png 
  inflating: weathermap/setup.php   
  inflating: weathermap/weathermap  
  inflating: weathermap/weathermap-cacti-plugin-mgmt.php 
  inflating: weathermap/weathermap-cacti-plugin.php 
  inflating: weathermap/weathermap-cacti-rebuild.php 
 extracting: weathermap/weathermap-logo.png 
  inflating: weathermap/weathermap.conf 

[root@cacti download]#

[root@cacti download]# mv weathermap/ /download/cacti-0.8.7e/plugins
[root@cacti download]# cd /download/cacti-0.8.7e/plugins
[root@cacti plugins]# ls -al
total 16
drwxr-xr-x  3 root root  4096 Aug 21 14:38 .
drwxr-xr-x 14 1000 users 4096 Aug 21 13:34 ..
-rw-r--r--  1 root root    44 Aug 21 13:34 index.php
drwxr-xr-x  9 root root  4096 Aug 21 14:30 weathermap

[root@cacti plugins]#




이로써 php-weathermap은 Cacti에 플러그인으로써 추가 되었다.

그러나 global.php를 수정하여 플러그인 배열을 추가하여야 한다.



[root@cacti plugins]# vi /download/cacti-0.8.7e/include/global.php
.... 생략 ....
/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";

$plugins = array();
//$plugins[] = 'thold';

/* Do not edit this line */
$config = array();
.... 생략 ....


위와 같이 나오는데 $plugins = array(); 배열설정 되어 있는 부분 밑에 사용할 플러그인을 추가한다.



.... 생략 ....
/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";

$plugins = array();
$plugins[] = 'weathermap';
//$plugins[] = 'thold';

/* Do not edit this line */
$config = array();
.... 생략 ....


위와 같이 $plugins[] = 'weathermap'; 을 추가하고 변경 된 내용을 저장한다.





STEP 2.

웹 브라우저에서 위와 같이 Cacti에 접속을 한다.




위 그림과 같이 User Management를 클릭한다.




그 다음 위 그림과 마찬가지로 admin 계정을 클릭한다.




위 그림과 같이 Plugin에 Weathermap이 추가 된 것을 볼 수 있다.

이 두개를 모두 체크하고 [SAVE] 버튼을 눌러준다.




위 그림과 같이 Weathermap 탭이 추가 되었으며, 좌측 메뉴 역시 Weathermap 메뉴가 추가 된 것을 확인 할 수 있다.

이와 같은 방법으로 Cacti Users 사이트에 올라와 있는 플러그인을 추가 할 수 있다.

이제 본인에게 필요한 플러그인을 설치 해 보도록 하자.




※ Weathermap의 경우에는 웹이나 기타 일정 주기단위로 데이터를 저장하기 때문에 쓰기 권한이 있어야 한다.

필자의 경우에는 이것을 확인하기 귀찮아서 통채로 모든 권한을 다 줘버렸다.

[root@cacti plugins]# cd weathermap
[root@cacti weathermap]# chmod 777 -R *
[root@cacti weathermap]# ls -al
total 560
drwxrwxrwx 9 root root  4096 Aug 21 15:02 .
drwxr-xr-x 3 root root  4096 Aug 21 14:38 ..
-rwxrwxrwx 1 root root 14316 Mar 18  2008 cacti-pick.php
-rwxrwxrwx 1 root root 22741 Mar 18  2008 CHANGES
-rwxrwxrwx 1 root root  1113 Mar 18  2008 check-gdbug.php
-rwxrwxrwx 1 root root 12968 Mar 18  2008 check.php
drwxrwxrwx 2 root root  4096 Mar 18  2008 configs
-rwxrwxrwx 1 root root 18011 Mar 18  2008 COPYING
drwxrwxrwx 5 root root  4096 Mar 18  2008 docs
-rwxrwxrwx 1 root root  1095 Mar 18  2008 editor-config.php-dist
-rwxrwxrwx 1 root root  4922 Mar 18  2008 editor.css
-rwxrwxrwx 1 root root 10206 Mar 18  2008 editor.inc.php
-rwxrwxrwx 1 root root 25239 Mar 18  2008 editor.js
-rwxrwxrwx 1 root root 37258 Mar 18  2008 editor.php
drwxrwxrwx 2 root root  4096 Mar 18  2008 editor-resources
-rwxrwxrwx 1 root root  9809 Mar 18  2008 HTML_ImageMap.class.php
drwxrwxrwx 2 root root  4096 Mar 18  2008 images
-rwxrwxrwx 1 root root    62 Mar 18  2008 index.php
drwxrwxrwx 5 root root  4096 Mar 18  2008 lib
-rwxrwxrwx 1 root root    65 Mar 18  2008 logout.php
-rwxrwxrwx 1 root root    38 Mar 18  2008 net-data.txt
drwxrwxrwx 2 root root  4096 Mar 18  2008 output
-rwxrwxrwx 1 root root 50734 Mar 18  2008 overlib.js
drwxrwxrwx 2 root root  4096 Mar 18  2008 random-bits
-rwxrwxrwx 1 root root  1077 Mar 18  2008 README
-rwxrwxrwx 1 root root 23017 Mar 18  2008 setup.php
-rwxrwxrwx 1 root root  7627 Mar 18  2008 weathermap
-rwxrwxrwx 1 root root 17485 Mar 18  2008 weathermap-cacti-plugin-mgmt.php
-rwxrwxrwx 1 root root 19394 Mar 18  2008 weathermap-cacti-plugin.php
-rwxrwxrwx 1 root root   935 Mar 18  2008 weathermap-cacti-rebuild.php
-rwxrwxrwx 1 root root 89274 Mar 18  2008 Weathermap.class.php
-rwxrwxrwx 1 root root   370 Mar 18  2008 weathermap.conf
-rwxrwxrwx 1 root root 28834 Mar 18  2008 WeatherMap.functions.php
-rwxrwxrwx 1 root root 24531 Mar 18  2008 WeatherMapLink.class.php
-rwxrwxrwx 1 root root  4459 Mar 18  2008 weathermap-logo.png
-rwxrwxrwx 1 root root 32397 Mar 18  2008 WeatherMapNode.class.php

[root@cacti weathermap]#
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,







Cacti를 설치 한 후에 웹브라우저로 Cacti가 구동중인 서버에 접속 한 첫 화면이다.



STEP 1.

New Install을 하기로 한다. 필자의 경우 Cacti를 설치 했던 서버에 다시 설치하는 것이라 업그레이드를 해도 되지만,

새 마음으로  새롭게 설치 해 보려고 새로 인스톨 하였다.


New Install 상태에서 [NEXT]를 클릭한다.




전에 Cacti를 설치 했던 서버에 다시 설치하는 것 이기 때문에 Log 파일 경로를 제외하고 모든 경로가 완벽하다.

Cacti-0.8.7c의 경우와 다르게 RRDtool과 PHP 경로를 변경하지 않아도 되었다.




STEP 2.

user name과 password를 입력하여 Cacti를 실행하면 된다.


처음 설치할 경우 필자가 쓴 Cacti-0.8.7c 처럼 계정에 admin, 패스워드에 admin을 입력하고 다시 패스워드를 변경하는 과정을 묻게된다.

그러나 위에 언급했듯이 내 경우에는 설치 했던 서버에 다시 설치하였기 때문에 패스워드가 admin / admin 이 아니었다.





위와 같이 기본적인 세팅이 끝났고, 메인 페이지가 떴다.









STEP 3.

Cacti Plugin Architecture(PA)를 다운 받는다.

http://cactiusers.org/index.php 여기에 가서 직접 받으면 된다. 필자의 경우 이 사이트가 수시로 업데이트 되기 때문에

블로그에 파일을 올려 두었다.



Plugin을 설치하면 Cacti에 추가 기능을 사용할 수 있었고, 필자의 경우도 테스트를 많이 해 보지 않아

아직 이것에 대해서 자세히 모르겠다. 설치하고 되는것 확인 하는 정도의 수준이라고 보면 되겠다.




[root@cacti download]# pwd
/download
[root@cacti download]# wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.5.zip
--11:30:40--  http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7e-PA-v2.5.zip
Resolving mirror.cactiusers.org... 209.189.228.150
Connecting to mirror.cactiusers.org|209.189.228.150|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 208458 (204K) [application/zip]
Saving to: `cacti-plugin-0.8.7e-PA-v2.5.zip'

100%[=========================================================================================================================================>] 208,458      161K/s   in 1.3s  

11:30:42 (161 KB/s) - `cacti-plugin-0.8.7e-PA-v2.5.zip' saved [208458/208458]

[root@cacti download]#



패치 할 Cacti가 있는 디렉토리에 ZIP 파일을 옮겨준다.

[root@cacti download]# mv ./cacti-plugin-0.8.7e-PA-v2.5.zip /download/cacti-0.8.7e
[root@cacti download]# cd cacti-0.8.7e
[root@cacti cacti-0.8.7e]# ll
total 1240
-rw-r--r-- 1 1000 users   6199 Jun 29 01:07 about.php
-rw-r--r-- 1 1000 users   4889 Jun 29 01:07 auth_changepassword.php
-rw-r--r-- 1 1000 users  11818 Jun 29 01:07 auth_login.php

-rw-r--r-- 1 root root  208458 Jul 11 06:59 cacti-plugin-0.8.7e-PA-v2.5.zip
-rw-r--r-- 1 1000 users 176144 Jun 29 01:07 cacti.sql
-rw-r--r-- 1 1000 users  21070 Jun 29 01:07 cdef.php
drwxr-xr-x 2 1000 users   4096 Jun 29 01:07 cli
-rw-r--r-- 1 1000 users  18329 Jun 29 01:07 cmd.php
-rw-r--r-- 1 1000 users   6809 Jun 29 01:07 color.php
-rw-r--r-- 1 1000 users  24595 Jun 29 01:07 data_input.php
-rw-r--r-- 1 1000 users  35028 Jun 29 01:07 data_queries.php
-rw-r--r-- 1 1000 users  55797 Jun 29 01:07 data_sources.php
-rw-r--r-- 1 1000 users  32287 Jun 29 01:07 data_templates.php
drwxr-xr-x 5 1000 users   4096 Jun 29 01:07 docs
-rw-r--r-- 1 1000 users   5962 Jun 29 01:07 gprint_presets.php
-rw-r--r-- 1 1000 users   3449 Jun 29 01:07 graph_image.php
-rw-r--r-- 1 1000 users  11592 Jun 29 01:07 graph.php
-rw-r--r-- 1 1000 users   7957 Jun 29 01:07 graph_settings.php
-rw-r--r-- 1 1000 users  17383 Jun 29 01:07 graphs_items.php
-rw-r--r-- 1 1000 users  37412 Jun 29 01:07 graphs_new.php
-rw-r--r-- 1 1000 users  57326 Jun 29 01:07 graphs.php
-rw-r--r-- 1 1000 users   9949 Jun 29 01:07 graph_templates_inputs.php
-rw-r--r-- 1 1000 users  18482 Jun 29 01:07 graph_templates_items.php
-rw-r--r-- 1 1000 users  26024 Jun 29 01:07 graph_templates.php
-rw-r--r-- 1 1000 users  41326 Jun 29 01:07 graph_view.php
-rw-r--r-- 1 1000 users   5839 Jun 29 01:07 graph_xport.php
-rw-r--r-- 1 1000 users  55379 Jun 29 01:07 host.php
-rw-r--r-- 1 1000 users  19364 Jun 29 01:07 host_templates.php
drwxr-xr-x 2 1000 users   4096 Feb 12  2009 images
drwxr-xr-x 4 1000 users   4096 Aug 20 17:35 include
-rw-r--r-- 1 1000 users   2242 Jun 29 01:07 index.php
drwxr-xr-x 2 1000 users   4096 Jun 29 01:07 install
drwxr-xr-x 3 1000 users   4096 Jun 29 01:07 lib
-rw-r--r-- 1 1000 users  15141 Oct 31  2007 LICENSE
drwxrwxrwx 2 1000 users   4096 Jun 29 01:07 log
-rw-r--r-- 1 1000 users   2451 Jun 29 01:07 logout.php
-rw-r--r-- 1 1000 users   4306 Jun 29 01:07 poller_commands.php
-rw-r--r-- 1 1000 users   2243 Jun 29 01:07 poller_export.php
-rw-r--r-- 1 1000 users  16325 Jun 29 01:07 poller.php
-rw-r--r-- 1 1000 users     48 Sep  2  2008 README
drwxr-xr-x 5 1000 users   4096 Oct 31  2007 resource
drwxrwxrwx 2 1000 users   4096 Feb 11  2009 rra
-rw-r--r-- 1 1000 users   7088 Jun 29 01:07 rra.php
drwxr-xr-x 2 1000 users   4096 Jun 29 01:07 scripts
-rw-r--r-- 1 1000 users   7304 Jun 29 01:07 script_server.php
-rw-r--r-- 1 1000 users    353 Oct 31  2007 script_server.pl
-rw-r--r-- 1 1000 users   4996 Jun 29 01:07 settings.php
-rw-r--r-- 1 1000 users   5862 Jun 29 01:07 templates_export.php
-rw-r--r-- 1 1000 users   6543 Jun 29 01:07 templates_import.php
-rw-r--r-- 1 1000 users  18792 Jun 29 01:07 tree.php
-rw-r--r-- 1 1000 users  43388 Jun 29 01:07 user_admin.php
-rw-r--r-- 1 1000 users  64286 Jun 29 01:07 utilities.php
[root@cacti cacti-0.8.7e]#



압축을 풀어준다.

[root@cacti cacti-0.8.7e]# unzip cacti-plugin-0.8.7e-PA-v2.5.zip
Archive:  cacti-plugin-0.8.7e-PA-v2.5.zip
  inflating: files-0.8.7e/auth_changepassword.php 
  inflating: files-0.8.7e/auth_login.php 
  inflating: files-0.8.7e/data_sources.php 
  inflating: files-0.8.7e/graph.php 
  inflating: files-0.8.7e/graphs.php 
  inflating: files-0.8.7e/graphs_new.php 
  inflating: files-0.8.7e/graph_image.php 
  inflating: files-0.8.7e/host.php  
   creating: files-0.8.7e/include/
  inflating: files-0.8.7e/include/auth.php 
  inflating: files-0.8.7e/include/bottom_footer.php 
  inflating: files-0.8.7e/include/global.php 
  inflating: files-0.8.7e/include/global_arrays.php 
  inflating: files-0.8.7e/include/global_constants.php 
  inflating: files-0.8.7e/include/global_form.php 
  inflating: files-0.8.7e/include/global_settings.php 
  inflating: files-0.8.7e/include/plugins.php 
  inflating: files-0.8.7e/include/top_graph_header.php 
  inflating: files-0.8.7e/include/top_header.php 
  inflating: files-0.8.7e/index.php 
   creating: files-0.8.7e/lib/
  inflating: files-0.8.7e/lib/api_device.php 
  inflating: files-0.8.7e/lib/auth.php 
  inflating: files-0.8.7e/lib/functions.php 
  inflating: files-0.8.7e/lib/html.php 
  inflating: files-0.8.7e/lib/html_form.php 
  inflating: files-0.8.7e/lib/plugins.php 
  inflating: files-0.8.7e/lib/poller.php 
  inflating: files-0.8.7e/lib/rrd.php 
  inflating: files-0.8.7e/lib/variables.php 
   creating: files-0.8.7e/plugins/
  inflating: files-0.8.7e/plugins/index.php 
  inflating: files-0.8.7e/plugins.php 
  inflating: files-0.8.7e/poller.php 
  inflating: files-0.8.7e/user_admin.php 
  inflating: files-0.8.7e/utilities.php 
  inflating: cacti-plugin-0.8.7e-PA-v2.5.diff 
replace LICENSE? [y]es, [n]o, [A]ll, [N]one, [r]ename: n
  inflating: pa.sql                 
  inflating: Readme.txt  
           
[root@cacti cacti-0.8.7e]#

압축을 푸는 중간에 같은 이름의 파일명이 있었으나 LICENSE 관련 파일이라 풀지 않고 진행하겠다.




STEP 4.

Plugin Architecture(PA)을 패치 한다.

[root@cacti cacti-0.8.7e]# patch -p1 -N --dry-run < cacti-plugin-0.8.7e-PA-v2.5.diff
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
patching file user_admin.php
patching file utilities.php

[root@cacti cacti-0.8.7e]#



[root@cacti cacti-0.8.7e]# patch -p1 -N < cacti-plugin-0.8.7e-PA-v2.5.diff
patching file auth_changepassword.php
patching file auth_login.php
patching file data_sources.php
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
patching file user_admin.php
patching file utilities.php
[root@cacti cacti-0.8.7e]#



[root@cacti cacti-0.8.7e]# mysql -u root -p cacti < pa.sql
Enter password:
[root@cacti cacti-0.8.7e]#



Cacti 위치를 다시 지정한다.


경로를 재지정 하지 않으면, 위 그림처럼 경로가 엉켜서 글씨가 깨지고 이미지가 나오지 않고 에러 메시지만 잔뜩 보게 된다.

이제 아래처럼 경로를 지정하면 그림도 제대로 나오게 되며, 경로가 올바르게 나오게 될것입니다.


[root@cacti cacti-0.8.7e]# vi ./include/global.php
.... 생략 ....
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at
http://serverip/cacti/ this
   would be set to /cacti/
*/

$config['url_path'] = '/';

define('URL_PATH', $config['url_path']);

/* Include configuration */
include(dirname(__FILE__) . "/config.php");

if (isset($config["cacti_version"])) {
        die("Invalid include/config.php file detected.");
        exit;
}
.... 생략 ....


위와 같이 파일이 열릴 것이다. 이 때 56번째 줄에 있는 $config['url_path'] = '/'; 를
$config['url_path'] = '/cacti/'; 로 변경한다.


... 생략 ...
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at
http://serverip/cacti/ this
   would be set to /cacti/
*/

$config['url_path'] = '/cacti/';

define('URL_PATH', $config['url_path']);

/* Include configuration */
include(dirname(__FILE__) . "/config.php");

if (isset($config["cacti_version"])) {
        die("Invalid include/config.php file detected.");
        exit;
}
... 생략 ...


그리고 변경 된 내용을 저장하고 나온다.




위와 같이 변경 된 것을 확인 할 수 있다.




STEP 5.

Plugin Arcitecture(PA) 설치는 끝났다고 볼 수 있으나 현재 플러그인이 나오는지 확인 할 방법이 없다.

이제 플러그인이 제대로 나오도록 마지막 세팅을 하면 되겠다.


위 그림처럼 User Management를 클릭하면 사용자 계정을 볼 수 있다.




위 그림처럼 화면이 나오면, admin을 클릭한다.




Plugin Management를 체크하고 [SAVE]를 하면 Plugin을 사용 할 수 있는 기반이 이뤄졌다고 볼 수 있다.

위에 언급 했던 http://cactiusers.org/index.php 에 가면 수 많은 플러그인들이 존재하며 Plugin Architecture(PA)를

설치하였기 때문에 수 많은 Plugin을 용도에 맞게 설치 할 수 있다고 생각된다.




Plugin Architecture(PA)가 설치 되었기 때문에 Plugin Management를 클릭하면 위 그림과 같이 설치 된 플러그인을 확인 할 수 있고, Install 및 Uninstall 그리고 Enable 및 Disable 시킬 수 있다.
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





cacti-0.8.7c 게시물과 내용은 거의 비슷하다.
몇가지 빠진것 외에 내용은 다른 것 없으니 아무 글이나 보고 설치 하기 바란다.

Cacti를 0.8.7e 버전으로 새로 설치하고, 거기에 Plugin을 설치 할 계획이다.
0.8.7d 버전에서 Plugin을 설치하고 대강 테스트를 해본 결과 Cacti가 상당히 여러가지의
성능을 갖게 되는게 설치만 하면 바로 연동되어 편리함이 많았다.



STEP 1. Cacti를 다시 받는다.

[root@cacti download]# pwd
/download
[root@cacti download]# lfpget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz

다운 받은 Cacti 파일을 압축을 푼다.

[root@cacti download]# tar xvfz cacti-0.8.7e.tar.gz
cacti-0.8.7e/
cacti-0.8.7e/data_input.php
cacti-0.8.7e/graphs_new.php
cacti-0.8.7e/color.php
cacti-0.8.7e/install/
cacti-0.8.7e/install/0_8_7d_to_0_8_7e.php
cacti-0.8.7e/install/0_8_6f_to_0_8_6g.php
cacti-0.8.7e/install/install_finish.gif
cacti-0.8.7e/install/0_8_6g_to_0_8_6h.php
cacti-0.8.7e/install/index.php
cacti-0.8.7e/install/0_8_7b_to_0_8_7c.php
cacti-0.8.7e/install/0_8_7a_to_0_8_7b.php
cacti-0.8.7e/install/0_8_7_to_0_8_7a.php
cacti-0.8.7e/install/0_8_4_to_0_8_5.php
cacti-0.8.7e/install/0_8_3_to_0_8_4.php
cacti-0.8.7e/install/0_8_6c_to_0_8_6d.php
... 생략 ...
cacti-0.8.7e/scripts/ss_host_disk.php
cacti-0.8.7e/scripts/loadavg.pl
cacti-0.8.7e/scripts/ss_sql.php
cacti-0.8.7e/scripts/linux_memory.pl
cacti-0.8.7e/scripts/loadavg_multi.pl
cacti-0.8.7e/scripts/3com_cable_modem.pl
cacti-0.8.7e/scripts/weatherbug.pl
cacti-0.8.7e/scripts/ping.pl
cacti-0.8.7e/scripts/unix_users.pl
cacti-0.8.7e/scripts/query_host_partitions.php
cacti-0.8.7e/scripts/sql.php
cacti-0.8.7e/scripts/unix_tcp_connections.pl
cacti-0.8.7e/scripts/query_unix_partitions.pl
cacti-0.8.7e/user_admin.php
cacti-0.8.7e/graph_templates.php
cacti-0.8.7e/log/
cacti-0.8.7e/log/.htaccess
cacti-0.8.7e/log/.placeholder
cacti-0.8.7e/log/cacti.log
cacti-0.8.7e/settings.php
cacti-0.8.7e/graph_templates_inputs.php
cacti-0.8.7e/host_templates.php

[root@cacti download]#

[root@cacti download]# cd cacti-0.8.7e
[root@cacti cacti-0.8.7e]# ls
about.php                color.php           graph_image.php             graph_templates_items.php  include     poller_commands.php  scripts               user_admin.php
auth_changepassword.php  data_input.php      graph.php                   graph_templates.php        index.php   poller_export.php    script_server.php     utilities.php
auth_login.php           data_queries.php    graph_settings.php          graph_view.php             install     poller.php           script_server.pl
cacti.sql                data_sources.php    graphs_items.php            graph_xport.php            lib         README               settings.php
cdef.php                 data_templates.php  graphs_new.php              host.php                   LICENSE     resource             templates_export.php
cli                      docs                graphs.php                  host_templates.php         log         rra                  templates_import.php
cmd.php                  gprint_presets.php  graph_templates_inputs.php  images                     logout.php  rra.php              tree.php
[root@cacti cacti-0.8.7e]#








STEP 2.

이전 버전과 다르게 0.8.7e 에는 데이터베이스가 있었다.

그래서 Cacti 데이터베이스 접근권한을 설정하는 것부터 시작한다.

[root@cacti cacti-0.8.7e]# mysql mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43679
Server version: 5.0.75-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'kreonet1.618';
Query OK, 0 rows affected (0.03 sec)

mysql>



mysql 권한 설정 후 권한 재설정 사항을 적용하기 위해서 flush privilesges; 명령어를 수행한 것이다.

위의 기본제공되는 cacti.sql 파일을 mysql에 저장하였다. 저장된 mysql 데이터베이스를 아래와 같이 확인 해 본다.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cacti              |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.03 sec)

mysql>


mysql> use cacti
Database changed
mysql> show tables;
+--------------------------------+
| Tables_in_cacti                |
+--------------------------------+
| cdef                           |
| cdef_items                     |
| colors                         |
| data_input                     |
| data_input_data                |
| data_input_fields              |
| data_local                     |
| data_template                  |
| data_template_data             |
| data_template_data_rra         |
| data_template_rrd              |
| graph_local                    |
| graph_template_input           |
| graph_template_input_defs      |
| graph_templates                |
| graph_templates_gprint         |
| graph_templates_graph          |
| graph_templates_item           |
| graph_tree                     |
| graph_tree_items               |
| host                           |
| host_graph                     |
| host_snmp_cache                |
| host_snmp_query                |
| host_template                  |
| host_template_graph            |
| host_template_snmp_query       |
| plugin_config                  |
| plugin_db_changes              |
| plugin_hooks                   |
| plugin_realms                  |
| plugin_thold_contacts          |
| plugin_thold_log               |
| plugin_thold_template_contact  |
| plugin_thold_threshold_contact |
| poller                         |
| poller_command                 |
| poller_item                    |
| poller_output                  |
| poller_reindex                 |
| poller_time                    |
| rra                            |
| rra_cf                         |
| settings                       |
| settings_graphs                |
| settings_tree                  |
| snmp_query                     |
| snmp_query_graph               |
| snmp_query_graph_rrd           |
| snmp_query_graph_rrd_sv        |
| snmp_query_graph_sv            |
| thold_data                     |
| thold_template                 |
| user_auth                      |
| user_auth_perms                |
| user_auth_realm                |
| user_log                       |
| version                        |
| weathermap_auth                |
| weathermap_data                |
| weathermap_maps                |
| weathermap_settings            |
+--------------------------------+
62 rows in set (0.00 sec)

mysql>
mysql> quit
Bye
[root@cacti cacti-0.8.7e]#



STEP 3.

기본 데이터 베이스를 확인한 다음 Cacti의 접속 환경설정 php 파일을 수정한다.

[root@cacti cacti-0.8.7e]# vi include/config.php
<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2009 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDTool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 |
http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
$database_port = "3306";

/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";

?>

아래와 같이 수정했다.

<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2009 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDTool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 |
http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "여기에 패스워드를 입력";
$database_port = "3306";

/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";

?>


데이터파일과 로그파일이 저장될 디렉토리의 퍼미션을 변경한다.

[root@cacti cacti-0.8.7e]# chmod 777 rra log
[root@cacti cacti-0.8.7e]#



웹서버 디렉토리 안에 cacti 디렉토리를 심볼릭링크를 건다.

[root@cacti cacti-0.8.7e]# ln -s /download/cacti-0.8.7e /usr/local/server/apache/htdocs/cacti
[root@cacti cacti-0.8.7e]#




STEP 4.

RRDtool을 설치해야 한다. 필자가 써 놓은 RRDtool 설치를 보고 RRDtool을 먼저 설치한다.




STEP 5.

웹브라우저를 이용하여 cacti 링크를 걸어둔 URL로 접속한다.

블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,








계속 업그레이드 되기 때문에 Weathermap을 설치 하기 위해서 백업용으로 올려둠.




블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,