Installation and configuration of apachetomcat virtual host in linux

Source: Internet
Author: User
Article Title: installation and configuration of apachetomcat virtual host in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I have not used tomcat for many years. At the request of a friend, I set up a virtual host in the java environment. After many tests, I have recorded the configurations that can run normally.

Install jdk

Cd/usr/local

Sh/mnt/mysql/jdk-6u14-linux-i586.bin

Ln-s jdk1.6.0 _ 14/jdk

Echo "export JAVA_HOME =/usr/local/jdk

Export PATH = $ JAVA_HOME/bin: $ PATH

Export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib ">/etc/profile. d/java. sh

Chmod + x/etc/profile. d/java. sh

Install tomcat

Wget http://apache.freelamp.com/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz

Tar xzf apache-tomcat-6.0.20.tar.gz-C/usr/local/

Cd/usr/local/

Ln-s apache-tomcat-6.0.20/tomcat

Vi ~ /. Bash_profile

TOMCAT_HOME =/usr/local/tomcat

Export PATH TOMCAT_HOME

Source ~ /. Bash_profile

Install jk connector

Wget http://labs.xiaonei.com/apache-mirror/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz

Tar xfz tomcat-connectors-1.2.28-src.tar.gz-C/usr/local/src/

Cd/usr/local/src/tomcat-connectors-1.2.28-src/

Cd native/

./Configure? With-apxs =/usr/local/httpd/bin/apxs

Make

Cp apache-2.0/mod_jk.so/usr/local/httpd/modules/

Apche Configuration

Vim/usr/local/httpd/conf/extra/httpd-vhosts.conf

LoadModule jk_module modules/mod_jk.so

Include/usr/local/httpd/conf/mod_jk.conf

  

JkMountCopy On

ServerName edu.veryi.com

DirectoryIndex index. jsp index.html index. jsp index.htm

DocumentRoot/usr/local/tomcat/webapps/ROOT

# DocumentRoot/usr/local/www/edu.veryi.com/html

#

  

Order allow, deny

Allow from all

  

CustomLog "|/usr/local/sbin/cronolog/var/log/httpd/edu.veryi.com-access_log. % Y % m % d" combined

ErrorDocument 404/missing.html

  

 

[1] [2] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.