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로 접속한다.
'Cacti > Network Weathermap' 카테고리의 다른 글
Cacti 서버에 php-weathermap 설치(Plugin 설치) (0) | 2009.08.21 |
---|---|
cacti-0.8.7e 세팅 및 Plugin 설치를 위한 Plugin Architecture(PA) 설치 (0) | 2009.08.21 |
cacti-0.8.7e.tar.gz 와 cacti-plugin-0.8.7e-PA-v2.5.zip 그리고 php-weathermap-0.95b.zip (0) | 2009.08.20 |