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 시킬 수 있다.
블로그 이미지

쭈꾸댕이

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

,