ubuntu apache+tomcat+jdk環境配置指南

來源:互聯網
上載者:User
關鍵字 tomc nbsp; java

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即可

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.