#tar zxvf jdk-7u45-linux-i586.tar.gz
#mv jdk1.7.0_45/ /usr/local/
建立link
#ln -s /usr/local/jdk1.7.0_45/ /usr/local/jdk
編輯/etc/environment
JAVA_HOME=/usr/local/jdk
CLASSPATH=$JAVA_HOME/lib
安裝Apache,Tomcat7
#apt-get install tomcat7 apache2
install
libapache2-mod-jk
編輯
/etc/tomcat7/server
.xml
取消 <"8009"
protocol=
"AJP1.3"
redirectPort=
"8443"
/>
編輯
/etc/libapache2-mod-jk/workers
.properties
workers.tomcat_home=
/usr/share/tomcat7
workers.java_home=
/usr/local/jdk
worker.myworker.host=localhost
編輯
/etc/apache2/sites-enabled/000-default
Before
</virtualhost>
AddJkMount /*.jsp ajp13_worker
JkMount /*.
do
ajp13_worker
JkUnMount /*.php ajp13_worker
找個test.jsp來測試
收工!
tomcat-users.xml
<
role rolename="admin"/
>
<
role rolename="manager"/
>
<
role rolename="manager-gui"/
>
<
role rolename="manager-script"/
>
<
role rolename="manager-jmx"/
>
<
role rolename="manager-status"/
>
<
user username="tomcat" password="secret" roles="manager-gui,manager-script,manager-jmx,manager-status,manager,admin"/
>
沒有留言:
張貼留言