Apache2 (with mod_ssl) + PHP4 설치 --DSO 방식 > 리눅스 스터디

본문 바로가기
사이트 내 전체검색

리눅스 스터디

Apache2 (with mod_ssl) + PHP4 설치 --DSO 방식

페이지 정보

본문

httpd-2.0.49
php-4.3.7

[참고]
configure 옵션

아파치 웹서버는 관리자가 모듈들을 선택하여 서버에 포함할 기능을 결정할 수 있는 모듈화된

프로그램이다. 서버를 컴파할때 httpd 실행파일에 정적으로 모듈을 컴파일할 수 있다.

아니면 모듈을 httpd 실행파일과 분리하여 동적공유객체(Dynamic Shared Objects, DSO)로

컴파일할 수 있다. DSO 모듈은 서버를 컴파일 할 때 컴파일하거나,

Apache Extension Tool (apxs)을 사용하여 나중에 컴파일하여 추가할 수 있다.


1. 아파치의 설치

#./configure
--prefix=/usr/local/apache
--enable-so // mod_so가 지원하는 DSO기능 사용
--enable-ssl=shared // mod_ssl 모듈을 DSO모듈로 컴파일
--with-ssl=DIR // mod_ssl을 사용하는 경우 configure는 설치된 OpenSSL을

찾는다. 대신 이 옵션을 사용하여 SSL/TLS 도구의 디렉토리

경로를 알려줄 수 있다.

(e.g. /usr/local/openssl, /usr/share/ssl)

--enable-rewirte

--enable-speling



======================== 1.x ===============================

--activate-module=src/modules/PHP4/libPHP4.a // It will be created.

--enable-modules=PHP4

--enable-modules=so // mod_so 의 정적링크

=============================================================

#make

#make install



[참고]

2.0.37 이후 #make certificate 는 제거됐다.

원한다면 openssl command 를 이용해서 생성해야한다.





1. openssl명령어를 이용하여 Web Server의 RSA키를 생성한다.

# openssl genrsa -des3 -out mycert.key 1024
(pass phrase 없는 key 만들땐
#openssl genrsa 1024 > mycert.key



2. 이때 생성되는 개인키는 반드시 백업을 받아놓고 사용하는 것이 좋다.

생성된 키는 다음 명령을 이용하여 내용을 확인할수 있다.


# openssl rsa -noout -text -in mycert.key


3. 생성된 비밀키를 이용하여 Self Sign 된 인증서 화일을 만든다.

# openssl req -new -x509 -days 365 -key mycert.key -out mycert.crt



공인인증기관에 CSR을 보내기 위해...

=======================================================================================

4. 생성된 키를 이용하여 CSR을 생성한다.

$ openssl req -new -days 365 -key mycert.key -out mycert.csr

CSR 생성중 키의 길이를 묻는 질문에는 1024bit를 선택하고 그외는 모두 Default를 선택한다. 질문에 일반적인 CSR 입력항목을 답한다.

5. 생성된 화일은 다음 명령으로 내용을 확인 할 수 있다.

$ openssl req -noout -text -in server.csr

=======================================================================================



/usr/local/apache/conf/ssl.conf 수정

SSLCertificateFile /usr/local/apache/conf/ssl.crt/mycert.crt

SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/mycert.key



#apachectl startssl




2. PHP 설치

#/usr/local/php-4.3.7/.configure
--with-mysql=/usr/local/mysql
--with-config-file-path=/etc // php.ini 가 위치할 경로
--with-xml
--enable-versioning
--enable-url-includes
--enable-trans-id
--enable-ftp
--enable-bcmath
--enable-sysvshm=yes
--enable-sysvsem=yes
--enable-inline-optimization
--disable-debug
--enable-modules=so // (DSO설치를 위하여)
--with-apxs2=/usr/local/apache/bin/apxs
--with-apache=/usr/local/apache // Apache 2.x 에서는 필요없다.


#make
#make install


3. PHP환경설정 파일

#cp php.ini-dist /etc/php.ini
php.ini-dist : display_error 옵션이 켜져 있어 디버깅하기에 편리. 개발용 서버
php.ini-recommeded : 서비스용 서버


4. PHP모듈을 읽기 위해 httpd.conf 파일확인

PHP 4는:
LoadModule php4_module libexec/libphp4.so
PHP 5는:
LoadModule php5_module libexec/libphp5.so


5. httpd.conf 에 php파일을 실행하기 위해 추가

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps



-------- 이렇게도..
./configure --prefix=/usr/local/apache2
--enable-so
--enable-ssl=shared
--with-ssl=/usr/local/openssl-0.9.7e
--enable-rewrite
--enable-speling
--enable-cgi

댓글목록

등록된 댓글이 없습니다.

Total 87건 1 페이지
리눅스 스터디 목록
번호 제목 글쓴이 조회 날짜
87 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3310 11-08
86 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3586 11-05
85 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3534 11-05
84 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 4887 11-05
83 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3351 11-05
열람중 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3988 11-05
81 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 4973 11-05
80 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3209 08-22
79 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2429 06-16
78 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2324 06-16
77 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3709 05-31
76 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1908 03-12
75 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 5478 08-13
74 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3168 04-09
73 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2126 04-04
72 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3597 04-01

검색

회원로그인

회원가입

사이트 정보

컴퓨터 정보,윈도우즈,리눅스,포토샵,3ds
맥스,프로그래밍 강좌팁

접속자집계

오늘
470
어제
359
최대
5,287
전체
636,176
Copyright © www.qdata.co.kr All rights reserved.