25 02 2021
Centos7 apache install (수동설치)
root권한으로 실행합니다.
1.필수 라이브러리 설치
1 |
[root@hae app]# yum install gcc gcc-c++ expat-devel.x86_64 pcre-devel |
3.apr, apr-util, pcre,httpd 다운로드 및 컴파일
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 31 32 33 34 35 |
[root@hae install]# wget http://mirror.apache-kr.org/httpd/httpd-2.4.46.tar.gz [root@hae install]# wget http://mirror.apache-kr.org/apr/apr-1.7.0.tar.gz [root@hae install]# wget http://mirror.apache-kr.org/apr/apr-util-1.6.1.tar.gz [root@hae install]# wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz [root@hae install]# tar zxvf apr-1.7.0.tar.gz [root@hae install]# tar zxvf apr-util-1.6.1.tar.gz [root@hae install]# tar zxvf httpd-2.4.46.tar.gz [root@hae install]# tar zxvf pcre-8.44.tar.gz [root@hae install]# mv apr-1.7.0 apr-util-1.6.1 pcre-8.44 httpd-2.4.46 /usr/local/src [root@hae install]# cd /usr/local/src/ [root@hae src]# ls apr-1.7.0 apr-util-1.6.1 pcre-8.44 - apr install [root@hae src]# cd apr-1.7.0/ [root@hae apr-1.7.0]# ./configure --prefix=/usr/local/src/apr-1.7.0 [root@hae apr-1.7.0]# make && make install - apr-util install [root@hae src]# cd apr-util-1.6.1/ [root@hae apr-util-1.6.1]# ./configure --prefix=/usr/local/src/apr-util-1.6.1 --with-apr=/usr/local/src/apr-1.7.0 [root@hae apr-util-1.6.1]# make && make install - pcre install [root@hae src]# cd pcre-8.44/ [root@hae pcre-8.44]# ./configure --prefix=/usr/local/src/apr-util-1.6.1 --with-apr=/usr/local/src/apr-1.7.0 [root@hae pcre-8.44]# make && make install - apache install [root@hae src]# cd httpd-2.4.46/ [root@hae httpd-2.4.46]#./configure --prefix=/app/web/apache2 --enable-so --enable-rewrite --enable-proxy --enable-ssl --enable-mods-shared=all --enable-modules=shared --with-apr=/usr/local/src/apr-1.7.0 --with-apr-util=/usr/local/src/apr-util-1.6.1 [root@hae httpd-2.4.46]# make && make install |
작동확인
[root@hae bin]# cd /app/web/apache2/bin
[root@hae bin]# ./apachectl start
[root@hae bin]# netstat -tulpn | grep LISTEN
tcp 0 0 0.0.0.0:7990 0.0.0.0:* LISTEN 9188/ssh
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1001/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1595/master
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 9198/ssh
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 9192/ssh
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 9196/ssh
tcp 0 0 0.0.0.0:21521 0.0.0.0:* LISTEN 9186/ssh
tcp6 0 0 :::22 :::* LISTEN 1001/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1595/master
tcp6 0 0 :::33060 :::* LISTEN 9869/mysqld
tcp6 0 0 :::3306 :::* LISTEN 9869/mysqld
tcp6 0 0 :::80 :::* LISTEN 31334/httpd
별첨
tomcat was 사용자계정생성 및 그룹생성
그룹
[root@hae webapps]# groupadd wasmanager
[root@hae webapps]# useradd -g wasmanager -m -s /bin/bash tomcatadmin
mod_jk 연동
# wget http://apache.mirror.cdnetworks.com/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.48-src.tar.gz
# tar -zxvf tomcat-connectors-1.2.48-src.tar.gz
[root@hae install]# mv tomcat-connectors-1.2.48-src /usr/local/src
[root@hae bin]# cd /usr/local/src/tomcat-connectors-1.2.48-src/
[root@hae tomcat-connectors-1.2.48-src]# cd native/
[root@hae native]# ./configure –with-apxs=/app/web/apache2/bin/apxs
[root@hae native]# make && make install
Comments are currently closed.