'전체보기'에 해당되는 글 162건







 

◎ CPU의 속도(클럭속도)

예) Pentium 100MHz, Pentium4 2.4GHz

 

◎ CPU의 FSB(세스템버스클럭)

CPU와 RAM 사이의 입출력을 위한 선로의 폭으로써 단위는 MHz를 사용하며,

수치가 높을 수록 좋은 사양의 CPU이다.

 

◎ L1캐시/L2캐시의 용량과 속도

CPU 내부에서 RAM에서 들어오는 INPUT 정보와 OUTPUT 정보의 속도가

CPU 속도에 미치지 못하기 때문에 이 때 차이나는 속도를 보완하고자

들어가는 메모리를 캐시라 하는데 가격이 비싼 단점이 있다.

즉, 수치가 높을수록 좋은 사양.

 

◎ CPU공정율

트랜지스터와 트랜지스터 사이에 도선의 길이를 공정이라 하는데

단위는 nm로 표기하며, 선로가 적을수록 트랜지스터 더 많이 들어가는 이점과

전력 손실이 적다는 것 이외에 수 많은 장점을 갖고 있다.

공정율의 경우 선로가 짧을 수록 장점이 있기 때문에 수치가 적을수록

좋은 사양의 CPU이다.

 

◎ CPU 타입

소켓 타입으로 핀의 갯수를 뜻하며 LGA775 이상의 경우 면접촉으로 핀이 없다.

 

◎ CPU 내외부 처리 BIT

286 컴퓨터는 내부 연산 처리가 16BIT 였으며, 386 이후 컴퓨터 부터는 32BIT 이다.

현재 32/64 BIT 호환 가능한 CPU가 출시 되고 있으나 응용프로그램 및 운영체제가

마땅하지 않아 32BIT를 사용중이다.

 

◎ 듀얼코어여부

연산을 분산처리 하기 때문에 자원 활용면이 뛰어나기 때문에 듀얼코어인 CPU가

싱글코어 CPU보다 좋다.

 

'PC 관련 팁' 카테고리의 다른 글

USB , IEEE1394  (0) 2009.04.01
Mainboard 제조사  (0) 2009.04.01
확장슬롯의 변천사  (0) 2009.04.01
사운드에서 채널이라 하는 것  (0) 2009.04.01
오버클럭킹  (0) 2009.04.01
블로그 이미지

쭈꾸댕이

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

,





crond 데몬 /etc/rec.d/init.d/crond 스크립트에 의해 시작, 종료,재시작될 수 있다

기본 명령의 위치 :/user/bin/crontab

 =>아무곳에서도 실행 가능 함 등록,수정, 보기



 

사용형식

crontab [ -u 사용자 id] 파일

crontab [-u 사용자 id] { -l | -r | -e}


 

crontab -l : 예약된 작업리스트

crontab -e : 예약된 작업 수정

crontab -r : 예약된 작업 삭제



 

crond 실행 확인

=> ps -ef | grep crond



 

crond 시작

=> /etc/rc.d/init.d/crond start{restart | stop}


 

일반사용자에게 crontab 명령어 사용하도록 설정 허가

=> /etc/cron.allow 여기에 ID 등록


 

일반사용자의 crontab 명령어사용을 제한하고자 한다면

=>/etc/cron.deny  에 ID를 등록

즉,

=> /etc/cron.allow : 허용할 사용자 ID 목록
=> /etc/cron.deny  : 거부할 사용자 ID 목록

cron.allow 파일이 있으면 이 파일에 들어있는 ID만 사용 가능
cron.deny  파일이 있으면 이 파일에 들어있는 ID는 사용 불가

따라서 cron.deny에 truefeel ID를 추가해주면 됩니다.



 

등록 내용 설정

"분,시,일,월,요일, 실행명령" 순으로 설정



 

crontab 파일 형식
------    --------  ---------------------------------------------------
필  드    의  미    범  위
------    --------  ---------------------------------------------------
첫번째    분        0-59
두번째    시        0-23
세번째    일        0-31
네번째    월        1-12
다섯번째  요일      0-7 (0 또는 7=일요일, 1=월, 2=화,...)
여섯번째  명령어    실행할 명령을 한줄로 쓴다.
------    --------  ---------------------------------------------------

- 한 줄당 하나의 명령 (두줄로 나눠서 표시할 수 없음)
- # 으로 시작하는 줄은 실행하지 않는다 (주석)

 

 

crontab -e 을 하면 vi 에디터가 나온다.(환경변수 EDITOR에 따라 다른 에디터를 사용할 수 있다.)


  $ crontab -e
  # /home 디렉토리를 /BACKUP/home 으로 백업해둠
  # 30분, 새벽 4시와 낮 12시, 모든 일, 모든 월, 모든 요일
  30 4,12 * * *  /usr/bin/rsync -avxH --delete /home /BACKUP/home > /dev/null 2>&1

  # 파일/디렉토리 퍼미션 설정
  # 40분, 새벽 1시, 매주 일요일
  40 1    * * 0  /root/bin/perm_set.sh   > /dev/null 2>&1


  # 20분마다 실행

  */20 * * * * /shell/mrtg


 

위는 매일 4:30분과 12:30분에 rsync 명령을, 매주 일요일 1:40분에 perm_set.sh를 실행함을 의미한다.

vi 에디터를 통해 설정을 하므로 중요한 몇 가지 에디터 사용법은 익혀야 한다.

----  -----------------------------------------------------------------------------
키    의미
----  -----------------------------------------------------------------------------
i     현재 칸에 글을 넣는다.
o     다음줄에 글을 넣는다.
dd    한줄을 삭제한다.
:wq   저장하고 빠져나온다.
ESC   설정중에 명령어 모드(위의 i, o, dd 등을 사용할 수 있는 상태)로 빠져 나온다.
----  -----------------------------------------------------------------------------


설정 예

시간 설정에서 몇가지 의미있는 것들을 알아보자.

- '*'표시는 해당 필드의 모든 시간을 의미한다.
- 3,5,7 와 같이 콤마(,)로 구분하여 여러 시간대를 지정할 수 있다.
- 2-10와 같이 하이픈(-)으로 시간 범위도 지정할 수 있다.
- 2-10/3와 같이 하이픈(-)으로 시간 범위를 슬래쉬(/)로 시간 간격을 지정할 수 있다.
  (2~10까지 3간격으로. 즉, 3,6,9를 의미함)

=>  > /dev/null  2>&1 이 무슨 뜻입니까?
  지정한 명령어 처리 결과와 발생할지 모르는 에러메시지를 출력하지 않고 모두 버린다는(/dev/null)는
  뜻입니다. 만약 결과와 에러를 파일로 저장하려면 /dev/null 대신 파일명을 적어주면 됩니다.


 

예)

20  2     *  *  6  명령어 => 매주 토요일 새벽 2:20

0  4-6   *  *  *  명령어 => 매일 오후 4,5,6시

5  */2 *  *  * 명령어 => 매일 2시간간격으로 5분대에

15  1   1  *  *  명령어 => 매월 1일 새벽 1:15

30  0   1  1,7  *  명령어 => 1,7월 1일 새벽 0:30


 

10 2 * * * /app11/minsang/APP/ldap/run.sh > /app11/minsang/APP/ldap/cron_error.log
55 13 * * * /run.sh > /mail_cron_error.log
0,30 8-19 * * * /sendAdmin.sh > /cron_admin_error.log



출처 : http://program.egloos.com/802690




블로그 이미지

쭈꾸댕이

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

,





처음에 외부에서 인증 그래프를 보기 위해서 내심 고민을 하고 있었다.

소스를 처음부터 손대기에는 실력부족과 시간이 너무 많이 걸릴 것 같아서 Cacti 홈페이지를 검색하다가

Cacti-0.8.7 이전 버전은 인증 없이 접근이 가능하지만, Cacti-0.8.7 이상의 버전은 인증 없이 접근이 불가능 하게

패치를 한 문구를 확인 할 수 있었다.




그래서 내가 근무하는 곳에서는 Cacti-0.8.6j로 Cacti만 재설치하여 아래 스샷과 같이 그래프를 볼 수 있었다.



현재 테스트 서버로 웹 방화벽과 snmp 포트를 열어 둔 상태이며, 4대의 장비의 정보를 긁어와서

살아있는 인터페이스 모두를 보이게 설정을 해 놓았다.



외부에서 인증 없이 접근하는 방법으로 고민하지 말고, Cacti-0.8.6 버전을 설치한다.

보안을 생각한다면 Cacti-0.8.7 이후의 버전을 설치하도록 한다.


블로그 이미지

쭈꾸댕이

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

,





Cacti에 Cisco 장비가 아닌 Force10 장비를 추가로 등록하고, 등록 된 장비의 인터페이스의 트래픽을

그래프로 그리는 과정에 대해서 설명을 할 예정이다.

필자도 서버를 막 설치하며, 개인적으로 공부를 하는 중간에 설명하는 것이기 때문에 부족한 부분이 많으리라 생각된다.

하지만 일단 그래프까지 설정을 완료하였으니 그것에 만족하며, 등록하는 방법에 대해 정리해 보도록 하겠다.



STEP 1.

우선 좌측 상단에 Concole 버튼을 누른 후 Devices를 클릭하면 아래와 같은 화면을 볼 수 있다.


여기에서 붉은색 상자로 표시 한 부분의 Add를 클릭한다.

그러면 장비를 추가 할 수 있는 화면으로 바뀌게 된다.


Description에 추가할 장비 이름을 입력한다.

Hostname에 hostname이나 IP 주소를 입력한다. (필자의 경우 IP 주소를 입력 하였다.)

Host Template 의 경우 None이 기본으로 되어 있으며, Cisco Router의 경우 Cisco Router를 체크하면 되며
필자의 경우에는 Force10 장비를 추가하기 때문에 Generic SNMP-enabled Host라고 체크하였다.
(Cisco Router로 체크해도 그래프 생성이 되었으며, Generic SNMP-enabled Host로 체크해도 되었다.)

SNMP Options에서 Version2로 체크 한다.

SNMP Community는 Localhost의 경우 public 이었기 때문에 public으로 적었을 뿐 추가 할 장비의 Community와
동일하게 맞춰준다. (필자의 경우 다르게 입력을 하였다.)




마지막으로 하단에 있는 create 버튼을 클릭하면 생성되게 된다.



위와 같이 장비가 등록 된 것을 확인 할 수 있다.



STEP 2.

좌측 상단에 Create에 보면 New Graphs를 클릭하면 Host를 선택하는 칸이 있다.

여기에서 내가 설정하고 싶은 장비를 선택한다.


장비의 인터페이스가 나오게 된다.

그러면 그래프를 추가 할 인터페이스의 우측 체크 박스를 이용하여 체크를 해 준 후 create를 해 주면 장비에서

내가 필요로 하는 인터페이스가 추가 된다.





체크 박스에서 체크 한 후 create를 눌러 추가 한 경우에는 아래 스샷과 같이 체크박스가 사라진 후

회색으로 글씨가 변경 되는 것을 확인 할 수 있다.





STEP 3.

올바르게 설정을 한 것 같은데 graphs를 보면 엑박을 띄우게 될 것이다.

필자도 이것 때문에 고민을 많이 했었다.

내가 알아낸 방법으로는 Data Sources 부분에 Maximum Value 값이 기본적으로 앞에 = 문자열을 포함하였다.

붉은 상자에 표시 된 부분처럼 = 4294967295 와 같이 된 부분에 =를 제거 하고 4294967295 숫자만 입력하면 되었다.

rrd 파일을 생성하는 과정에서 입력 서식이 틀린것으로 예상된다.

자세한 소스코드까지는 필자도 아직 확인하지 못한 상태이다.





STEP 4.

상단 좌측에 있는 graphs 버튼을 클릭하고 데몬이 5분 간격으로 실행되게 설정 해 두었으므로..

시간을두고 확인하면 조금씩 그래프가 그려지는 것을 확인 할 수 있다.






STEP 5.

장비에서 긁어온 정보 그대로 그래프로 표시해 주기 때문에 그래프 이름이 모두 같은 것을 확인 할 수 있다.

그래서 필자가 설정을 확인해보니 Management에 있는 Graph Management를 선택 한다.


모두 같은 이름으로 되어있고, 그래프를 볼 때 어떤 인터페이스인지 확인은 가능하겠지만 보기 불편하다.

이중에 변경할 인터페이스를 클릭한다.


아래 스샷과 같은 페이지를 띄우며 붉은색 상자로 표시 한 부분에 이름을 수정하면 그래프의 이름이 변경되게 된다.

|host_description| 이라고 된 부분은 장비의 이름을 불러오는 것이므로 필자처럼 넣어도 되고,

|host_description| 부분 없이 관리자가 넣고 싶은 이름을 넣어도 된다.



아래 스샷과 같이 붉은 상자부분의 인터페이스를 표시하는 부분이 변경 된 것을 확인 할 수 있다.

블로그 이미지

쭈꾸댕이

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

,





STEP 1.

좌측 상단의 New Graphs를 클릭하고 우측 체크박스를 모두 체크하고 create 버튼을 클릭하여 그래프를 생성한다.


create를 누르면 아래 그림과 같이 변경 된 화면을 볼 수 있다.


아래 스샷처럼 Data Sources를 클릭하면 생성한 내용을 볼 수 있다.






STEP 2.

net-snmp와 RRDTool의 버전을 선택한다.

아래 스샷처럼 Confgiuration 에서 Settings를 클릭하면 아래와 같은 내용을 볼 수 있다.

net-snmp를 5.x 버전으로 RRDTool을 1.2.x 버전으로 체크 해 준후 화면 하단에 있는 save를 클릭하여 저장한다.





STEP 3.

contab을 이용하여 5분마다 그래프를 생성하도록 crontab에 poller.php 스크립트를 추가한다.

[root@Cacti cacti-0.8.7c]# crontab -e
*/5 * * * * /usr/local/server/php/bin/php /download/cacti-0.8.7c/poller.php > /dev/null 2>&1


상단의 graphs 버튼을 클릭하여 아래와 같은 정보를 그래프로 볼 수 있다.

블로그 이미지

쭈꾸댕이

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

,

Cacti 세팅

Cacti/Cacti 설치 2009. 2. 17. 10:35






위 스샷은 Cacti를 설치 한 후 웹서버에서 Cacti를 구동한 첫 페이지 이다.





STEP 1.

next를 클릭하면 RRDTool의 실행파일 과 php 실행 파일을 입력할 것이다.


New Install 상태에서 next를 클릭한다.




위와 같은 화면이 뜨면 RRDTool 경로와 PHP 경로를 올바른 경로로 바꿔준다.

필자의 경우 RRDTool Binary Path를 /usr/local/server/rrdtool/bin/rrdtool로

PHP Binary Path를 /usr/local/server/php/bin/php로 변경 하였다.





STEP 2.

user name과 password를 입력하여 cacti를 실행시켜보도록 하겠다.


위 그림과 같이 로그인 패이지에서 admin 유저와 admin 패스워드를 입력하여 로그인 한 다음에

패스워드를 변경하면 이 후 변경한 패스워드로 접속 할 수 있다.


위 스샷과 같이 패스워드를 변경 하였다.



아래 스샷과 같이 화면이 뜬다면 기본 세팅은 끝이나게 된다.




STEP 3.

Localhost를 등록 해보겠다.

좌측의 Management에 있는 Devices를 클릭 해 본다.


위와 같은 스샷 같이 모니터에 나올 것이다.

이 때 Localhost라고 되어 있는 부분을 클릭한다.





SNMP Options에서 Version 2로 세팅을 한다.

이후 아래와 같은 스샷으로 창이 변경 될 것이다. SNMP Community를 public으로 설정하고 저장한다.





Localhost의 Devices를 클릭하면 웹페이지 상단에 아래와 같은 그림이 뜨면 된다.

블로그 이미지

쭈꾸댕이

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

,

Cacti 설치

Cacti/Cacti 설치 2009. 2. 16. 18:00





cacti는 RRDTool의 데이터베이스를 이용하여 웹에서 시스템 상황을 데이터값으로 저장하고 시간이 흐른 뒤

저장된 데이터를 분석하여 웹상으로 보여주는 모니터링 시스템이다.

cacti는 php를 기반으로 하므로 php가 설치되어 있어야하며, CentOS 설치부터 따라하셨다면 설치가 될 것이다.



STEP 1.

Cacti 다운 받는다.

[root@Cacti download]# pwd
/download
[root@Cacti download]# lftpget http://www.cacti.net/downloads/cacti-0.8.7c.tar.gz


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

[root@Cacti download]# tar xvfz cacti-0.8.7c.tar.gz                                
..... 생략 ......
cacti-0.8.7c/include/jscalendar/lang/calendar-no.js
cacti-0.8.7c/include/jscalendar/lang/calendar-de.js
cacti-0.8.7c/include/jscalendar/lang/calendar-cs-utf8.js
cacti-0.8.7c/include/jscalendar/lang/calendar-big5-utf8.js
cacti-0.8.7c/include/jscalendar/lang/calendar-zh.js
cacti-0.8.7c/include/jscalendar/lang/calendar-en.js
cacti-0.8.7c/include/jscalendar/lang/calendar-hr-utf8.js
cacti-0.8.7c/include/jscalendar/lang/calendar-sp.js
cacti-0.8.7c/include/jscalendar/lang/calendar-ko-utf8.js
cacti-0.8.7c/include/jscalendar/lang/calendar-hu.js
cacti-0.8.7c/include/jscalendar/lang/calendar-hr.js
cacti-0.8.7c/include/jscalendar/lang/calendar-pl.js
cacti-0.8.7c/include/jscalendar/lang/calendar-jp.js
cacti-0.8.7c/include/jscalendar/lang/calendar-cs-win.js
cacti-0.8.7c/include/jscalendar/lang/calendar-lt-utf8.js
cacti-0.8.7c/include/jscalendar/lang/calendar-el.js
cacti-0.8.7c/include/jscalendar/lang/calendar-sv.js
cacti-0.8.7c/include/jscalendar/lang/calendar-ko.js
cacti-0.8.7c/include/jscalendar/lang/calendar-bg.js
cacti-0.8.7c/include/jscalendar/lang/calendar-he-utf8.js
cacti-0.8.7c/include/jscalendar/lang/calendar-sk.js
cacti-0.8.7c/include/jscalendar/lang/calendar-al.js
cacti-0.8.7c/include/jscalendar/lang/calendar-da.js
cacti-0.8.7c/include/jscalendar/lang/calendar-ro.js
cacti-0.8.7c/include/config.php
cacti-0.8.7c/include/main.css
cacti-0.8.7c/include/global_settings.php
cacti-0.8.7c/include/layout.js
cacti-0.8.7c/include/global_constants.php
cacti-0.8.7c/include/zoom.js
cacti-0.8.7c/include/global_arrays.php
cacti-0.8.7c/include/top_header.php
cacti-0.8.7c/include/bottom_footer.php
cacti-0.8.7c/include/global.php
cacti-0.8.7c/rra/
cacti-0.8.7c/rra/.placeholder
cacti-0.8.7c/graphs_new.php
cacti-0.8.7c/scripts/
cacti-0.8.7c/scripts/ss_sql.php
cacti-0.8.7c/scripts/query_host_cpu.php
cacti-0.8.7c/scripts/ping.pl
cacti-0.8.7c/scripts/loadavg.pl
cacti-0.8.7c/scripts/loadavg_multi.pl
cacti-0.8.7c/scripts/unix_users.pl
cacti-0.8.7c/scripts/unix_processes.pl
cacti-0.8.7c/scripts/weatherbug.pl
cacti-0.8.7c/scripts/query_host_partitions.php
cacti-0.8.7c/scripts/sql.php
cacti-0.8.7c/scripts/diskfree.sh
cacti-0.8.7c/scripts/diskfree.pl
cacti-0.8.7c/scripts/linux_memory.pl
cacti-0.8.7c/scripts/unix_tcp_connections.pl
cacti-0.8.7c/scripts/webhits.pl
cacti-0.8.7c/scripts/ss_host_disk.php
cacti-0.8.7c/scripts/ss_host_cpu.php
cacti-0.8.7c/scripts/query_unix_partitions.pl
cacti-0.8.7c/scripts/3com_cable_modem.pl
cacti-0.8.7c/scripts/ss_fping.php
cacti-0.8.7c/auth_login.php
cacti-0.8.7c/cdef.php
cacti-0.8.7c/poller_export.php
[root@Cacti download]#

[root@Cacti download]# cd cacti-0.8.7c
[root@Cacti cacti-0.8.7c]# 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.7c]#




STEP 2.

Cacti 데이터 파일을 저장하기 위해 mysql에 데이터베이스를 생성한다.

[root@Cacti cacti-0.8.7c]# mysqladmin create cacti -u root -p
Enter password:
[root@Cacti cacti-0.8.7c]#


Cacti 데이터베이스에 필요한 테이블과 기본 데이터 생성하기

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



Cacti 데이터베이스 접근권한을 설정한다.

[root@Cacti cacti-0.8.7c]# mysql mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
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 '여기에 패스워드를 입력';
Query OK, 0 rows affected (0.05 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>


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

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

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cacti              |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.01 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  |
| 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       |
| user_auth                 |
| user_auth_perms           |
| user_auth_realm           |
| user_log                  |
| version                   |
+---------------------------+
48 rows in set (0.00 sec)

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




STEP 3.

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

[root@Cacti cacti-0.8.7c]# vi include/config.php
<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2008 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-2008 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.7c]# chmod 777 rra log
[root@Cacti cacti-0.8.7c]#




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

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




STEP 4.

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




STEP 5.

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




블로그 이미지

쭈꾸댕이

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

,

RRDtool 설치

Cacti/RRDtool 2009. 2. 16. 17:30





RRDtool은 모니터링 시스템으로 쉽게 말해 고정된 양의 테이프 같은 매체에 반복적으로 저장을 한다고 볼 수 있다.

처음 데이터가 축적 될 때는 실제 값에 가깝지만 시간이 지나면 일정한 간격으로 데이터를 평균 값을 갖기 때문에

근사치에 가까운 값으로 저장되는 것을 알 수 있다.




STEP 1.

RRDtool을 설치하기에 앞서 필요한 패키지가 있다.

libart_lgpl
libart_lgpl-devel
zlib
zlib-devel
libpng
libpng-devel
freetype
freetype-devel
net-snmp-perl
net-snmp-libs
net-snmp
net-snmp-devel
net-snmp-utils




아래 목록을 확인하면 위의 패키지는 yum을 통해서 설치를 한다.

[root@Cacti download]# yum -y install libart_lgpl libart_lgpl-devel zlib zlib-devel libpng libpng-devel freetype freetype-devel net-snmp-perl net-snmp-libs net-snmp net-snmp-devel net-snmp-utils
Setting up Install Process
Parsing package install arguments
Package libart_lgpl - 2.3.17-4.i386 is already installed.
Package zlib - 1.2.3-3.i386 is already installed.
Package zlib-devel - 1.2.3-3.i386 is already installed.
Package libpng - 2:1.2.10-7.1.el5_0.1.i386 is already installed.
Package libpng-devel - 2:1.2.10-7.1.el5_0.1.i386 is already installed.
Package freetype - 2.2.1-20.el5_2.i386 is already installed.
Package freetype-devel - 2.2.1-20.el5_2.i386 is already installed.
Package net-snmp-libs - 1:5.3.1-24.el5.i386 is already installed.
No package net-nsmp available.
Resolving Dependencies
--> Running transaction check
---> Package net-snmp-libs.i386 1:5.3.1-24.el5_2.2 set to be updated
---> Package net-snmp-devel.i386 1:5.3.1-24.el5_2.2 set to be updated
--> Processing Dependency: beecrypt-devel for package: net-snmp-devel
--> Processing Dependency: elfutils-devel for package: net-snmp-devel
--> Processing Dependency: net-snmp = 1:5.3.1 for package: net-snmp-devel
---> Package net-snmp-perl.i386 1:5.3.1-24.el5_2.2 set to be updated
--> Processing Dependency: libsensors.so.3 for package: net-snmp-perl
---> Package net-snmp-utils.i386 1:5.3.1-24.el5_2.2 set to be updated
---> Package libart_lgpl-devel.i386 0:2.3.17-4 set to be updated
--> Running transaction check
---> Package elfutils-devel.i386 0:0.125-3.el5 set to be updated
--> Processing Dependency: elfutils-devel-static = 0.125-3.el5 for package: elfutils-devel
---> Package beecrypt-devel.i386 0:4.1.2-10.1.1 set to be updated
---> Package lm_sensors.i386 0:2.10.0-3.1 set to be updated
---> Package net-snmp.i386 1:5.3.1-24.el5_2.2 set to be updated
--> Running transaction check
---> Package elfutils-devel-static.i386 0:0.125-3.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 libart_lgpl-devel       i386       2.3.17-4         base               20 k
 net-snmp-devel          i386       1:5.3.1-24.el5_2.2  updates           1.8 M
 net-snmp-perl           i386       1:5.3.1-24.el5_2.2  updates           195 k
 net-snmp-utils          i386       1:5.3.1-24.el5_2.2  updates           182 k
Updating:
 net-snmp-libs           i386       1:5.3.1-24.el5_2.2  updates           1.2 M
Installing for dependencies:
 beecrypt-devel          i386       4.1.2-10.1.1     base              160 k
 elfutils-devel          i386       0.125-3.el5      base               52 k
 elfutils-devel-static   i386       0.125-3.el5      base               78 k
 lm_sensors              i386       2.10.0-3.1       base              494 k
 net-snmp                i386       1:5.3.1-24.el5_2.2  updates           698 k

Transaction Summary
=============================================================================
Install      9 Package(s)        
Update       1 Package(s)        
Remove       0 Package(s)        

Total download size: 4.9 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : net-snmp-libs                ####################### [ 1/11]
  Installing: lm_sensors                   ####################### [ 2/11]
  Installing: net-snmp                     ####################### [ 3/11]
  Installing: beecrypt-devel               ####################### [ 4/11]
  Installing: net-snmp-perl                ####################### [ 5/11]
  Installing: net-snmp-utils               ####################### [ 6/11]
  Installing: libart_lgpl-devel            ####################### [ 7/11]
  Installing: elfutils-devel               ####################### [ 8/11]
  Installing: net-snmp-devel               ####################### [ 9/11]
  Installing: elfutils-devel-static        ####################### [10/11]
  Cleanup   : net-snmp-libs                ####################### [11/11]

Installed: libart_lgpl-devel.i386 0:2.3.17-4 net-snmp-devel.i386 1:5.3.1-24.el5_2.2 net-snmp-perl.i386 1:5.3.1-24.el5_2.2 net-snmp-utils.i386 1:5.3.1-24.el5_2.2
Dependency Installed: beecrypt-devel.i386 0:4.1.2-10.1.1 elfutils-devel.i386 0:0.125-3.el5 elfutils-devel-static.i386 0:0.125-3.el5 lm_sensors.i386 0:2.10.0-3.1 net-snmp.i386 1:5.3.1-24.el5_2.2
Updated: net-snmp-libs.i386 1:5.3.1-24.el5_2.2
Complete!

[root@Cacti download]#





STEP 2.

net-snmp 패키지가 설치 되었으니 아래와 같이 수정을 한다.

[root@Cacti download]# vi /etc/snmp/snmpd.conf
####
# First, map the community name "public" into a "security name"

#       sec.name  source          community
com2sec notConfigUser  default       public

아래와 같이 수정한다.

####
# First, map the community name "public" into a "security name"

#       sec.name  source          community
#com2sec notConfigUser  default       public

com2sec public  default public


####
# Second, map the security name into a group name:

#       groupName      securityModel securityName
group   notConfigGroup v1           notConfigUser
group   notConfigGroup v2c           notConfigUser

역시 아래와 같이 수정한다.

####
# Second, map the security name into a group name:

#       groupName      securityModel securityName
#group   notConfigGroup v1           notConfigUser
#group   notConfigGroup v2c           notConfigUser

group   public  v1      public 
group   public  v2c     public




####
# Third, create a view for us to let the group have rights to:

# Make at least  snmpwalk -v 1 localhost -c public system fast again.
#       name           incl/excl     subtree         mask(optional)
view    systemview    included   .1.3.6.1.2.1.1
view    systemview    included   .1.3.6.1.2.1.25.1.1

아래와 같이 수정한다.

####
# Third, create a view for us to let the group have rights to:

# Make at least  snmpwalk -v 1 localhost -c public system fast again.
#       name           incl/excl     subtree         mask(optional)
#view    systemview    included   .1.3.6.1.2.1.1
#view    systemview    included   .1.3.6.1.2.1.25.1.1

view    all     included        .1


####
# Finally, grant the group read-only access to the systemview view.

#       group          context sec.model sec.level prefix read   write  notif
access  notConfigGroup ""      any       noauth    exact  systemview none none

이것 역시 아래와 같이 수정한다.

####
# Finally, grant the group read-only access to the systemview view.

#       group          context sec.model sec.level prefix read   write  notif
#access  notConfigGroup ""      any       noauth    exact  systemview none none

access  public  ""      any     noauth  exact   all     none    none


설정을 완료하였다면 vi 에디터를 빠져나와 snmpd 데몬을 다시 시작한다.

[root@Cacti download]# /etc/rc.d/init.d/snmpd start
Starting snmpd:                                            [  OK  ]
[root@Cacti download]#




STEP 3.

RRDtool을 다운 받도록 하자.

[root@Cacti download]# lftpget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.23.tar.gz
[root@Cacti download]#

상위 버전으로 설치를 했을 때 변경된 부분의 경로가 바뀌었는지 설치가 되지 않아 1.2.23 버전으로 설치를 하였다.


RRDtool을 설치 할 수 있게 압축을 푼다.

[root@Cacti download]# tar xvfz rrdtool-1.2.23.tar.gz                                 
rrdtool-1.2.23/
rrdtool-1.2.23/doc/
rrdtool-1.2.23/doc/rrdtool-xport.dtd
rrdtool-1.2.23/doc/rrdtool-dump.dtd
rrdtool-1.2.23/doc/rrdtutorial.txt
rrdtool-1.2.23/doc/rrdresize.txt
rrdtool-1.2.23/doc/rrdgraph_data.txt
rrdtool-1.2.23/doc/rrdcreate.txt
rrdtool-1.2.23/doc/rrdlastupdate.txt
rrdtool-1.2.23/doc/rrdlast.txt
rrdtool-1.2.23/doc/rrdgraph.txt
rrdtool-1.2.23/doc/rrdcgi.txt
rrdtool-1.2.23/doc/rrdbuild.txt
rrdtool-1.2.23/doc/rrdtune.txt
rrdtool-1.2.23/doc/rrdinfo.txt
rrdtool-1.2.23/doc/rrd-beginners.txt
rrdtool-1.2.23/doc/rrdtool.txt
rrdtool-1.2.23/doc/rrdgraph_rpn.txt
rrdtool-1.2.23/doc/rrdfirst.txt
rrdtool-1.2.23/doc/rpntutorial.txt
rrdtool-1.2.23/doc/rrdxport.txt
rrdtool-1.2.23/doc/rrdthreads.txt
rrdtool-1.2.23/doc/rrdgraph_graph.txt
rrdtool-1.2.23/doc/rrdfetch.txt
rrdtool-1.2.23/doc/cdeftutorial.txt
rrdtool-1.2.23/doc/rrdupdate.txt
rrdtool-1.2.23/doc/rrdrestore.txt
rrdtool-1.2.23/doc/rrdgraph_examples.txt
rrdtool-1.2.23/doc/rrddump.txt
rrdtool-1.2.23/doc/bin_dec_hex.txt
rrdtool-1.2.23/doc/rrdtutorial.1
rrdtool-1.2.23/doc/rrdresize.1
rrdtool-1.2.23/doc/rrdgraph_data.1
rrdtool-1.2.23/doc/rrdcreate.1
rrdtool-1.2.23/doc/rrdlastupdate.1
rrdtool-1.2.23/doc/rrdlast.1
rrdtool-1.2.23/doc/rrdgraph.1
rrdtool-1.2.23/doc/rrdcgi.1
rrdtool-1.2.23/doc/rrdbuild.1
rrdtool-1.2.23/doc/rrdtune.1
rrdtool-1.2.23/doc/rrdinfo.1
rrdtool-1.2.23/doc/rrd-beginners.1
rrdtool-1.2.23/doc/rrdtool.1
rrdtool-1.2.23/doc/rrdgraph_rpn.1
rrdtool-1.2.23/doc/rrdfirst.1
rrdtool-1.2.23/doc/rpntutorial.1
rrdtool-1.2.23/doc/rrdxport.1
rrdtool-1.2.23/doc/rrdthreads.1
rrdtool-1.2.23/doc/rrdgraph_graph.1
rrdtool-1.2.23/doc/rrdfetch.1
rrdtool-1.2.23/doc/cdeftutorial.1
rrdtool-1.2.23/doc/rrdupdate.1
rrdtool-1.2.23/doc/rrdrestore.1
rrdtool-1.2.23/doc/rrdgraph_examples.1
rrdtool-1.2.23/doc/rrddump.1
rrdtool-1.2.23/doc/bin_dec_hex.1
rrdtool-1.2.23/doc/RRDp.html
rrdtool-1.2.23/doc/RRDs.html
rrdtool-1.2.23/doc/rrdtutorial.html
rrdtool-1.2.23/doc/rrdresize.html
rrdtool-1.2.23/doc/rrdgraph_data.html
rrdtool-1.2.23/doc/rrdcreate.html
rrdtool-1.2.23/doc/rrdlastupdate.html
rrdtool-1.2.23/doc/rrdlast.html
rrdtool-1.2.23/doc/rrdgraph.html
rrdtool-1.2.23/doc/rrdcgi.html
rrdtool-1.2.23/doc/rrdbuild.html
rrdtool-1.2.23/doc/rrdtune.html
rrdtool-1.2.23/doc/rrdinfo.html
rrdtool-1.2.23/doc/rrd-beginners.html
rrdtool-1.2.23/doc/rrdtool.html
rrdtool-1.2.23/doc/rrdgraph_rpn.html
rrdtool-1.2.23/doc/rrdfirst.html
rrdtool-1.2.23/doc/rpntutorial.html
rrdtool-1.2.23/doc/rrdxport.html
rrdtool-1.2.23/doc/rrdthreads.html
rrdtool-1.2.23/doc/rrdgraph_graph.html
rrdtool-1.2.23/doc/rrdfetch.html
rrdtool-1.2.23/doc/cdeftutorial.html
rrdtool-1.2.23/doc/rrdupdate.html
rrdtool-1.2.23/doc/rrdrestore.html
rrdtool-1.2.23/doc/rrdgraph_examples.html
rrdtool-1.2.23/doc/rrddump.html
rrdtool-1.2.23/doc/bin_dec_hex.html
rrdtool-1.2.23/doc/rrdtutorial.pod
rrdtool-1.2.23/doc/rrdresize.pod
rrdtool-1.2.23/doc/rrdgraph_data.pod
rrdtool-1.2.23/doc/rrdcreate.pod
rrdtool-1.2.23/doc/rrdlastupdate.pod
rrdtool-1.2.23/doc/rrdlast.pod
rrdtool-1.2.23/doc/rrdgraph.pod
rrdtool-1.2.23/doc/rrdcgi.pod
rrdtool-1.2.23/doc/rrdbuild.pod
rrdtool-1.2.23/doc/rrdtune.pod
rrdtool-1.2.23/doc/rrdinfo.pod
rrdtool-1.2.23/doc/rrd-beginners.pod
rrdtool-1.2.23/doc/rrdtool.pod
rrdtool-1.2.23/doc/rrdgraph_rpn.pod
rrdtool-1.2.23/doc/rrdfirst.pod
rrdtool-1.2.23/doc/rpntutorial.pod
rrdtool-1.2.23/doc/rrdxport.pod
rrdtool-1.2.23/doc/rrdthreads.pod
rrdtool-1.2.23/doc/rrdgraph_graph.pod
rrdtool-1.2.23/doc/rrdfetch.pod
rrdtool-1.2.23/doc/cdeftutorial.pod
rrdtool-1.2.23/doc/rrdupdate.pod
rrdtool-1.2.23/doc/rrdrestore.pod
rrdtool-1.2.23/doc/rrdgraph_examples.pod
rrdtool-1.2.23/doc/rrddump.pod
rrdtool-1.2.23/doc/bin_dec_hex.pod
rrdtool-1.2.23/doc/Makefile.in
rrdtool-1.2.23/doc/Makefile.am
rrdtool-1.2.23/src/
rrdtool-1.2.23/src/get_ver.awk
rrdtool-1.2.23/src/rrd_thread_safe_nt.c
rrdtool-1.2.23/src/win32comp.c
rrdtool-1.2.23/src/DejaVuSansMono-Roman.ttf
rrdtool-1.2.23/src/strftime.h
rrdtool-1.2.23/src/strftime.c
rrdtool-1.2.23/src/rrdupdate.c
rrdtool-1.2.23/src/rrd_cgi.c
rrdtool-1.2.23/src/rrd_not_thread_safe.c
rrdtool-1.2.23/src/rrd_thread_safe.c
rrdtool-1.2.23/src/rrd_update.c
rrdtool-1.2.23/src/rrd_rpncalc.c
rrdtool-1.2.23/src/rrd_nan_inf.c
rrdtool-1.2.23/src/rrd_open.c
rrdtool-1.2.23/src/rrd_error.c
rrdtool-1.2.23/src/rrd_info.c
rrdtool-1.2.23/src/rrd_format.c
rrdtool-1.2.23/src/rrd_diff.c
rrdtool-1.2.23/src/rrd_hw.c
rrdtool-1.2.23/src/parsetime.c
rrdtool-1.2.23/src/rrd_getopt1.c
rrdtool-1.2.23/src/rrd_getopt.c
rrdtool-1.2.23/src/rrd_tool.c
rrdtool-1.2.23/src/rrd_afm_data.c
rrdtool-1.2.23/src/rrd_afm.c
rrdtool-1.2.23/src/rrd_gfx.c
rrdtool-1.2.23/src/art_rgba_svp.c
rrdtool-1.2.23/src/rrd_xport.c
rrdtool-1.2.23/src/rrd_version.c
rrdtool-1.2.23/src/rrd_tune.c
rrdtool-1.2.23/src/rrd_restore.c
rrdtool-1.2.23/src/rrd_resize.c
rrdtool-1.2.23/src/rrd_first.c
rrdtool-1.2.23/src/rrd_lastupdate.c
rrdtool-1.2.23/src/rrd_last.c
rrdtool-1.2.23/src/rrd_graph_helper.c
rrdtool-1.2.23/src/rrd_graph.c
rrdtool-1.2.23/src/rrd_fetch.c
rrdtool-1.2.23/src/rrd_dump.c
rrdtool-1.2.23/src/rrd_create.c
rrdtool-1.2.23/src/pngsize.c
rrdtool-1.2.23/src/hash_32.c
rrdtool-1.2.23/src/Makefile.in
rrdtool-1.2.23/src/Makefile.am
rrdtool-1.2.23/src/rrd_is_thread_safe.h
rrdtool-1.2.23/src/rrd_afm_data.h
rrdtool-1.2.23/src/rrd_afm.h
rrdtool-1.2.23/src/rrd_graph.h
rrdtool-1.2.23/src/fnv.h
rrdtool-1.2.23/src/rrd_nan_inf.h
rrdtool-1.2.23/src/rrd_rpncalc.h
rrdtool-1.2.23/src/rrd_hw.h
rrdtool-1.2.23/src/rrd_xport.h
rrdtool-1.2.23/src/rrd_tool.h
rrdtool-1.2.23/src/rrd_format.h
rrdtool-1.2.23/src/parsetime.h
rrdtool-1.2.23/src/rrd_getopt.h
rrdtool-1.2.23/src/rrd_gfx.h
rrdtool-1.2.23/src/unused.h
rrdtool-1.2.23/src/art_rgba_svp.h
rrdtool-1.2.23/src/rrd.h
rrdtool-1.2.23/favicon.ico
rrdtool-1.2.23/rrdtool.spec
rrdtool-1.2.23/THREADS
rrdtool-1.2.23/CONTRIBUTORS
rrdtool-1.2.23/WIN32-BUILD-TIPS.txt
rrdtool-1.2.23/CHANGES
rrdtool-1.2.23/COPYRIGHT
rrdtool-1.2.23/missing
rrdtool-1.2.23/ltmain.sh
rrdtool-1.2.23/install-sh
rrdtool-1.2.23/depcomp
rrdtool-1.2.23/config.sub
rrdtool-1.2.23/config.guess
rrdtool-1.2.23/compile
rrdtool-1.2.23/TODO
rrdtool-1.2.23/NEWS
rrdtool-1.2.23/COPYING
rrdtool-1.2.23/configure
rrdtool-1.2.23/rrd_config.h.in
rrdtool-1.2.23/Makefile.in
rrdtool-1.2.23/Makefile.am
rrdtool-1.2.23/aclocal.m4
rrdtool-1.2.23/configure.ac
rrdtool-1.2.23/acinclude.m4
rrdtool-1.2.23/README
rrdtool-1.2.23/win32/
rrdtool-1.2.23/win32/rrd_config.h.msvc
rrdtool-1.2.23/win32/Makefile
rrdtool-1.2.23/win32/rrdtool.vcproj
rrdtool-1.2.23/win32/rrdtool.dsw
rrdtool-1.2.23/win32/rrdtool.dsp
rrdtool-1.2.23/win32/rrd.vcproj
rrdtool-1.2.23/win32/rrd.dsp
rrdtool-1.2.23/win32/config.h
rrdtool-1.2.23/netware/
rrdtool-1.2.23/netware/Makefile
rrdtool-1.2.23/examples/
rrdtool-1.2.23/examples/cgi-demo.cgi.in
rrdtool-1.2.23/examples/stripes.pl.in
rrdtool-1.2.23/examples/shared-demo.pl.in
rrdtool-1.2.23/examples/piped-demo.pl.in
rrdtool-1.2.23/examples/perftest.pl.in
rrdtool-1.2.23/examples/minmax.pl.in
rrdtool-1.2.23/examples/bigtops.pl.in
rrdtool-1.2.23/examples/Makefile.in
rrdtool-1.2.23/examples/Makefile.am
rrdtool-1.2.23/examples/4charts.pl.in
rrdtool-1.2.23/bindings/
rrdtool-1.2.23/bindings/Makefile.in
rrdtool-1.2.23/bindings/Makefile.am
rrdtool-1.2.23/bindings/ruby/
rrdtool-1.2.23/bindings/ruby/test.rb
rrdtool-1.2.23/bindings/ruby/main.c
rrdtool-1.2.23/bindings/ruby/extconf.rb
rrdtool-1.2.23/bindings/ruby/README
rrdtool-1.2.23/bindings/ruby/CHANGES
rrdtool-1.2.23/bindings/python/
rrdtool-1.2.23/bindings/python/setup.py
rrdtool-1.2.23/bindings/python/rrdtoolmodule.c
rrdtool-1.2.23/bindings/python/rrd_extra.h
rrdtool-1.2.23/bindings/python/README
rrdtool-1.2.23/bindings/python/COPYING
rrdtool-1.2.23/bindings/python/AUTHORS
rrdtool-1.2.23/bindings/python/ACKNOWLEDGEMENT
rrdtool-1.2.23/bindings/perl-shared/
rrdtool-1.2.23/bindings/perl-shared/RRDs.xs
rrdtool-1.2.23/bindings/perl-shared/RRDs.pm
rrdtool-1.2.23/bindings/perl-shared/Makefile.PL
rrdtool-1.2.23/bindings/perl-shared/README
rrdtool-1.2.23/bindings/perl-shared/MANIFEST
rrdtool-1.2.23/bindings/perl-shared/ntmake.pl
rrdtool-1.2.23/bindings/perl-shared/t/
rrdtool-1.2.23/bindings/perl-shared/t/base.t
rrdtool-1.2.23/bindings/perl-piped/
rrdtool-1.2.23/bindings/perl-piped/RRDp.pm
rrdtool-1.2.23/bindings/perl-piped/Makefile.PL
rrdtool-1.2.23/bindings/perl-piped/README
rrdtool-1.2.23/bindings/perl-piped/MANIFEST
rrdtool-1.2.23/bindings/perl-piped/t/
rrdtool-1.2.23/bindings/perl-piped/t/base.t
rrdtool-1.2.23/bindings/tcl/
rrdtool-1.2.23/bindings/tcl/tclrrd.c
rrdtool-1.2.23/bindings/tcl/ifOctets.tcl.in
rrdtool-1.2.23/bindings/tcl/Makefile.in
rrdtool-1.2.23/bindings/tcl/Makefile.am
rrdtool-1.2.23/bindings/tcl/README
[root@Cacti download]#




STEP 4.

configure를 한다. tcl, python, ruby와는 연동을 하지 않도록 하고, perl만 연동 하게 설치를 한다.

[root@Cacti download]# cd rrdtool-1.2.23
[root@Cacti rrdtool-1.2.23]# ls
acinclude.m4  CHANGES       config.sub    CONTRIBUTORS  depcomp   favicon.ico  Makefile.am  netware  rrd_config.h.in  THREADS  WIN32-BUILD-TIPS.txt
aclocal.m4    compile       configure     COPYING       doc       install-sh   Makefile.in  NEWS     rrdtool.spec     TODO
bindings      config.guess  configure.ac  COPYRIGHT     examples  ltmain.sh    missing      README   src              win32

[root@Cacti rrdtool-1.2.23]#


[root@Cacti rrdtool-1.2.23]# ./configure --prefix=/usr/local/server/rrdtool --disable-tcl --disable-python --disable-ruby
........... 생략 ...................
checking for ruby... no
checking if ruby modules can be built... No .. Ruby not found or disabled
checking for gnroff... /usr/bin/gnroff
checking for groff... /usr/bin/groff

Apply Configuration Information
configure: creating ./config.status
config.status: creating examples/shared-demo.pl
config.status: creating examples/piped-demo.pl
config.status: creating examples/stripes.pl
config.status: creating examples/bigtops.pl
config.status: creating examples/minmax.pl
config.status: creating examples/4charts.pl
config.status: creating examples/perftest.pl
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating bindings/Makefile
config.status: creating bindings/tcl/Makefile
config.status: creating bindings/tcl/ifOctets.tcl
config.status: creating Makefile
config.status: creating rrd_config.h
config.status: executing depfiles commands
config.status: executing default commands
checking in... and out again
ordering CD from
http://tobi.oetiker.ch/wish .... just kidding ;-)

----------------------------------------------------------------
Config is DONE!

          With MMAP IO: yes
          Perl Modules: perl_piped perl_shared
           Perl Binary: /usr/bin/perl
          Perl Version: 5.8.8
          Perl Options: PREFIX=/usr/local/server/rrdtool LIB=/usr/local/server/rrdtool/lib/perl/5.8.8
          Ruby Modules:
           Ruby Binary: no
          Ruby Options: sitedir=/usr/local/server/rrdtool/lib/ruby
    Build Tcl Bindings: no
 Build Python Bindings: no
          Build rrdcgi: yes
       Build librrd MT: yes


Type 'make' to compile the software and use 'make install' to
install everything to: /usr/local/server/rrdtool.

       ... that wishlist is NO JOKE. If you find RRDtool useful
make me happy. Go to
http://tobi.oetiker.ch/wish and
place an order.

                               -- Tobi Oetiker <tobi@oetiker.ch>
----------------------------------------------------------------
[root@Cacti rrdtool-1.2.23]#




STEP 5.

make와 make install을 한다.


[root@Cacti rrdtool-1.2.23]# make
......... 길어서 생략 ................
sed 's,@''exec_prefix@,/usr/local/server/rrdtool,' cgi-demo.cgi.in > cgi-demo.cgi
chmod a+x cgi-demo.cgi
make[2]: Leaving directory `/download/rrdtool-1.2.23/examples'
Making all in bindings
make[2]: Entering directory `/download/rrdtool-1.2.23/bindings'
make[3]: Entering directory `/download/rrdtool-1.2.23/bindings'
cd perl-piped && /usr/bin/perl Makefile.PL PREFIX=/usr/local/server/rrdtool LIB=/usr/local/server/rrdtool/lib/perl/5.8.8
Checking if your kit is complete...
Looks good
Writing Makefile for RRDp
cd perl-piped && make
make[4]: Entering directory `/download/rrdtool-1.2.23/bindings/perl-piped'
cp RRDp.pm blib/lib/RRDp.pm
Manifying blib/man3/RRDp.3pm
make[4]: Leaving directory `/download/rrdtool-1.2.23/bindings/perl-piped'
cd perl-shared && /usr/bin/perl Makefile.PL  PREFIX=/usr/local/server/rrdtool LIB=/usr/local/server/rrdtool/lib/perl/5.8.8 RPATH=/usr/local/server/rrdtool/lib
Checking if your kit is complete...
Looks good
Writing Makefile for RRDs
cd perl-shared && make
make[4]: Entering directory `/download/rrdtool-1.2.23/bindings/perl-shared'
cp RRDs.pm blib/lib/RRDs.pm
cp ntmake.pl blib/lib/ntmake.pl
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap  RRDs.xs > RRDs.xsc && mv RRDs.xsc RRDs.c
gcc -c  -I../../src -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables   -DVERSION=\"1.2023\" -DXS_VERSION=\"1.2023\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE"  -DPERLPATCHLEVEL=8 RRDs.c
RRDs.c: In function ?S_RRDs_xport?
RRDs.c:428: warning: unused variable ?arg?
RRDs.c:427: warning: unused variable ?ETVAL?
RRDs.xs:332: warning: unused variable ?ow_cnt?
Running Mkbootstrap for RRDs ()
chmod 644 RRDs.bs
rm -f blib/arch/auto/RRDs/RRDs.so
gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib RRDs.o -L../../src/.libs/ -Wl,--rpath -Wl,/usr/local/server/rrdtool/lib -lrrd -lm -o blib/arch/auto/RRDs/RRDs.so   \
                \
         
chmod 755 blib/arch/auto/RRDs/RRDs.so
cp RRDs.bs blib/arch/auto/RRDs/RRDs.bs
chmod 644 blib/arch/auto/RRDs/RRDs.bs
Manifying blib/man3/RRDs.3pm
make[4]: Leaving directory `/download/rrdtool-1.2.23/bindings/perl-shared'
make[3]: Leaving directory `/download/rrdtool-1.2.23/bindings'
make[2]: Leaving directory `/download/rrdtool-1.2.23/bindings'
make[2]: Entering directory `/download/rrdtool-1.2.23'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/download/rrdtool-1.2.23'
make[1]: Leaving directory `/download/rrdtool-1.2.23'

[root@Cacti rrdtool-1.2.23]#


[root@Cacti rrdtool-1.2.23]# make install
........... 생략 .............
test -z "/usr/local/server/rrdtool/share/rrdtool/examples" || mkdir -p -- "/usr/local/server/rrdtool/share/rrdtool/examples"
 /usr/bin/install -c 'cgi-demo.cgi' '/usr/local/server/rrdtool/share/rrdtool/examples/cgi-demo.cgi'
 /usr/bin/install -c 'piped-demo.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/piped-demo.pl'
 /usr/bin/install -c 'shared-demo.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/shared-demo.pl'
 /usr/bin/install -c 'stripes.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/stripes.pl'
 /usr/bin/install -c 'bigtops.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/bigtops.pl'
 /usr/bin/install -c 'minmax.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/minmax.pl'
 /usr/bin/install -c '4charts.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/4charts.pl'
 /usr/bin/install -c 'perftest.pl' '/usr/local/server/rrdtool/share/rrdtool/examples/perftest.pl'
make[2]: Leaving directory `/download/rrdtool-1.2.23/examples'
make[1]: Leaving directory `/download/rrdtool-1.2.23/examples'
Making install in bindings
make[1]: Entering directory `/download/rrdtool-1.2.23/bindings'
make[2]: Entering directory `/download/rrdtool-1.2.23/bindings'
cd perl-piped && make
make[3]: Entering directory `/download/rrdtool-1.2.23/bindings/perl-piped'
make[3]: Leaving directory `/download/rrdtool-1.2.23/bindings/perl-piped'
cd perl-shared && make
make[3]: Entering directory `/download/rrdtool-1.2.23/bindings/perl-shared'
make[3]: Leaving directory `/download/rrdtool-1.2.23/bindings/perl-shared'
make[3]: Entering directory `/download/rrdtool-1.2.23/bindings'
make[3]: Nothing to be done for `install-exec-am'.
test -f perl-piped/Makefile && cd perl-piped && make install || true
make[4]: Entering directory `/download/rrdtool-1.2.23/bindings/perl-piped'
Installing /usr/local/server/rrdtool/lib/perl/5.8.8/RRDp.pm
Installing /usr/local/server/rrdtool/share/man/man3/RRDp.3pm
Writing /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDp/.packlist
Appending installation info to /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/perllocal.pod
make[4]: Leaving directory `/download/rrdtool-1.2.23/bindings/perl-piped'
test -f perl-shared/Makefile && cd perl-shared && make install || true
make[4]: Entering directory `/download/rrdtool-1.2.23/bindings/perl-shared'
Installing /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDs/RRDs.bs
Installing /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDs/RRDs.so
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/ntmake.pl
Installing /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/RRDs.pm
Installing /usr/local/server/rrdtool/share/man/man3/RRDs.3pm
Writing /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDs/.packlist
Appending installation info to /usr/local/server/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/perllocal.pod
make[4]: Leaving directory `/download/rrdtool-1.2.23/bindings/perl-shared'
test -f ruby/Makefile && cd ruby && make EPREFIX=/usr/local/server/rrdtool sitedir=/usr/local/server/rrdtool/lib/ruby install || true
test -d python/build && cd python && env LIBDIR=/usr/local/server/rrdtool/lib  setup.py install --skip-build --prefix=/usr/local/server/rrdtool --exec-prefix=/usr/local/server/rrdtool || true
make[3]: Leaving directory `/download/rrdtool-1.2.23/bindings'
make[2]: Leaving directory `/download/rrdtool-1.2.23/bindings'
make[1]: Leaving directory `/download/rrdtool-1.2.23/bindings'
make[1]: Entering directory `/download/rrdtool-1.2.23'
make[2]: Entering directory `/download/rrdtool-1.2.23'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/download/rrdtool-1.2.23'
make[1]: Leaving directory `/download/rrdtool-1.2.23'
[root@Cacti rrdtool-1.2.23]#



이로써 RRDtool의 설치가 완료 되었다.

블로그 이미지

쭈꾸댕이

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

,





STEP 1.

[root@Cacti /]# pwd
/
[root@Cacti /]# cd /download/
[root@Cacti download]# ll
total 50240
drwxr-xr-x 12 celltwo users     4096 Feb 13 16:22 httpd-2.2.11
-rw-r--r--  1 root    root   6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
drwxr-xr-x 39     503 users     4096 Feb 13 15:36 mysql-5.0.75
-rw-r--r--  1 root    root  32514150 Dec 19 03:01 mysql-5.0.75.tar.gz
-rw-r--r--  1 root    root  12046184 May  1  2008 php-5.2.6.tar.gz

[root@Cacti download]#


위와 같이 앞에서 PHP를 다운 받은 디렉토리로 이동을 한 후 압축을 해제 하자.

[root@Cacti download]# tar xvfz php-5.2.6.tar.gz
.......... 글 몇개 읽으면 알겠지만 길면 생략한다 ..............
php-5.2.6/CODING_STANDARDS
php-5.2.6/mkinstalldirs
php-5.2.6/README.TESTING2
php-5.2.6/footer
php-5.2.6/header
php-5.2.6/netware/
php-5.2.6/netware/start.c
php-5.2.6/netware/sendmail_nw.h
php-5.2.6/php5.spec.in
php-5.2.6/UPGRADING
php-5.2.6/cvsclean
php-5.2.6/README.EXTENSIONS
php-5.2.6/README.QNX
php-5.2.6/run-tests.php
php-5.2.6/acinclude.m4
php-5.2.6/README.SELF-CONTAINED-EXTENSIONS
php-5.2.6/stub.c
php-5.2.6/buildconf
php-5.2.6/stamp-h.in
php-5.2.6/README.input_filter
php-5.2.6/generated_lists
php-5.2.6/README.Zeus
php-5.2.6/INSTALL
php-5.2.6/TODO-PHP5
php-5.2.6/EXTENSIONS
php-5.2.6/server-tests-config.php
php-5.2.6/snapshot
php-5.2.6/php.gif
php-5.2.6/README.PARAMETER_PARSING_API
php-5.2.6/acconfig.h
php-5.2.6/README.PHP4-TO-PHP5-THIN-CHANGES
php-5.2.6/CREDITS
php-5.2.6/README.UPDATE_5_2
php-5.2.6/README.UNIX-BUILD-SYSTEM
php-5.2.6/buildconf.bat

[root@Cacti download]#




STEP 2.

configure를 하기 위해서 압축을 푼 php 디렉토리로 이동을 한 후 configure를 한다.

[root@Cacti download]# cd php-5.2.6
[root@Cacti php-5.2.6]# ./configure --prefix=/usr/local/server/php --with-apxs2=/usr/local/server/apache/bin/apxs --with-mysql=/usr/local/server/mysql --with-config-file-path=/usr/local/server/apache/conf --disable-debug --enable-safe-mode --enable-track-vars --enable-sockets --with-mod_charset --with-charset=utf8 --with-xml --with-language=korean --enable-mailparse --enable-calender --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-magic-quotes --enable-gd-native-ttf --enable-url-includes --enable-trans-id --enable-inline-optimization --enable-bcmath --with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-libxml-dir=/usr --enable-exif --with-gd --with-ttf --with-gettext --enable-sigchild --enable-mbstring
................ 생략 ................
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool

Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

Notice: Following unknown configure options were used:

--enable-track-vars
--with-mod_charset
--with-charset=utf8
--with-xml
--with-language=korean
--enable-mailparse
--enable-calender
--enable-url-includes
--enable-trans-id
--with-jpeg
--with-png
--with-freetype=dir=/usr

Check './configure --help' for available options

[root@Cacti php-5.2.6]#


--prefix=/usr/local/server/php는 php가 설치될 디렉토리 경로이다.
--with-apxs2=/usr/local/server/apache/bin/apxs는 Apache의 apxs를 이용해 아파치에 모듈을 적재한다.
--with-mysql=/usr/local/server/mysql은 MySQL과 연동한다.
--with-config-file-path=/usr/local/server/apache/conf는 php의 환경설정 파일인 php.ini가 생성 될 위치이다.

그 외 각종 라이브러리를 포함하는 옵션이다.



STEP 3.

make와 make install을 실행한다.

[root@Cacti php-5.2.6]# make && make install
................ 생략 .....................
/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/php_cli_readline.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lcrypt -lrt -lmysqlclient -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt  -o sapi/cli/php

Build complete.
Don't forget to run 'make test'.

Installing PHP SAPI module:       apache2handler
/usr/local/server/apache/build/instdso.sh SH_LIBTOOL='/usr/local/server/apache/build/libtool' libphp5.la /usr/local/server/apache/modules
/usr/local/server/apache/build/libtool --mode=install cp libphp5.la /usr/local/server/apache/modules/
cp .libs/libphp5.so /usr/local/server/apache/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/server/apache/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /download/php-5.2.6/libs'
chmod 755 /usr/local/server/apache/modules/libphp5.so
[activating module `php5' in /usr/local/server/apache/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/server/php/bin/
Installing PHP CLI man page:      /usr/local/server/php/man/man1/
Installing build environment:     /usr/local/server/php/lib/php/build/
Installing header files:          /usr/local/server/php/include/php/
Installing helper programs:       /usr/local/server/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/server/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/server/php/lib/php/
[PEAR] Console_Getopt - installed: 1.2.3
[PEAR] Archive_Tar    - installed: 1.3.2
[PEAR] Structures_Graph- installed: 1.0.2
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR           - installed: 1.7.1
Wrote PEAR system config file at: /usr/local/server/php/etc/pear.conf
You may want to add: /usr/local/server/php/lib/php to your php.ini include_path
Installing PDO headers:          /usr/local/server/php/include/php/ext/pdo/

[root@Cacti php-5.2.6]#




STEP 4.

PHP의 환경 설정을 한다. /usr/local/server/apache/conf에 php.ini라는 이름으로 복사 한다.

[root@Cacti php-5.2.6]# cp php.ini-dist /usr/local/server/apache/conf/php.ini
[root@Cacti php-5.2.6]#


Apache와 연동을 위해서 httpd.conf 파일을 수정을 해야 한다.

[root@Cacti php-5.2.6]# vi /usr/local/server/apache/conf/httpd.conf
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#  
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>


위와 같은 부분에 아래와 같이 추가 시켜준다.

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#  
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>



<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
   
    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi
   
    # For type maps (negotiated resources):
    #AddHandler type-map var
   
    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

위 와 같은 문구에 아래와 같이 추가 시켜준다.

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
   
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi
   
    # For type maps (negotiated resources):
    #AddHandler type-map var
   
    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>




STEP 5.

PHP가 설치가 완료 되었으니 테스트를 해 본다.

[root@Cacti php-5.2.6]# /etc/init.d/httpd restart
httpd not running, trying to start
[root@Cacti php-5.2.6]#


테스트 페이지를 만들어서 php의 정보를 보여주는 함수를 사용해 본다.

[root@Cacti php-5.2.6]# vi /usr/local/server/apache/htdocs/phpinfo.php
<? phpinfo(); ?>


아래와 같이 웹서버에 출력이 되면, PHP 설치가 완료 된다.

블로그 이미지

쭈꾸댕이

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

,





STEP 1.

[root@Cacti /]# cd download/
[root@Cacti download]# ll
total 50236
-rw-r--r--  1 root root   6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
drwxr-xr-x 39  503 users     4096 Feb 13 15:36 mysql-5.0.75
-rw-r--r--  1 root root  32514150 Dec 19 03:01 mysql-5.0.75.tar.gz
-rw-r--r--  1 root root  12046184 May  1  2008 php-5.2.6.tar.gz

[root@Cacti download]#



설치에 앞서 Apache가 있는 경로에서 압축을 푼다.

[root@Cacti download]# tar xvfz httpd-2.2.11.tar.gz
.... 길어서 생략 ....
httpd-2.2.11/modules/metadata/NWGNUexpires
httpd-2.2.11/modules/metadata/NWGNUusertrk
httpd-2.2.11/modules/NWGNUmakefile
httpd-2.2.11/modules/README
httpd-2.2.11/modules/debug/
httpd-2.2.11/modules/debug/NWGNUmodbucketeer
httpd-2.2.11/modules/debug/mod_bucketeer.c
httpd-2.2.11/modules/debug/config.m4
httpd-2.2.11/modules/debug/Makefile.in
httpd-2.2.11/modules/debug/mod_bucketeer.dsp
httpd-2.2.11/modules/debug/NWGNUmoddumpio
httpd-2.2.11/modules/debug/mod_dumpio.c
httpd-2.2.11/modules/debug/NWGNUmakefile
httpd-2.2.11/modules/debug/mod_dumpio.dsp
httpd-2.2.11/modules/debug/README
httpd-2.2.11/README
httpd-2.2.11/apachenw.mcp.zip
httpd-2.2.11/buildconf
httpd-2.2.11/libhttpd.dsp
httpd-2.2.11/LAYOUT
httpd-2.2.11/.deps
[root@Cacti download]# cd httpd-2.2.11
[root@Cacti httpd-2.2.11]#




STEP 2.

configure를 실행한다.

[root@Cacti httpd-2.2.11]# ./configure --prefix=/usr/local/server/apache --enable-mods-shared=all --enable-so --enable-rewrite
........... 여기도 길어서 생략 ...............
creating test/Makefile
config.status: creating docs/conf/httpd.conf
config.status: creating docs/conf/extra/httpd-autoindex.conf
config.status: creating docs/conf/extra/httpd-dav.conf
config.status: creating docs/conf/extra/httpd-default.conf
config.status: creating docs/conf/extra/httpd-info.conf
config.status: creating docs/conf/extra/httpd-languages.conf
config.status: creating docs/conf/extra/httpd-manual.conf
config.status: creating docs/conf/extra/httpd-mpm.conf
config.status: creating docs/conf/extra/httpd-multilang-errordoc.conf
config.status: creating docs/conf/extra/httpd-ssl.conf
config.status: creating docs/conf/extra/httpd-userdir.conf
config.status: creating docs/conf/extra/httpd-vhosts.conf
config.status: creating include/ap_config_layout.h
config.status: creating support/apxs
config.status: creating support/apachectl
config.status: creating support/dbmmanage
config.status: creating support/envvars-std
config.status: creating support/log_server_status
config.status: creating support/logresolve.pl
config.status: creating support/phf_abuse_log.cgi
config.status: creating support/split-logfile
config.status: creating build/rules.mk
config.status: creating build/pkg/pkginfo
config.status: creating build/config_vars.sh
config.status: creating include/ap_config_auto.h
config.status: executing default commands
[root@Cacti httpd-2.2.11]#

--prefix=/usr/local/server/apache는 /usr/local/server/apache에 설치한다.

--enable-mods-shared=all은 DSO모드라고 한다는데, 모듈이 추가로 설치 되었을 때 다시 컴파일 하지 않고 추가 할 수 있어서 좋다고 한다.

--enable-so는 DSO모드를 활성화 한다고 한다.

--enable-rewrite는 URL 재작성 모듈을 활성화 한다.



STEP 3.

make와 make install을 한다.

[root@Cacti httpd-2.2.11]# make && make install
......... 생략 ...........
make[2]: Entering directory `/download/httpd-2.2.11/support'
make[2]: Leaving directory `/download/httpd-2.2.11/support'

Installing configuration files
mkdir /usr/local/server/apache/conf
mkdir /usr/local/server/apache/conf/extra
mkdir /usr/local/server/apache/conf/original
mkdir /usr/local/server/apache/conf/original/extra
Installing HTML documents
mkdir /usr/local/server/apache/htdocs
Installing error documents
mkdir /usr/local/server/apache/error
Installing icons
mkdir /usr/local/server/apache/icons
mkdir /usr/local/server/apache/logs
Installing CGIs
mkdir /usr/local/server/apache/cgi-bin
Installing header files
Installing build system files
Installing man pages and online manual
mkdir /usr/local/server/apache/man
mkdir /usr/local/server/apache/man/man1
mkdir /usr/local/server/apache/man/man8
mkdir /usr/local/server/apache/manual
make[1]: Leaving directory `/download/httpd-2.2.11'
[root@Cacti httpd-2.2.11]#





STEP 4.

Apache를 자동 실행하기 위해 설정하고, chkconfig를 할 수 있게 하기 위해서 실행스크립트 파일에 순서대로 추가한다.

[root@Cacti httpd-2.2.11]# cp /usr/local/server/apache/bin/apachectl /etc/init.d/httpd
[root@Cacti httpd-2.2.11]# vi /etc/init.d/httpd

#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache.  Written by Marc Slemko, 1997/08/23

위 내용에 아래와 같이 추가한다.

#!/bin/sh
#
# chkconfig: 2345 90 90
# description: init file for Apache server daemon
# processname: /usr/local/server/apache/bin/apachectl
# config: /usr/local/server/apache/conf/httpd.conf
# pidfile: /usr/local/server/apache/logs/httpd.pid

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache.  Written by Marc Slemko, 1997/08/23


[root@Cacti httpd-2.2.11]# chkconfig --add httpd
[root@Cacti httpd-2.2.11]# chkconfig --list | grep httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@Cacti httpd-2.2.11]#




STEP 5.

Apache의 환경을 설정한다.

[root@Cacti httpd-2.2.11]# vi /usr/local/server/apache/conf/httpd.conf
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch. 
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon

</IfModule>
</IfModule>

위 부분을 아래(참고로 위 부분을 찾아서 변경하세요 ^^)와 같이 변경 한다.

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch. 
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User nobody
Group nobody

</IfModule>
</IfModule>


# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName
www.example.com:80

위 부분을 아래와 같이 주석을 제거해 준다. 그리고 IP에 맞게 웹서버를 등록 해 준다.

필자의 경우에는 DNS 서버를 올리지 않았기 때문에 IP를 입력 하였다.

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#

ServerName 192.168.100.2:80



이제 Apache 설치는 완료 되었으며 Apache를 실행하면 된다.

[root@Cacti httpd-2.2.11]# /etc/init.d/httpd start
[root@Cacti httpd-2.2.11]#


웹서버가 뜨는 것을 확인 할 수 있다.

위 스샷과 같이 안 나온다면, 리눅스 설치 시 방화벽에 http 포트를 열어주었는지 확인을 해 보기 바란다.
블로그 이미지

쭈꾸댕이

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

,