24 06 2015
Apache install Ubuntu
설치할 폴더 /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 sysv-rc-conf
등록
sysv-rc-conf httpd on
참고
apt-get install daemon 설치
http://askubuntu.com/questions/514414/trying-to-compile-from-source-newest-apache-with-newest-openssl
설치중 오류
- Message : OpenSSL version is too old
apt-get install libssl-dev
- /apachectl start 해도 서비스 안올라 오고 아래의 메시지가 나오면
Failed to lookup provider ‘shm’ for ‘slotmem’: is mod_slotmem_shm loaded??
/app/httpd-2.4.12/conf
아래의 문구 주석해제후 다시 로딩
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
- apachectl start 시 아래의 에러 메시지의 경우
Libpcre.So.1: Cannont Open Shared Object File: No Such File Or Directory.
vi /etc/profile 에 아래의 문장추가
1 |
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib |
Nginx install on CentOS AWS로 mysqldump 사용