SERVER/회사서버셋팅중참조

CentOS 7 Apache 2.4 설치방법

nineDeveloper 2014. 8. 27. 18:41
728x90
반응형

아파치 도큐먼트 참조 : http://httpd.apache.org/docs/2.4/install.html

 

cd /

mkdir apm

cd /apm

wget http://apache.mirror.cdnetworks.com//httpd/httpd-2.4.10.tar.gz

tar xvfC httpd-2.4.10.tar.gz .

 

cd httpd-2.4.10

./configure --prefix=/apm/apache

....

APR 어쩌구 하면서 오류발생됨

http://apr.apache.org 에 가서 apr 그리고 apr-util 을 다운로드 받고 설치

 

cd /apm

mkdir apr

cd apr

wget http://apache.mirror.cdnetworks.com//apr/apr-1.5.1.tar.gz

tar xvfC apr-1-5-1.tar.gz .

cd apr-1-5-1

./configure

make;make install

 

cd /apm

mkdir aprutil

cd aprutil

wget http://apache.mirror.cdnetworks.com//apr/apr-util-1.5.3.tar.gz

tar xvfC apr-util-1.5.3.tar.gz​ .

./configure --with-apr=/usr/local/apr

make;make install

 

yum -y install pcre-devel

 

다시 아파치 디렉토리로 이동

./configure --prefix=/apm/apache

make;make install

 

나는 apache 계정을 만들고 apache 계정으로만 apache 를 돌리고 싶었다.

apache 계정 생성

 

useradd apache

passwd apache

 

cd /apm

 

chown -R apache apache

chgrp -R apache apache

 

그리고 나서 아파치/bin 디렉토리에서

./apachectl start 하니 딱 하고 애러가 뜬다...

 

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

 

 

퍼미션 문제가 발생한다. 이때 아래와 같이 해결한다.

 

chown root:apache httpd

chmod +s httpd

 

./apachectl start

 

ps -ef|grep httpd

 

정상가동되는걸 확인할 수 있다.

728x90
반응형