XAMPP는 Apache Friends가 개발한 오픈 소스 크로스 플랫폼 웹 서버 솔루션 스택 패키지이다
X Cross Platform
A Apache2
M MariaDB (Old version with MySQL)
P PHP
P Perl
Apache, MariaDB, PHP, Perl을 각각 설치하는 번거로움이 줄고 간단하게 개인용 서버를 구축할 수 있다 운영체제는 Windows, Linux, MacOS X를 지원한다
Microsoft Visual C++ 2017 Redistributable 다운로드
Apache friends 홈페이지에서 설치 파일을 다운 받을 수 있다. 나는 윈도우 8.0.11 버전을 다운 받았는데, 윈도우 버전은 Microsoft Visual C++ 2017 Redistributable이 없다면 필요하므로 설치해준다
설치와 동시에 UAC 경고가 뜨는데 OK 버튼을 눌러 무시하고 넘어가준다
UAC 설정 변경이 필요할 경우
시스템 구성(mscofig) > 도구 > UAC 설정 변경
C:\WIDOWS\System32\UserAccountControlSettings.exe 실행
MySQL, PHP, Apache만 사용할 것이므로 나머지는 선택 해제 해줬다
(중요) 설치 경로는 default path를 유지해준다
방화벽에서 네트워크 엑세스 알림이 뜨면 허용해준다
설치 완료 후 XAMPP_Control.exe를 관리자 권한
으로 실행해준다
다른 프로젝트를 하면서 이미 Apache와 MySQL을 설치해뒀기 때문에 충돌할 수도 있겠단 생각이 들었지만 설치를 강행했다
결국 우려는 현실이 되었다!
오후 2:31:00 [Apache] Apache Service detected with wrong path
오후 2:31:00 [Apache] Change XAMPP Apache and Control Panel settings or
오후 2:31:00 [Apache] Uninstall/disable the other service manually first
오후 2:31:00 [Apache] Found Path: "C:\dev\Apache\Apache24\bin\httpd.exe" -k runservice
오후 2:31:00 [Apache] Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
오후 2:31:00 [Apache] Problem detected!
오후 2:31:00 [Apache] Port 443 in use by ""C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 7924!
오후 2:31:00 [Apache] Apache WILL NOT start without the configured ports free!
오후 2:31:00 [Apache] You need to uninstall/disable/reconfigure the blocking application
오후 2:31:00 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
오후 2:31:00 [mysql] MySQL Service detected with wrong path
오후 2:31:00 [mysql] Change XAMPP MySQL and Control Panel settings or
오후 2:31:00 [mysql] Uninstall/disable the other service manually first
오후 2:31:00 [mysql] Found Path: C:\mysql\bin\mysqld MySQL
오후 2:31:00 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
오후 2:31:00 [mysql] Problem detected!
오후 2:31:00 [mysql] Port 3306 in use by "Unable to open process"!
오후 2:31:00 [mysql] MySQL WILL NOT start without the configured ports free!
오후 2:31:00 [mysql] You need to uninstall/disable/reconfigure the blocking application
오후 2:31:00 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
한숨이 나올 것 같지만 찬찬히 해결해본다
VMware에서 사용하는 443 포트와 충돌은 아래와 같이 해결하면 된다
경로가 달라서 못 찾는 것 같으니 환경 변수 설정에 들어가서 Apache와 MySQL 경로를 바꿔준다
[Before]
C:\dev\Apache\Apache24\bin
C:\mysql\bin
[After]
c:\xampp\apache\bin\
c:\xampp\mysql\bin
이 방법은 전혀 먹히지 않았다
여전히 같은 에러 메시지가 출력되었다
구글링을 해보니 미리 설치해 둔 Apache24와 MySQL을 지우라는 의견이 대다수였다
내가 Apache24와 MySQL을 설치한 이유가 있었을텐데 (Docker 때문이었나..? 기억은 잘 안 난다) 이렇게 쉽게 지워도 될까 걱정이 되서 좀 더 찾아봤다
그러던 중 Stackoverflow에서 다른 해결책을 발견!
Apache Service detected with wrong path
그리고 XAMPP를 껐다가 다시 실행한 결과 Apache와 MySQL이 정상적으로 구동되었다
그렇지만 MySQL이 여전히 포트 충돌을 일으켰다
오후 3:11:00 [mysql] Problem detected!
오후 3:11:00 [mysql] Port 3306 in use by "Unable to open process"!
오후 3:11:00 [mysql] MySQL WILL NOT start without the configured ports free!
오후 3:11:00 [mysql] You need to uninstall/disable/reconfigure the blocking application
오후 3:11:00 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
3306 포트가 이미 사용되고 있다는데..
여기까지 완료한 후 패널 좌측 상단에서
Apache와 Mysql 왼쪽의 체크박스를 해제 (Uninstall) 해준 후,
빨간 X 체크박스를 누르면 reinstall이 된다
재설치 후 Apache와 MySQL의 포트가 각각 80, 443과 3307으로 뜬다면
환경 수정이 정상적으로 완료된 것이다
재설치를 안 하면 바뀐 설정이 반영되지 않는다
길고 긴 여정 끝에 드디어 설치 완료!
브라우저에서 localhost/dashboard/를 입력했을 때 아래와 같이 뜬다면 성공이다