24 06 2015
설치할 폴더 /app/하위
1 2 3 4 5 6 7 |
mkdir /app cd /app mkdir install cd install |
다운로드(위치 install폴더)
1 2 3 4 |
wget http://apache.mirror.cdnetworks.com//httpd/httpd-2.4.12.tar.gz wget http://apache.mirror.cdnetworks.com/apr/apr-1.5.2.tar.gz wget http://apache.mirror.cdnetworks.com/apr/apr-util-1.5.4.tar.gz wget http://ftp.cs.stanford.edu/pub/exim/pcre/pcre-8.35.tar.gz |
압축해제(위치install폴더)
1 2 3 4 5 6 7 |
tar -xvzf httpd-2.4.12.tar.gz tar -xvzf apr-1.5.2.tar.gz tar -xvzf apr-util-1.5.4.tar.gz tar -xvzf pcre-8.35.tar.gz |
APR관련 파일 Httpd/srclib로 이동
1 2 |
mv ./apr-1.5.2 ./httpd-2.4.12/srclib/apr mv ./apr-util-1.5.4 ./httpd-2.4.12/srclib/apr-util |
의존 Package Install
1 |
apt-get install make |
1 |
apt-get install libssl-dev |
1 |
apt-get install libpcre3-dev |
1 |
apt-get install gcc g++ |
PCRE 설치구성
1 2 |
cd pcre-8.35 ./configure --enable-unicode-properties=yes |
make make install cd ../httpd-2.4.12
1 2 3 4 5 6 7 8 9 10 11 |
./configure \ --prefix=/app/httpd-2.4.12 \ --enable-so \ --enable-rewrite \ --enable-proxy \ --enable-ssl \ --enable-mods-shared=all \ --enable-modules=shared \ --enable-mpms-shared=all \ --with-included-apr \ --with-included-apr-util |
1 2 3 |
make make install |
설치 확인
1 |
cd /app/httpd-2.4.12/bin/ |
1 |
./apachectl start |
1 2 3 4 5 |
root@ip-172-31-23-3:/app/httpd-2.4.12/bin# ps -ef|grep httpd root 9368 1 0 00:55 ? 00:00:00 /app/httpd-2.4.12/bin/httpd -k start daemon 9369 9368 0 00:55 ? 00:00:00 /app/httpd-2.4.12/bin/httpd -k start daemon 9370 9368 0 00:55 ? 00:00:00 /app/httpd-2.4.12/bin/httpd -k start daemon 9371 9368 0 00:55 ? 00:00:00 /app/httpd-2.4.12/bin/httpd -k start |
서비스 등록
1 |
cp /app/httpd-2.4.12/bin/apachectl /etc/init.d/httpd |
1 |
vi /etc/init.d/httpd |
. /lib/lsb/init-functions 서비스에 올리기위해(chkconfig 와 거의 동일) 설치 apt-get install […]