apache 설치 순서 openssl -> apr -> apr-util -> pcre -> apache
※ 부가프로그램이 설치 되어 있어야 하기 때문에 순서대로 설치해주어야한다.
컴피그 전 OPENSSL을 사용시 openssl-devel을 깔아주여야 한다.
yum -y install gcc gcc-c++ termcap libtermcap libtermcap-devel gdbm-devel libxml* freetype* libpng* libjpeg* openssl-devel bzip2 bzip2-devel curl curl-devel ncurses-devel openssl-devel
1.openssl-1.0.2o
openssl 사용시 openssl 먼저 설치
32bit일 경우
./config -prefix=/usr/local/webroot/openssl
64bit일 경우
tar xvf openssl-1.0.2o.tar.gz
cd openssl-1.0.2o
./config --prefix=/usr/local/webbase/openssl -fPIC
make && make install && cd ..
설치 이후
openssl 버전 확인
[root@localhost openssl-1.0.1k]# openssl version
OpenSSL 1.0.1i 6 Aug 2014
버전이 변경되어야 설치 완료된것 이기 때문에 아래 작업이 필요하다.
==========================================================================================
openssl 파일 복사
[root@localhost bin]# cd /usr/bin/
[root@localhost bin]# cp openssl openssl.bak
cp: overwrite `openssl.bak'? y
[root@localhost bin]# cp /usr/local/webbase/openssl/bin/openssl /usr/bin/openssl
cp: overwrite `/usr/bin/openssl'? y
==========================================================================================
openssl 버전 재확인(완료)
[root@localhost bin]# openssl version
OpenSSL 1.0.2o 8 Jan 2015
==========================================================================================
2. 추가 부가 프로그램 설치 및 아파치 설치
cd apr-1.4.6
./configure --prefix=/usr/local/webbase/apps/apr && make && make install && cd ..
cd apr-util-1.4.1/
./configure --prefix=/usr/local/webbase/apps/apr-util --with-apr=/usr/local/webbase/apps/apr && make && make install && cd ..
cd pcre-8.31
./configure --prefix=/usr/local/webbase/apps/pcre && make && make install && cd ..
/2.4 설치
cd /usr/local/webbase/httpd-2.4.3
./configure --prefix=/usr/local/webbase/apache --with-apr=/usr/local/webbase/apps/apr --with-apr-util=/usr/local/webbase/apps/apr-util --with-pcre=/usr/local/webbase/apps/pcre --enable-module=so --enable-mods-shared=all --enable-so --enable-rewrite --enable-ssl=shared --with-ssl=usr/local/webbase/openssl && make && make install && cd ..
--with-ssl=/usr/local/webbase/apm/openssl1.1.0 <- 설치된 ssl 경로
(압축푼 경로 ㄴㄴ)
----------------------------------------------------------------------------------------------------------------
/2.2 설치시
tar xvf httpd-2.2.17.tar.gz
./configure --prefix=/usr/local/webbase/apache --enable-modules=so --enable-mods-shared=all --enable-so --enable-rewirte --enable-ssl=shared --with-ssl
make
make install
----------------------------------------------------------------------------------------------------------------
/usr/local/webbase/apache/conf 에 httpd.conf 파일에서
사용자 = daemon -> nobody
그룹사용자 = daemon -> nobody
#ServerName www.sample.com:80
-> #(주석) 삭제 /// www.sample.com:80은 localhost:80으로 변경
홈디렉토리 변경시
DocumentRoot "변경하고자하는 경로“
<Directory "변경하고자하는 경로“>
ps -ef | grep httpd /*프로세스 확인 명령어*/
iptables -F /*방화병 내리기*/
/usr/local/webbase/apache/bin/apachectl start
'서버 > Linux' 카테고리의 다른 글
"Linux matters." (0) | 2018.10.30 |
---|---|
[Linux] ARP(Apache Portable Runtime) (0) | 2018.10.30 |