1. 설치 준비
1-1. 다운로드
1) apache 다운로드
2) pcre 다운로드
3) apr / apr-util 다운로드
1-2. 압축 해제
1) 파일리스트
$ ls -ll
total 25736
-rw-r--r--@ 1 ssingssing2 staff 1093896 7 5 20:10 apr-1.7.0.tar.gz
-rw-r--r--@ 1 ssingssing2 staff 554301 7 5 20:11 apr-util-1.6.1.tar.gz
-rw-r--r--@ 1 ssingssing2 staff 9199150 7 5 20:05 httpd-2.4.39.tar.gz
-rw-r--r--@ 1 ssingssing2 staff 2320353 7 5 20:08 pcre-8.43.zip
2) 파일 압축 해제
$ tar -zxvf httpd-2.4.39.tar.gz
$ tar -zxvf apr-util-1.6.1.tar.gz
$ tar -zxvf apr-1.7.0.tar.gz
$ tar -zxvf pcre-8.43.zip
2. 설치
2-1. apr 설치
$ cd apr-1.7.0
$ ./configure --prefix=/Applications/ssingssing2/apache-test/apr
$ make && make install
2-2. apr-util 컴파일 / 설치
$ cd ../apr-util-1.6.1
$ ./configure --prefix=/Applications/ssingssing2/apache-test/aprutil --with-apr=/Applications/ssingssing2/apache-test/apr/
$ make && make install
2-3. pcre 설치
$ cd ../pcre-8.43
$ ./configure --prefix=/Applications/ssingssing2/apache-test/pcre
$ make && make install
2-4. apache 설치
$ cd ../httpd-2.4.39
$ ./configure --prefix=/Applications/ssingssing2/apache-test/apache --enable-mods-shared=all --enable-so --enable-rewrite --enable-auth-digest --with-apr=/Applications/ssingssing2/apache-test/apr --with-apr-util=/Applications/ssingssing2/apache-test/aprutil --with-pcre=/Applications/ssingssing2/apache-test/pcre
$ make && make install
3. apache 실행
3-1. apache 실행
$ /Applications/ssingssing2/apache-test/apache/bin/apachectl start
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
3-2. 파일 권한 확인
$ ls -ll /Applications/ssingssing2/apache-test/apache/bin/httpd
-rwxr-xr-x 1 ssingssing2 admin 827200 7 5 20:45 /Applications/ssingssing2/apache-test/apache/bin/httpd
3-3. 파일 소유자 및 권한 변경
- Mac에서는 root로 변경할 수 없음...
$ sudo chown root.root /Applications/ssingssing2/apache-test/apache/bin/httpd
Password:
chown: root.root: illegal user name
$ sudo chmod +s /Applications/ssingssing2/apache-test/apache/bin/httpd
3-4. httpd.conf에서 포트 변경 (80 -> 8080)
$ vi /Applications/ssingssing2/apache-test/apache/conf/httpd.conf
Listen 80 -> 8080
3-5. 로컬 구동 확인
'Server > Apache' 카테고리의 다른 글
Apache 2.2에서 2.4로 마이그레이션 시 발생하는 에러 및 해결책 정리 (0) | 2020.02.07 |
---|