<Table of Contents>Ⅰ. OVERVIEW
1. WEBLOGIC SERVER-12.2.1.4 설치 (SILENT)2. MANAGED SERVER 구성 및 기동 3. SERVER START/STOP SCRIPTS 생성 4. WEB APPLICATION 배포 Ⅲ. APACHE HTTP SERVER 설치1. 패키지파일 다운로드2. APR-1.7.0 설치 3. APR-UTIL-1.6.1 설치 4. PCRE-8.44 설치 5. OPENSSL-1.1.1G 설치 6. HTTPD-2.4.43 설치 7. APACHE 세부 설정 Ⅳ. WLS & APACHE 연동1. WEBLOGIC SERVER – APACHE HTTP SERVER 연동 |
목차 중, Apache HTTP Server 설치에 관한 파트입니다.
Ⅲ. Apache HTTP Server 설치
1. 패키지파일 다운로드
■ apr, apr-util 다운로드 링크
https://archive.apache.org/dist/apr/ ■ pcre 다운로드 링크 ftp://ftp.pcre.org/pub/pcre/ ■ httpd 다운로드 링크 http://archive.apache.org/dist/httpd/ ■ openssl 다운로드 링크 https://www.openssl.org/source/ |
cmd> cd ~/install
cmd> tar xvfz apr-1.7.0.tar.gz cmd> tar xvfz apr-util-1.6.1.tar.gz cmd> tar xvfz pcre-8.44.tar.gz cmd> tar xvfz openssl-1.1.1g.tar.gz cmd> tar xvfz httpd-2.4.43.tar.gz cmd> sudo mkdir -p /sw/web/apache cmd> cd /sw cmd> sudo chown -R app:app web |
2. apr-1.7.0 설치
cmd> cd ~/install/apr-1.7.0
cmd> ./configure --prefix=/sw/web/apache/apr/1.7.0 configure: error: in `/home/app/install/apr-1.7.0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details # 에러 발생 cmd> sudo yum install -y gcc cmd> ./configure --prefix=/sw/web/apache/apr/1.7.0 rm: cannot remove ‘libtoolT’: No such file of directory # 에러 발생 cmd> cp -arp libtool libtoolT cmd> ./configure --prefix=/sw/web/apache/apr/1.7.0 cmd> make cmd> make install |
-a : 원본 파일의 속성, 링크 정보들을 그대로 유지
-r : 디렉토리를 복사할 경우 하위 디렉토리와 파일 모두 복사
-p : 원본 파일의 소유주, 그룹, 권한, 시간 정보를 그대로 유지
3. apr-util-1.6.1 설치
cmd> cd ~/install/apr-util-1.6.1
cmd> ./configure --prefix=/sw/web/apache/apr-util/1.6.1 --with-apr=/sw/web/apache/apr/1.7.0 cmd> make xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory #include <expat.h> ^ compilation terminated. make[1]: *** [xml/apr_xml.lo] 오류 1 make[1]: Leaving directory `/home/app/install/apr-util-1.6.1' make: *** [all-recursive] 오류 1 # 에러 발생 cmd> sudo yum -y install expat-devel cmd> make cmd> make install |
4. pcre-8.44 설치
cmd> cd ~/install/pcre-8.44
cmd> ./configure --prefix=/sw/web/apache/pcre-8.44 configure: error: Invalid C++ compiler or C++ compiler flags # 에러 발생 cmd> sudo yum -y install gcc-c++ cmd> ./configure --prefix=/sw/web/apache/pcre-8.44 cmd> make cmd> make install |
5. openssl-1.1.1g 설치
cmd> cd ~/install/openssl-1.1.1g
cmd> ./config --prefix=/sw/web/apache/openssl-1.1.1g cmd> make cmd> make install |
6. httpd-2.4.43 설치
cmd> cd ~/install/httpd-2.4.43
cmd> ./configure --prefix=/sw/web/apache/2.4.43 \ --with-apr=/sw/web/apache/apr/1.7.0 \ --with-apr-util=/sw/web/apache/apr-util/1.6.1 \ --with-pcre=/sw/web/apache/pcre/8.44 \ --with-ssl=/sw/web/apache/openssl/1.1.1g \ --enable-ssl --enable-rewrite --enable-so cmd> make collect2: error: ld returned 1 exit status make[2]: *** [htpasswd] Error 1 make[2]: Leaving directory `/home/app/install/httpd-2.4.43/support' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/app/install/httpd-2.4.43/support' make: *** [all-recursive] Error 1 # 에러 발생 cmd> cp -r ~/install/apr-1.7.0 ~/install/httpd-2.4.43/srclib/apr cmd> cp -r ~/install/apr-util-1.6.1 ~/install/httpd-2.4.43/srclib/apr-util cmd> make clean cmd> ./configure --prefix=/sw/web/apache/2.4.43 \ --with-pcre=/sw/web/apache/pcre/8.44 \ --with-ssl=/sw/web/apache/openssl/1.1.1g \ --with-included-apr \ --with-included-apr-util \ --enable-ssl --enable-rewrite --enable-so cmd> make cmd> make install |
7. Apache 세부 설정
cmd> sudo vi /sw/web/apache/2.4.43/conf/httpd.conf
## ServerName http://192.168.56.101:80 ## User app Group app ## Require all granted ## |
(1-4) bin/httpd 소유권 및 모드 수정 (Set UID)
cmd> cd /sw/web/apache/2.4.43/bin
cmd> sudo chown root httpd cmd> sudo chmod 4750 httpd |
(1-5) 아파치 시작 명령 및 웹서버 접속 시 에러 메세지 확인
cmd> /sw/web/apache/2.4.9/bin/apachectl -k start
|
cmd> sudo firewall-cmd --permanent --add-port=80/tcp
cmd> sudo firewall-cmd --reload cmd> sudo firewall-cmd –list-all |
cmd> sudo vi /usr/lib/systemd/system/httpd.service
## [Unit] Description=The Apache HTTP Server (httpd-2.4.43) After=network.target syslog.target [Service] Type=forking User=app Group=app ExecStart=/sw/web/apache/2.4.43/bin/apachectl start ExecStop=/sw/web/apache/2.4.43/bin/apachectl graceful-stop ExecReload=/sw/web/apache/2.4.43/bin/apachectl graceful PrivateTmp=true LimitNOFILE=infinity [Install] WantedBy=multi-user.target ## |
cmd> sudo systemctl daemon-reload
cmd> sudo systemctl enable httpd.service cmd> sudo systemctl start httpd.service |
※ 데몬 등록을 통한 웹서버 자동 실행은 실제로 잘 사용되지는 않는다. 보통
웹서버 운영 중 시작/종료는 쉘 스크립트 형태로 수동 실행하기 때문이다. |
'Linux' 카테고리의 다른 글
[Linux] 웹로직12c & 아파치2.4 연동 가이드 (3) - WEB&WAS 연동 (0) | 2022.12.08 |
---|---|
[Linux] 웹로직12c & 아파치2.4 연동 가이드 (1) - WLS 설치 (0) | 2022.12.08 |