[CentOS 7] Apache 컴파일

2017. 8. 22. 15:45·DEV/Linux
# 컴파일 설치 준비
https://zetawiki.com/wiki/CentOS_%EC%BB%B4%ED%8C%8C%EC%9D%BC_%EC%84%A4%EC%B9%98_%EC%A4%80%EB%B9%84

# CentOS 버전확인
cat /etc/*-release | uniq

# 개발 환경 


CentOS Linux release 7.2.1511 (Core)


# 최신 버전 확인 및 다운로드

cd /usr/local/src

wget http://ftp.neowiz.com/apache/httpd/httpd-2.4.27.tar.bz2 (http://ftp.neowiz.com/apache/httpd/ 에서 버전확인)

wget http://ftp.neowiz.com/apache/apr/apr-1.6.2.tar.bz2  (http://ftp.neowiz.com/apache/apr/ 에서 버전확인)

wget http://ftp.neowiz.com/apache/apr/apr-util-1.6.0.tar.bz2  (http://ftp.neowiz.com/apache/apr/ 에서 버전확인)

wget http://downloads.sourceforge.net/project/pcre/pcre/8.41/pcre-8.41.tar.bz2 (https://sourceforge.net/projects/pcre/files/pcre/ 에서 버전확인)

# 압축 해제

tar xvf apr-1.6.2.tar.bz2
tar xvf apr-util-1.6.0.tar.bz2
tar xvf httpd-2.4.27.tar.bz2
tar xvf pcre-8.41.tar.bz2
mv apr-1.6.2 ./httpd-2.4.27/srclib/apr
mv apr-util-1.6.0 ./httpd-2.4.27/srclib/apr-util

# tar 에러 발생시

tar (child): cannot run bzip2: No such file or directory

tar (child): trying lbzip2

tar (child): lbzip2: Cannot exec: No such file or directory

tar (child): Error is not recoverable: exiting now

tar: Child returned status 2

tar: Error is not recoverable: exiting now

yum install bzip2 bzip2-devel

# Prec 설치
cd /usr/local/src/pcre-8.41
./configure
make
make install

# 아파치 설치

cd /usr/local/src/httpd-2.4.27

./configure --prefix=/usr/local/apache2

make

make install

# 아파치 설치중 llibexppat.so 링크 오류

http://idkook.tistory.com/20


# undefined reference to `apr_os_uuid_get' 에러 발생 시

./configure 뒤에 --with-included-apr 추가

# xml/apr_xml.c:35:19: error: expat.h: No such file or directory 에러 yum install expat expat-devel

# 아파치 시작

vi /usr/local/apache2/conf/httpd.conf

-> ServerName 127.0.0.1:80

/usr/local/apache2/bin/httpd -k start

ps -ef | grep httpd | grep -v grep

netstat -anp | grep httpd

curl http://127.0.0.1


저작자표시 비영리 변경금지 (새창열림)

'DEV > Linux' 카테고리의 다른 글

[CentOS 7] Tomcat8 컴파일  (0) 2017.08.23
[CentOS 7] PHP 컴파일  (0) 2017.08.22
Linux vi편집기 줄번호 보이게 하기  (0) 2017.08.21
[CentOS 7] Mariadb 10 컴파일  (0) 2017.08.20
Linux 명령어  (0) 2017.08.12
'DEV/Linux' 카테고리의 다른 글
  • [CentOS 7] Tomcat8 컴파일
  • [CentOS 7] PHP 컴파일
  • Linux vi편집기 줄번호 보이게 하기
  • [CentOS 7] Mariadb 10 컴파일
modric
modric
  • modric
    dev log
    modric
  • 전체
    오늘
    어제
    • 분류 전체보기 (70)
      • DEV (58)
        • Linux (12)
        • JavaScript (5)
        • PHP (4)
        • MySql (4)
        • HTML (7)
        • CSS (9)
        • Spring (13)
        • flutter (1)
        • 오류 (2)
        • devOps (1)
      • 기타 (5)
      • 트렌드 (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 미디어로그
    • 위치로그
    • 방명록
    • HTML
    • CSS
    • PHP
    • JavaScript
    • Spring
    • Linux
  • 링크

    • 공부하는 소담아빠
    • 타올이
  • 공지사항

  • 인기 글

  • 태그

    height
    js
    100!
    팩토리얼
    넘침
    Safari
    테두리
    Android
    iframe
    php
    ios
    제거
    centos 7
    Destination
    linux
    centos7
    mariadb10
    build
    lastinsertid
    mariadb 10
    메타버스
    factorial
    클릭
    터치
    파란색
    exist
    컴파일
    update
    크롬
    MYSQL
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
modric
[CentOS 7] Apache 컴파일
상단으로

티스토리툴바