sudo apt-get update
를 하자$ sudo su
# apt-get install make
# apt-get install build-essential
# apt-get install gcc
# apt-get install --reinstall make
# apt-get install libexpat1-dev
# apt-get install g++
# apt-get install net-tools
# apt-get install curl
$ sudo su
/usr/local# mkdir apache
1) apr-1.7.3
/usr/local# wget http://mirror.navercorp.com/apache//apr/apr-1.7.3.tar.gz
2) apr-util-1.6.3
/usr/local# wget http://mirror.navercorp.com/apache//apr/apr-util-1.6.3.tar.gz
3) pcre-8.45
/usr/local# wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz
4) apache-2.4.56
/usr/local# wget https://dlcdn.apache.org//httpd/httpd-2.4.56.tar.gz
🔥 ERROR 1. /usr/local
Not Such file or directory
👀 해결방법
cd /usr/local # mkdir apache // 디렉토리 생성
🔥 ERROR 2. 최신 버전 ?
Not Found
가 떴다.👀 해결방법
- 최신 버전 소스 파일을 확인하고 작성을 했어야 했다.
- apr-1.7.3 / apr-util-1.6.3 / pcre-8.45 / apache-2.4.56
/usr/local# tar xvfz apr-1.7.0.tar.gz
/usr/local# tar xvfz apr-util-1.6.1.tar.gz
/usr/local# tar xvfz pcre-8.45.tar.gz
/usr/local# tar xvfz httpd-2.4.51.tar.gz
🔥 ERROR 3. pcre 압축해제 안됨
Not Such file or directory
👀 해결방법
- 구글링하고 코드를 그대로 갖고오니 오류가.... > / 를 삭제하자
https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz/ -> https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz
/usr/local# cd apr-1.7.3
/usr/local/apr-1.7.3# ./configure --prefix=/usr/local/apr
/usr/local/apr-1.7.3# make
/usr/local/apr-1.7.3# make install
/usr/local# cd apr-util-1.6.3
/usr/local/apr-util-1.6.3# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
/usr/local/apr-util-1.6.3# make
/usr/local/apr-util-1.6.3# make install
/usr/local# cd pcre-8.45
/usr/local/pcre-8.45# ./configure --prefix=/usr/local/pcre
/usr/local/pcre-8.45# make
/usr/local/pcre-8.45# make install
/usr/local# cd httpd-2.4.51
/usr/local/httpd-2.4.46# ./configure --prefix=/usr/local/apache2.4 \
--enable-module=so --enable-rewrite --enable-so \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util \
--with-pcre=/usr/local/pcre \
--enable-mods-shared=all
/usr/local/httpd-2.4.46# make
/usr/local/httpd-2.4.46# make installㄴ
🔥 ERROR 4. Apache 설치 안됨
👀 해결방법
--with-pcre=/usr/local/pcre/
--with-pcre=/usr/local/pcre/bin/pcre-config
< 이걸로 바꾸기 !
sudo apt-get update
httpd -k start
httpd -k stop
/usr/local# sudo apache2.4/bin/httpd -k start
/usr/local# ps -ef | grep httpd | grep -v grep
/usr/local# sudo netstat -anp | grep httpd
/usr/local# sudo curl http://127.0.0.1