apache-tomcat

Posted 鸿杨杨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache-tomcat相关的知识,希望对你有一定的参考价值。

Apache

yum -y install httpd httpd-devel gcc gcc-c++

Tomcat

jdk

rpm -ivh jdk-8u20-linux-x64.rpm

vi /etc/profile

###java use####

export JAVA_HOME=/usr/java/jdk1.8.0_20

export JAVA_BIN=/usr/java/jdk1.8.0_20/bin

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

退

/etc/profile 

source /etc/profile  

Java

java -version  

Tomcat

mv apache-tomcat-6.0.43/ /usr/local/tomcat

cd /usr/local/tomcat/bin/

tomcat

./startup.sh 

ps -ef | grep tomcat

访Tomcat

Apachemod_jk

uri访(mod_jk)

tar zxf jakarta-tomcat-connectors-1.2.15-src.tar.gz

cd jakarta-tomcat-connectors-1.2.15-src/jk/native/

./configure --with-apxs=/usr/sbin/apxs

make

make  install

mod_jk.so

ll /etc/httpd/modules/mod_jk.so

mod_jk

cd /usr/local/src/jakarta-tomcat-connectors-1.2.15-src/jk/conf/

cp workers.properties /etc/httpd/conf

workers.properties

vim /etc/httpd/conf/workers.properties

workers.properties

worker.list=worker1

worker.worker1.type=ajp13

worker.worker1.host=172.18.31.3localhost

worker.worker1.port=8009

 

Apache

vim /etc/httpd/conf/httpd.conf

DirectoryIndexindex.jsp

LoadModule jk_module modules/mod_jk.so #mod_jk.so

JkWorkersFile  /etc/httpd/conf/workers.properties  #mod_jk

JkMount /*.jsp          worker1#.jspworker1

service httpd restart   

以上是关于apache-tomcat的主要内容,如果未能解决你的问题,请参考以下文章