테스트 환경
OS : Windows Server 2019
1) Apache 설치 및 세팅
다운로드 링크 : www.apachelounge.com/download/
다운로드 받은 파일 압축 해제 후, C\Apache24 로 이동
CMD 관리자 권한 실행 후, 아파치 설치 및 시작
httpd.exe -k install
httpd.exe -k start
http://127.0.0.1 로 접속 확인
2) PHP설치 및 세팅
다운로드 링크 : windows.php.net/download/
다운로드 받은 파일 압축 해제 후, C\php8 로 이동
(Thread Safe 로 받아야 함)
php.ini-development 파일을 php.ini 파일로 이름 변경 후, 아래 내용 참고하여 수정
----------------------------------------------------------------
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED
----------------------------------------------------------------
extension_dir = "C:\php8\ext"
----------------------------------------------------------------
extension=curl
extension=gettext
extension=mbstring
extension=mysqli
extension=openssl
extension=pdo_sqlite
(이외에 필요한 모듈 주석 삭제)
----------------------------------------------------------------
date.timezone = Asia/Seoul
Apache24 > conf 폴더에 httpd.conf 파일을 열어 아래 내용 참고하여 수정
----------------------------------------------------------------
Define SRVROOT "C:\Apache24"
----------------------------------------------------------------
ServerAdmin hskim@itsmart.co.kr
----------------------------------------------------------------
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
내용 맨 마지막 줄에 아래 내용 추가
----------------------------------------------------------------
#PHP
LoadModule php_module "C:/php8/php8apache2_4.dll"
AddType application/x-httpd-php .html .php
AddHandler application/x-httpd-php .php
PHPIniDir "C:/php8"
Apache2\htdocs 폴더에 xxx.php 형식의 파일 생성 후, 아래 내용 입력
<?php phpinfo(); ?>
http://127.0.0.1/testphp.php 로 접속 확인
3) phpMyAdmin 설치
다운로드 링크 : https://www.phpmyadmin.net/
다운로드 받은 파일 압축 해제 후, C\Apache\htdocs 로 이동, 폴더 이름을 phpmyadmin 으로 변경
http://127.0.0.1/phpmyadmin 으로 접속 확인
기본 설정값 적용시 로그인 불가능
C\Apache\htdocs > phpyAdmin > config.inc.php 파일을 아래 내용 참고하여 수정
(붉은색으로 작성한 값은 원하는 값으로 변경 가능)
$cfg['blowfish_secret'] = '사용자 임의 지정'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '172.16.1.6';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '패스워드 입력';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
아파치 재시작 후, 접속 및 로그인 확인
'Windows Server' 카테고리의 다른 글
[Window 2019] 계정생성 및 원격권한 설정 (0) | 2022.09.13 |
---|