원출처 : win2000에서 Apache2.0.49 PHP5 Mysql4.1.x 설치
( http://blog.naver.com/jks3500/40002554971 )
수정된 내용 : Apache2.0.49 -> iis5.0 용으로 문서를 재구성 함.
작성자 : 나현재( http://j.finfra.com )


Step 1 : 소스 다운로드

필요한 소스파일 다운로드 받기.

PHP5(php-5.0.0RC1-Win32.zip) : http://www.php.net/downloads.php

MySQL4.1.1(mysql-4.1.1a-alpha-win.zip) : http://www.mysql.com/downloads/mysql-4.1.html


주요 특징:

PHP5 : 보다 진보적인 OOP 지원, XML지원 등.

MySQL4.1.1 : 서브 Select 쿼리 지원 등.


Step 2: 사전 작업(해당 없으면 다음 단계로)

1) 기존에 다른 버전의 PHP가 설치되어 있었던 경우 :

  C:\php폴더 삭제

  C:\winnt폴더의 php.ini파일 삭제

  C:\winnt\system32폴더의 php4ts.dll 파일 삭제


2) 기존에 다른 버전의 MySQL이 설치되어 있었던 경우 :

  MySQL을 Uninstall한다.

  C:\폴더의 my_cnf.x 또는 my.cnf.x파일을 삭제 한다.

  C:\winnt폴더의 my.ini파일을 삭제한다.


Step 3 : MySQL설치

1) mysql-4.1.1-alpha.zip 파일 압축풀기.


2) mysql-4.1.0-alpha\mysql\bench 로 압축이 풀리면 된다.
  (mysql 4.1 이하 경우는 서브쿼리가 안된다. mysql-4.1.0-alpha 버전은 setup.exe 파일이 없다.)


3) c:\mysql폴더로 모두 복사한다.


4) 시작 버튼/실행 누르고 아래 내용을 입력하고, "확인"누르면 됨

    c:\mysql\bin\mysqld-max-nt --install (win2000에서 서비스로 등록하는 방법)

참고 : c:\mysql\bin\mysqld-max-nt --remove (win2000에서 서비스 삭제방법)


5) MySQL설정

C:\>cd mysql
C:\mysql>cd bin
C:\mysql\bin>mysql
Welcome to the MySQL monitor.??Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.0-alpha-max-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select version();

+------------------------+
| version()                      |
+------------------------+
| 4.1.1-alpha-max-nt        |
+------------------------+
1 row in set (0.04 sec)
mysql> quit


root 로 접속 한다(mysql 4.1 경우 root 패스워드가 공백으로 설정)
password 넣을 때 Enter 만 치면 됨 !


C:\mysql\bin>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.??Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.0-alpha-max-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Database changed

비밀번호 설정 하기 ( ppp 로 설정 )
mysql> update user set password=password('ppp') where user='root' AND host='localhost';
mysql> delete from user where user='';
mysql> delete from user where host='%';
mysql> flush privileges;
mysql> quit


비밀번호 ppp 넣고 접속해 보기
C:\mysql\bin>mysql -uroot -p
Enter password:

접속에 성공하면 성공.


Step 4 : iis5.0 설치

  제어판 -> 프로그램 추가/제거 -> 윈도우즈 구성요소 추가 제거

  도메인이 없는 경우 :

  - 도메인 : localhost

  - 컴퓨터명 : localhost

Step 5 : PHP5 설치

1) php-5.0.0RC1-Win32.zip파일의 압축을 푼 후, C:\php폴더로 카피한다.


2) C:\php\php.ini-dist 파일을 c:\php\php.ini 로 변경 한 후 c:\winnt 아래 복사 한다.

3) C:\php\php.ini 파일은 삭제한다.


Step 6 : 환경 설정

1) php.ini 수정

  register_globals = On
  include_path = "c:\php" <- 수정후 환경변수에 등록한다.(php4ts.dll,php5apache2.dll외)
  extension_dir = "c:\php\ext" <-PHP5의 확장 디렉토리(php_xxx.dll파일이 있는 곳)
  error_reporting = E_ALL & ~E_NOTICE
  display_errors = On
  display_errors = On 은 개발 시에만 서비스 중일 경우는 display_errors = Off로 설정


2) 내컴퓨터->등록정보->고급->환경변수->시스템환경변수에서 path에 'C:\php'를 등록하여

   PHP5디렉토리를 환경변수로 등록 시킨다.

  (이렇게 하면 일부러 c:\php\php4ts.dll파일을 c:\winnt\system32\ 아래로 복사할

   필요가 없어지며, 다른 .dll파일들도 잘 작동하게 된다.)


3) ISS 5.0에서 작동하게 만들기 파일 수정

1. 제어판->관리도구->인터넷 서비스 관리자 2. 해당 사이트에 마우스 오른쪽 버튼 누르고 등록 버튼 3. ISAPI필터 -> 추가버튼 ->필터이름->php -> 찾아보기 -> php가 설치되어 있는 폴더에서 'php5isapi.dll'선택 -> 열기 -> 확인
3. 2번작업 반복 -> 홈디렉토리 -> 구성 -> 추가 -> 확장명에 '.php'입력 -> 찾아보기 -> php가 설치되어 있는 폴더에서 'php5isapi.dll'선택 -> 열기 -> 확인

Step 7 : 테스트

메모장이나 editplus 열고 다음을 test.php 로 저장
----------------------------------------------------------------------------------------
[CODE][HTML]<? print " PHP 연동"; phpinfo(); ?>[/CODE]
----------------------------------------------------------------------------------------

http://localhost/test.php 를 브라우져 주소표시줄에서 쳐서 잘 나오면 성공.

[/HTML]

Posted by 나현재

2004/11/16 20:13 2004/11/16 20:13
, ,
Response
0 Trackbacks , 2 Comments
RSS :
http://j.finfra.com/tt/rss/response/102


블로그 이미지

Insufficient memory! So,Blog is my 2nd Brain!

- 나현재

Notices

Archives

Authors

  1. 나현재

Calendar

«   2012/02   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Site Stats

Total hits:
202429
Today:
0
Yesterday:
18