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