Contents
see List작성일 2015. 03. 10.
yum install gcc-c++
yum install openssl-devel.x86_64
cd /usr/local/src
wget http://ftp.kaist.ac.kr/Apache/httpd/httpd-2.4.10.tar.gz\t
wget http://archive.apache.org/dist/apr/apr-1.5.1.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.3.tar.gz
wget http://downloads.sourceforge.net/pcre/pcre-8.35.tar.bz2
tar xvfz apr-1.5.1.tar.gz
tar xvfz apr-util-1.5.3.tar.gz
tar xvfz httpd-2.4.10.tar.gz
tar xvf pcre-8.35.tar.bz2
cd /usr/local/src/apr-1.5.1
./configure --prefix=/usr/local/apr
make
make install
cd /usr/local/src/apr-util-1.5.3
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
cd /usr/local/src/pcre-8.35
./configure --prefix=/usr/local
make
make install
cd /usr/local/src/httpd-2.4.10
./configure --prefix=/usr/local/apache \\
--enable-rule=SHARED_CORE \\
--enable-so \\
--enable-rewrite \\
--enable-vhost-alias \\
--enable-ssl \\
--enable-proxy \\
--enable-shared=max \\
--enable-modules=shared \\
--enable-mods-shared=all \\
--with-apr=/usr/local/apr \\
--with-charset=utf-8 \\
--with-mpm=prefork \\
--with-apr-util=/usr/local/apr-util
make
make install
wget http://apache.mirror.cdnetworks.com/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gz -O connector.tar.gz
tar -zxvf connector.tar.gz
cd tomcat-connectors-1.2.40-src/native/
./configure --with-apxs=/usr/local/apache/bin/apxs
make && make install
cd /usr/local/apache/conf/
vi workers.properties
worker.list=pem
worker.pem.port=8009
worker.pem.host=localhost
worker.pem.type=ajp13
vi /usr/local/apache2/conf/httpd.conf\\
(변경전) #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
(변경후) LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
# 모듈 로드 부분 마지막에 삽입
LoadModule jk_module modules/mod_jk.so
# 모듈 설정 부분에 삽입
<IfModule jk_module>
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel error
</IfModule>
(변경전) #Include conf/extra/httpd-vhosts.conf
(변경후) Include conf/extra/httpd-vhosts.conf
#Listen 9090 주석처리
vi /usr/local/apache/conf/extra/httpd-vhosts.conf
Listen 9090
<VirtualHost *:9090>
ServerAdmin [email protected]
DocumentRoot /data/test/webapp
ServerName softmoa.com.
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
JkMount /*.jsp pem
JkMount /*.phyjax pem
JkMount /*.phy pem
JkMount /*.phyin pem
JkMount / pem
JkMount /j_spring_security_logout pem
JkMount /j_spring_security_check pem
<Directory "/home/test/webapp">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
chown apache:apache -R /usr/local/apache
cd /usr/local/apache/bin
chmod +s httpd
vi /usr/lib/systemd/system/apache.service
[Unit]
Description=apache2 Service
After=syslog.target
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/apache/bin/apachectl start
ExecStop=/usr/loacal/apache/bin/apachectl graceful-stop
ExecReload=/usr/local/apache/bin/apachectl graceful
PrivateTmp=true
LimitNOFILE=infinity
[Install]
WantedBy=multi-user.target
systemctl enable apache 자동 시작 등록
ps. 톰캣과 연결이 안될경우 8009 (변경했을경우 해당하는 포트) 포트를 tomcat 서버에서 열어줘야하며 아파치에서 사용하는 포트도 아파치 서버에서 열어줘야한다.
os
| No | 작성일 | Title |
|---|---|---|
| 245 | 2015. 03. 11. | [ centos ] centos /lib/ld-linux.so.2: bad ELF interpreter: 그런 파일이나 디렉터리가 없습니다 오류 |
| 244 | 2015. 03. 10. | [ centos ] centos 7 apache 설치 및 tomcat 연동 |
| 243 | 2015. 03. 10. | [ CentOS ] centos 7 console boot |
| 226 | 2015. 03. 09. | [ centos ] centos 7 에 tomcat 서비스등록 ( systemclt ) |
| 225 | 2015. 03. 08. | [ centos ] centos 7 samba 설치하기 공유 폴더 윈도우에서 사용하기 |
| 224 | 2015. 03. 08. | [ centos ] centos 7 service 관리 ( systemctl ) |
| 223 | 2015. 03. 08. | [ centos ] centos 7 firewall ( 방화벽 ) 설정 |
| 183 | 2015. 03. 08. | [ centos ] centos 7 nfs 설정 |
| 147 | 2015. 02. 10. | [ OS ] 로드밸런싱 ( load balancing ) 과 세션 클러스트링 ( session clustering )의 개념 |
| 146 | 2015. 01. 30. | [ windows ] 윈도우 서버 원격 접속시 라이선스 문제 발생할때 |