1.apt-get install apache2-* php5-* mysql-*
2.apt-get install sun-java6-jdk
&HTTP://www.aliyun.com/zixun/aggregation/37954.html">nbsp; # java-version
3.tar -xzvf apache2-tomcat-*
4.mv apache2-tomcat-* /usr/local/tomcat
5.vi /etc/profile export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.14 export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$ PATH:$HOMR/bin export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib export TOMCAT_HOME=/usr/local/tomcat\
6.source /etc/profile
7./usr/local/tomcat/bin/startup.sh
8.HTTP://ip:8080
9.HTTP://ip
10. 整合開始
在tomcat目錄的conf資料夾下創建jk2.properties檔,在裡面加入
handler.list=channelSocket,request channelSocket.port=8009
修改HTTPd.conf,一開始它是空的,增加
Server Name
ServerName 127.0.0.1
JK config
JkWorkersFile /etc/libapache2-mod-jk/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info JkMount /*.jsp ajp13_worker JkMount /*/servlet/ ajp13_worker JkMount /*.do ajp13_worker
/etc/apache2/sites-available中增加一個檔,檔案名隨便. 如我的ediskmanage,內容如下: <VirtualHost *>
ServerAdmin wqy0829@gmail.com
DocumentRoot "/opt//webapps"
ErrorLog "/var/log/apache2/manage_errors.log"
CustomLog "/var/log/apache2/manage_accesses.log" common
JkMount /servlet/* ajp13_worker
#讓Apache支援對servlet傳送,用以Tomcat解析
JkMount /*.jsp ajp13_worker
#讓Apache支援對jsp傳送,用以Tomcat解析
JkMount /*.do ajp13_worker
#讓Apache支援對.do傳送,用以Tomcat解析
</VirtualHost>
6、執行 sudo a2ensite 檔案名
7、sudo /etc/init.d/apache2 reload
8、重啟 apache和tomcat即可