[Apache2.4 Source 설치]
1. 빌드 환경 설정
```
- yum install -y make gcc g++ gcc-c++ autoconf automake libtool pkgconfig findutils oepnssl openssl-devel openldap-devel pcre-devel libxml2-devel lua-devel curl curl-devel libcurl-devel flex
```
2. 관련 모듈 다운로드 및 설치
apr 다운로드
```
cd /usr/local/src
wget http://mirror.apache-kr.org/apr/apr-1.6.5.tar.gz
tar xvfz apr-1.6.5.tar.gz
cd apr-1.6.5
./configure --prefix=/usr/local/apr
make
make install
```
apr-util 다운로드
```
yum install expat-devel
cd /usr/local/src
wget http://mirror.apache-kr.org/apr/apr-util-1.6.1
tar.gz tar xvzf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --with-apr=/usr/local/apr/
make
make install
```
pcre 다운로드
```
cd /usr/local/src
wget http://downloads.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz
tar xvzf pcre-8.37.tar.gz
cd pcre-8.37
./configure
--prefix=/usr/local/pcre
make
make install
```
3. Apache 다운로드 및 설치
```
cd /usr/local/src
wget http://apache.mirror.cdnetworks.com//httpd/httpd-2.4.43.tar.gz
tar xvfz httpd-2.4.43.tar.gz
mv apr-1.5.2 httpd-2.4.43/srclib/apr
mv apr-util-1.5.4 httpd-2.4.43/srclib/apr-util
cd httpd-2.4.43
./configure --enable-module=so --enable-mods-shared=most --enable-lib64 --libdir=/usr/lib64 --enable-maintainer-mode --enable-deflate --enable-headers --enable-rewrite --enable-ssl --enable-proxy --enable-proxy-http --enable-proxy-ajp --enable-proxy-balance --with-pcre=/usr/local/pcre --prefix=/usr/local/apache
make
make install
```
*** make[2]: * [htpasswd] 오류 1 ***
***해결***
vi build/config_vars.mk 파일 수정해서
AP_LIBS = 시작하는 라인을 찾아
-lexpat를 추가 후 다시 make
4. Apache 웹서버 서비스 등록 및 설정
httpd 서비스 파일 만들기
```
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
vim /etc/init.d/httpd
*** chkconfig --add httpd
# chkconfig: 2345 90 90
# description: init file for Apache server daemon
# processname: /usr/local/apache/bin/apachectl
# config: /usr/local/apache/conf/httpd.conf
# pidfile: /usr/local/apache/logs/httpd.pid
// 위의 내용을 주석까지 그대로 추가
```
httpd.conf 파일 수정
```
vim /usr/local/apache/conf/httpd.conf
#ServerName localhost -> ServerName localhost
// 주석 제거
#LoadModule unique_id_module modules/mod_unique_id.so
// 위의 행을 주석처리하고 저장
```
httpd 서비스 시작 및 실행확인
```
systemctl start httpd
systemctl enable httpd
ps -ef | grep httpd
```
5. 방화벽 설정(iptables)
```
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
* iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
//추가
systemctl restart iptables
```
주소창에 localhost & IP주소 입력시 텍스트 출력
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
18 | ip 접근회수 | ㅇㅇ | 2020.11.16 | 63 |
» | 아파치 2.4 | 컴코리아 | 2020.08.14 | 85 |
16 | centos에 Ioncube 설치하기 | 컴코리아 | 2020.08.06 | 84 |
15 | PHP5 버젼 | 컴코리아 | 2020.08.05 | 304 |
14 | APM 버전 확인 | 컴코리아 | 2020.07.17 | 81 |
13 | APM설치 mysql [1] | 컴코리아 | 2020.07.09 | 60 |
12 | APM설치 Aphache | 컴코리아 | 2020.07.09 | 75 |
11 | 윈도우(Window) 윈도우 바로가기 ncpa.cpl 명령어 | 컴코리아 | 2020.04.17 | 198 |
10 |
윈도우(Window) R1Soft Backup Agent
![]() | 컴코리아 | 2020.04.17 | 78 |
9 | 리눅스(linux) vi 에디터 사용방법 (vim 단축키 정리) | 컴코리아 | 2020.04.13 | 51 |
8 |
리눅스(linux) 디스크 용량 명령어 df,du
![]() | 컴코리아 | 2020.04.13 | 56 |
7 |
리눅스(linux) Screen 명령어
![]() | 컴코리아 | 2020.04.12 | 63 |
6 |
리눅스(linux) iptables 특정 아이피만 특정포트 접속
![]() | 컴코리아 | 2020.04.11 | 79 |
5 |
리눅스(linux) iptables 명령어
![]() | 컴코리아 | 2020.04.11 | 80 |
4 |
리눅스(linux) CPU 및 RAM 사양 확인
![]() | 컴코리아 | 2020.04.11 | 98 |
3 | 리눅스(linux) SSH 설정 포트변경 - /etc/ssh/sshd_config [CentOS] | 컴코리아 | 2020.04.11 | 136 |
2 | 리눅스(linux) shutdown 그리고 init 명령어 | 컴코리아 | 2020.04.11 | 100 |
1 |
리눅스(linux) PS 명령어
![]() | 컴코리아 | 2020.04.11 | 95 |
HELLOCBT