티스토리 뷰
728x90
출처
- (웹서버) linux에서 apache 2.4 버전을 컴파일할 때 'all-recursive' failed 가 발생? : 클리앙
- [Ubuntu 16.04]
그런 파일이나 디렉터리가 없습니다 해결 방법 - 개발자의 하루 :: configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
- 19.04 - apache2 service is masked - Ask Ubuntu
- 컴파일과 설치 - Apache HTTP Server Version 2.4
- Linux WEB - Apache2.4.x 버전 설치
- fmd1225's One day :: [아파치] 설치
필수 라이브러리 설치
$ sudo apt install libexpat1-dev
PCRE 설치
pi@Kubuntu:/bluesanta/apps$ wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz pi@Kubuntu:/bluesanta/apps$ tar xvfz pcre-8.44.tar.gz pi@Kubuntu:/bluesanta/apps$ cd pcre-8.44/ pi@Kubuntu:/bluesanta/apps/pcre-8.44$ ./configure --prefix=/usr/local/pcre-8.44 pi@Kubuntu:/bluesanta/apps/pcre-8.44$ make pi@Kubuntu:/bluesanta/apps/pcre-8.44$ sudo make install
Apache 웹서버 컴파일 & 설치
pi@Kubuntu:~$ cd /bluesanta/apps pi@Kubuntu:/bluesanta/apps$ wget https://downloads.apache.org//httpd/httpd-2.4.46.tar.gz pi@Kubuntu:/bluesanta/apps$ tar xvfz httpd-2.4.46.tar.gz pi@Kubuntu:/bluesanta/apps$ cd httpd-2.4.46/ pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ cd srclib pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ tar xvfz apr-1.7.0.tar.gz pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ mv apr-1.7.0 apr pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ tar xvfz apr-util-1.6.1.tar.gz pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ mv apr-util-1.6.1 apr-util pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ tar xvfz pcre-8.44.tar.gz pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ mv pcre-8.44 pcre pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ cd .. pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ ./configure --prefix=/bluesanta/apps/apache24 --with-pcre=/usr/local/pcre-8.44 --enable-cgi --enable-info --enable-deflate --enable-ssl --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-ftp --enable-expires --enable-headers --enable-rewrite --enable-so --with-included-apr --with-included-apr-util --with-included-pcre pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ make pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ make install
Apache 웹서버 환경 설정
pi@Kubuntu:/bluesanta/apps/apache24$ cd conf pi@Kubuntu:/bluesanta/apps/apache24/conf$ vi httpd.conf
ServerName 주석을 풀고 localhost로 설정
#ServerName www.example.com:80 ServerName localhost
서비스 등록 파일 apache2.service 생성
pi@Kubuntu:~$ cd /bluesanta/apps/apache24/bin/ pi@Kubuntu:/bluesanta/apps/apache24/bin$ vi apache2.service
apache2.service 내용
[Unit] Description=The Apache HTTP Server After=network.target remote-fs.target nss-lookup.target Documentation=https://httpd.apache.org/docs/2.4/ [Service] Type=forking Environment=APACHE_STARTED_BY_SYSTEMD=true ExecStart=/bluesanta/apps/apache24/bin/apachectl start ExecStop=/bluesanta/apps/apache24/bin/apachectl stop ExecReload=/bluesanta/apps/apache24/bin/apachectl graceful PrivateTmp=true Restart=on-abort [Install] WantedBy=multi-user.target
apache2.service 파일 /etc/systemd/system 디렉토리에 복사
pi@Kubuntu:/bluesanta/apps/apache24/bin$ chmod +x apache2.service pi@Kubuntu:/bluesanta/apps$ sudo cp apache2.service /etc/systemd/system
Apache 서비스 등록
pi@Kubuntu:/bluesanta/apps/apache24/bin$ sudo systemctl enable apache2 Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /etc/systemd/system/apache2.service.
Apache 서비스 실행
pi@Kubuntu:/bluesanta/apps/apache24/bin$ sudo systemctl start apache2
Apache 서비스 상태 확인
$ sudo systemctl status apache2 ● apache2.service - The Apache HTTP Server Loaded: loaded (/etc/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-11-19 00:06:39 KST; 3s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 154499 ExecStart=/bluesanta/apps/apache24/bin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 154519 (httpd) Tasks: 82 (limit: 18693) Memory: 6.9M CGroup: /system.slice/apache2.service ├─154519 /bluesanta/apps/apache24/bin/httpd -k start ├─154520 /bluesanta/apps/apache24/bin/httpd -k start ├─154521 /bluesanta/apps/apache24/bin/httpd -k start └─154522 /bluesanta/apps/apache24/bin/httpd -k start 11월 19 00:06:39 Kubuntu systemd[1]: Starting The Apache HTTP Server... 11월 19 00:06:39 Kubuntu systemd[1]: Started The Apache HTTP Server.
Apache 웹서버 컴파일 참조 라이브러리 설치
srclib 디렉토리 사용전에 사용했던 것으로 불필요 - 나중에 참고용으로 남겨둠
apr 라이브러리 설치
pi@Kubuntu:/bluesanta/apps$ wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz pi@Kubuntu:/bluesanta/apps$ tar xvfz apr-1.7.0.tar.gz pi@Kubuntu:/bluesanta/apps$ cd apr-1.7.0/ pi@Kubuntu:/bluesanta/apps/apr-1.7.0$ ./configure pi@Kubuntu:/bluesanta/apps/apr-1.7.0$ make pi@Kubuntu:/bluesanta/apps/apr-1.7.0$ sudo make install ... 생략 ... ---------------------------------------------------------------------- /usr/bin/install -c -m 644 apr.exp /usr/local/apr/lib/apr.exp /usr/bin/install -c -m 644 apr.pc /usr/local/apr/lib/pkgconfig/apr-1.pc for f in libtool shlibtool; do \ if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/local/apr/build-1; fi; \ done /usr/bin/install -c -m 755 /bluesanta/apps/apr-1.7.0/build/mkdir.sh /usr/local/apr/build-1 for f in make_exports.awk make_var_export.awk; do \ /usr/bin/install -c -m 644 /bluesanta/apps/apr-1.7.0/build/${f} /usr/local/apr/build-1; \ done /usr/bin/install -c -m 644 build/apr_rules.out /usr/local/apr/build-1/apr_rules.mk /usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config
apr-util 라이브러리 설치
pi@Kubuntu:/bluesanta/apps$ wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz pi@Kubuntu:/bluesanta/apps$ tar xvfz apr-util-1.6.1.tar.gz pi@Kubuntu:/bluesanta/apps$ cd apr-util-1.6.1/ pi@Kubuntu:/bluesanta/apps/apr-util-1.6.1$ ./configure -with-apr=/usr/local/apr pi@Kubuntu:/bluesanta/apps/apr-util-1.6.1$ make pi@Kubuntu:/bluesanta/apps/apr-util-1.6.1$ sudo make install ... 생략 ... ---------------------------------------------------------------------- /usr/bin/install -c -m 644 aprutil.exp /usr/local/apr/lib /usr/bin/install -c -m 755 apu-config.out /usr/local/apr/bin/apu-1-config
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 레이싱모델 익스트림 포토 페스티벌
- 서울오토살롱
- Linux
- 송주경
- 전예희
- ble
- BPI-M4
- Java
- android
- ubuntu
- KOBA
- ffmpeg
- MySQL
- oracle
- 일본여행
- Delphi
- sas2009
- Delphi Tip
- NDK
- flex
- Spring MVC
- JavaScript
- koba2010
- 동경
- 지스타2007
- 튜닝쇼 2008
- Mac
- SAS
- Spring
- Xcode
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
글 보관함